diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2021-12-17 12:29:30 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2021-12-17 12:29:30 +0000 |
commit | 9f305e4c3ba211834b194e5fac98089866c13d82 (patch) | |
tree | 1d76256c5428601a2b71ba795fb7551a2fa60f32 /frontends/amiga | |
parent | 4e6e024dd79b79bde7322b9dc58c72bfe07e3ad9 (diff) | |
download | netsurf-9f305e4c3ba211834b194e5fac98089866c13d82.tar.gz netsurf-9f305e4c3ba211834b194e5fac98089866c13d82.tar.bz2 |
Amiga: Add ARexx scripts to play videos via YT
Credit: Chris Handley
Diffstat (limited to 'frontends/amiga')
-rw-r--r-- | frontends/amiga/dist/Rexx/YT_download_page.nsrx | 21 | ||||
-rw-r--r-- | frontends/amiga/dist/Rexx/YT_open.nsrx | 21 | ||||
-rw-r--r-- | frontends/amiga/dist/Rexx/YT_play.nsrx | 19 |
3 files changed, 61 insertions, 0 deletions
diff --git a/frontends/amiga/dist/Rexx/YT_download_page.nsrx b/frontends/amiga/dist/Rexx/YT_download_page.nsrx new file mode 100644 index 000000000..fdc06923d --- /dev/null +++ b/frontends/amiga/dist/Rexx/YT_download_page.nsrx @@ -0,0 +1,21 @@ +/* YT play.nsrx by Chris Handley + This script shows download links for a YouTube video using YT (OS4Depot:video/misc/yt.lha) +*/ + +options results + +if ~open('yt','AppDir:YT','R') then do + GETSCREENNAME + address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result + OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */ + exit +end +close('yt') + +GETURL +/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/ +address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'" html silent' + +/* Hack to activate the newest tab */ +OPEN 'file:///RAM:' NEWTAB ACTIVE +CLOSE diff --git a/frontends/amiga/dist/Rexx/YT_open.nsrx b/frontends/amiga/dist/Rexx/YT_open.nsrx new file mode 100644 index 000000000..4454f0c29 --- /dev/null +++ b/frontends/amiga/dist/Rexx/YT_open.nsrx @@ -0,0 +1,21 @@ +/* YT play.nsrx by Chris Handley + This script opens a YouTube video using YT (OS4Depot:video/misc/yt.lha) +*/ + +options results + +if ~open('yt','AppDir:YT','R') then do + GETSCREENNAME + address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result + OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */ + exit +end +close('yt') + +address COMMAND 'Run >NIL: RequestChoice Title="NetSurf" BODY="When finished with YT, click OK to return to NetSurf" GADGETS="OK" INACTIVE >NIL:' /* Hack to get Workbench to front */ + +GETURL +/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/ +address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'"' + +/*TOBACK*/ /* ideally we'd bring Workbench to front */ diff --git a/frontends/amiga/dist/Rexx/YT_play.nsrx b/frontends/amiga/dist/Rexx/YT_play.nsrx new file mode 100644 index 000000000..a8e29162f --- /dev/null +++ b/frontends/amiga/dist/Rexx/YT_play.nsrx @@ -0,0 +1,19 @@ +/* YT play.nsrx by Chris Handley + This script auto-plays a YouTube video using YT (OS4Depot:video/misc/yt.lha) +*/ + +options results + +if ~open('yt','AppDir:YT','R') then do + GETSCREENNAME + address command 'requestchoice >NIL: "NetSurf" "YT must be installed for this script to function.*n*nIt can be downloaded from OS4Depot:video/misc/yt" "OK" PubScreen='||result + OPEN 'http://os4depot.net/?function=showfile&file=video/misc/yt.lha' NEWTAB ACTIVE /* This doesn't work due to a NetSurf(?) bug */ + exit +end +close('yt') + +GETURL +/*address command 'requestchoice >NIL: "TEST" "'||result||'" "OK"'*/ +address command 'AppDir:YT <>CON:0/30/640/256/YT/AUTO/CLOSE "'||result||'" AutoPlay' + +/*TOBACK*/ /* ideally we'd bring Workbench to front */ |