rmhatch
Posts: 11
Joined: Thu Oct 03, 2013 9:13 am

Start a Video from Midori

Mon Dec 23, 2013 7:26 am

I've seen blogs on this forum about methods used to view U-Tube videos using Midori and omxplayer. I would just like to be able to start an xterm/omx video (vis a vis: xterm -fullscreen -fg black -bg black -e omxplayer -o hdmi -r "$file", etc.) using a link or script from Midori. However, in general, this is verboten from browsers for security reasons. Does ANYONE know how I can just write a message to STDOUT using JavaScript or--better--start a process (if I can STDOUT I can start processs--but there's more "overhead") ???

Thanx 4 any insights you might have ...

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Start a Video from Midori

Fri Dec 27, 2013 4:38 pm

All approaches i've seen which tackle this problem use a
combination of a JS Userscript plus another script which
actually spawns omxplayer.

Launching arbitary commands out of a browser ( from JS , too)
DOES sound like a massive security hole ( sudo rm -rf / anyone ?
The worst is that sudo doesn't ask for password from user pi 
by default on the foundation image !!).


Links to "solutions" :
http://lin.jojen.de/play-html-5-video-r ... ri-chrome/

http://stevenhickson.blogspot.de/2013/0 ... er-on.html


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Beginners”