Documentation */?>

Example of code which plays YouTube videos from flashvars

1. Open index.html in your favorite editor.

2. You will be able to find the following code snippet.

<div name=’mediaspace’ id=’mediaspace’>

<script type=”text/javascript”>

var s1 = new SWFObject(‘HD FLV Player /hdplayer.swf’, ‘player’, ’640′, ’360′, ’9′);

s1.addParam(‘allowfullscreen’, ‘true’);

s1.addParam(‘allowscriptaccess’, ‘always’);

s1.addParam(‘wmode’, ‘transparent’);

s1.write(‘mediaspace’);

</script>

3. Add the below line next to s1.addParam(‘wmode’, ‘transparent’);

s1.addVariable(‘file’, ‘youtube page url goes here’);

4. Your final code will look as the following,

<div name=’mediaspace’ id=’mediaspace’>

<script type=”text/javascript”>

var s1 = new SWFObject(‘HD FLV Player /hdplayer.swf’, ‘player’, ’640′, ’360′, ’9′);

s1.addParam(‘allowfullscreen’, ‘true’);

s1.addParam(‘allowscriptaccess’, ‘always’);

s1.addParam(‘wmode’, ‘transparent’);

s1.addVariable(‘file’, ‘youtube page url goes here’);

s1.write(‘mediaspace’);

</script>

5. Run index.html in your favorite browser.

Related Posts via Categories

© Copyrights 2014 HD FLV Player - All Rights Reserved

A part of Contus