Rerenceing HD video file in Jw Player using Jscript
How do i add the hd video file in this code? Hd plugin is enabled. I went through their documentations. But didn't get how i can achieve it in this code.
<script type='text/javascript' src='swfobject.js'></script>
<div id='mediaspace'>This text will be replaced开发者_Python百科</div>
<script type='text/javascript'>
var so = new SWFObject('player.swf','mpl','470','320','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','sample.mp4');
so.addVariable('plugins','hd-1');
so.write('mediaspace');
</script>
Well, I found it out.
<script type="text/javascript">
var flashvars = {
'file': 'sd-video.mp4',
'hd.file': 'hd-video.mp4',
'hd.state': 'true'
};
var params = {
'allowfullscreen': 'true',
'allowscriptaccess': 'always',
'bgcolor': '#ffffff'
};
var attributes = {
'id': 'player1',
'name': 'player1'
};
SWFObject.embedSWF('player.swf', 'flashContent', '300', '250', '9', 'false', flashvars, params, attributes);
</script>
In my case I can reference hd video like this:
<script type='text/javascript' src='swfobject.js'></script>
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('player.swf','mpl','470','320','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','sample.mp4');//reference to sd video.
so.addVariable('hd.file','hd_sample.mp4');//reference to the hd version of video.
so.addVariable('hd.state','true'); //too choose hd as default.
so.addVariable('plugins','hd-1');
so.write('mediaspace');
</script>
精彩评论