set TaskWindow$Server Resources:$.Apps.!Edit
unset Alias$TaskWindow

Set YTPlay$Dir <Obey$Dir>

|short check start
If "<Mplayer$DIR>"<>"" Then set mplayer$pres "yes" Else set mplayer$pres "no"
If "<FFplay$DIR>"<>"" Then set ffplay$pres "yes" Else set ffplay$pres "no"
If "<Python3$DIR>"<>"" Then set  python3$pres "yes" Else set python3$pres "no"
|short check end

| Run <YTPlay$Dir>.Resources.alignOFF
unset UnixEnv$Term
*RMEnsure TaskRunner 0.10 IfThere System:Modules.TaskRunner Then RMLoad System:Modules.TaskRunner Else RMLoad <YTPlay$Dir>.Resources.TaskRunner
*RMEnsure UtilityModule 3.10 Error This application only runs on RISC OS 3 (version 3.10) or later
*RMEnsure SharedCLibrary 5.28 Error This application requires CLib 5.28
*RMEnsure FPEmulator 2.87 Error This application requires the FP Emulator module (is it unplugged?)
*RMEnsure TaskWindow 0.47 Error This application requires the Task Window module (is it unplugged?)
*RMEnsure FrontEnd 0 System:modules.frontend
*RMEnsure Frontend 1.21 Error You need version 1.21 of the FrontEnd module to run
*RMEnsure DDEUtils 0 System:modules.ddeutils
*RMEnsure DDEUtils 1.52 Error You need version 1.52 of the DDEUtils module to run

set UnixEnv$PYTHONIOENCODING utf-8

WimpSlot -min 28312k -max 56312k

IconSprites <Obey$Dir>.!Sprites

Set YTPlay$Install TRUE

If "<YTPlay$Running>"<>"" Then Error !YTPlay is already running.
Set YTPlay$Running "Yes"
Set ffplay$Running "no"
Set FFplay$args -protocol_whitelist "file,http,https,tcp,tls"

Set FFplay$opts -framedrop

|-vf "scale=640:480"

Run <Obey$Dir>.!RunImage
