JW Player聪明不行

时间:2015-01-06 18:53:51

标签: javascript php smarty jwplayer clipbucket

我在自定义JWPlayer上安装了clipbucket。但它老了,我升级到专业。 现在我已经改变了播放器和标准视频正常工作没有任何问题,但我无法在代码中添加toggel高清视频。如果有人请告诉我如何正确地刺穿它,

我想添加



sources: [{
        file: "/uploads/myVideo720mp4",
        label: "720p HD"
      },{
        file: "/uploads/myVideo360.mp4",
        label: "360p SD",
        "default": "true"
      },{
        file: "/uploads/myVideo180mp4",
        label: "180p Web"
      }]




进入以下播放器代码



<div id="mediaplayer">Loading player, please wait....</div>
<script type="text/javascript">
var cb_player_file = '{$cb_player_url}/player.swf';
var cb_player_url = '{$cb_player_url}';
var player_logo = '{$player_logo}';
var hq_video_file = '{$hq_vid_file}';
var normal_video_file = '{$normal_vid_file}';
var ytcode = '{$ytcode}';
var pre_item = "";
var next_item = "";
var preview_img = '{getThumb vdetails=$vdata size="big"}';
var embed_type = '{$Cbucket->configs.embed_type}';

jwplayer("mediaplayer").setup({ldelim}
		{if $ytcode}
		file: 'http://www.youtube.com/watch?v={$ytcode}',
		{else}
		file: normal_video_file,
		{/if}
		image: preview_img,
		width: '{$player_data.width}',
		height:'{$player_data.height}',
		autostart : '{$player_data.autoplay}',
		primary :"flash",
		startparam: "start",
		'logo':{ldelim}
			file :player_logo ,
			link :baseurl,
			margin : '{$logo_margin}',
			position : '{$logo_placement}',
			timeout : '3',
			over :'1',
			out :'0.5'
		{rdelim},
	{rdelim});
</script>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

之前我没有使用过Clip-Bucket,但我知道在使用JW6时,你需要像这样设置播放器 - http://support.jwplayer.com/customer/portal/articles/1428524-hd-quality-toggling

<div id="myElement"></div>

<script>
    jwplayer("myElement").setup({
      image: "/uploads/myPoster.jpg",
      sources: [{
        file: "/uploads/myVideo360.mp4"
      },{
        file: "/uploads/myVideo720mp4"
      }]
    });
</script>