1

我用他们的自定义 JWPlayer 安装了 clipbucket。但它很旧,我正在升级到专业版。现在我已经更改了播放器,标准视频可以正常工作,没有任何问题,但我无法在代码中添加切换高清视频。如果有人请告诉我如何正确地刺穿它,

我想添加

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>

4

1 回答 1

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>
于 2015-01-06T21:08:18.117 回答