README

HOW TO USE THESE SCRIPTS

EXECUTION:

This demo aims at rendering, the runtime generated UI of the new YouTube player. Recently YouTube switched 
to Flash 10 and AS3 to serve some HD content, while maintaining the old AS2 based player for lower quality content.

-) First of all download the YouTube player SWF. The URL changes from time to time as YouTube deploys new player versions
   so it needs to be scraped from the HTML page:
	wget `./tools/youtube-get-player.sh http://www.youtube.com/watch?v=4N2YWRJ-ppo` -O player.swf
-) The player works by gathering the parameters from the Javascript in the page. Lightspark support loading parameters from a text file
   using the --parameters-file command line. Create a suitable parameters file using the following commands
	cd tools
	./youtube-args-dumper.sh http://www.youtube.com/watch?v=4N2YWRJ-ppo > ../yt-args
	cd ..
-) Execute the file, this will render the usual UI of the YouTube player and decoded video, no sound is played yet
	lightspark --parameters-file yt-args player.swf

A command that automates the above steps:

	./tools/play-youtube.sh http://www.youtube.com/watch?v=4N2YWRJ-ppo

Press 'Q' on Lightspark window to close the application