'=([^&]*)(&|$)', 'i'); var r = window.location.search.substr(1).match(reg); if (r != null) { return decodeURIComponent(r[2]); } return null; } var rtmp = getParams('rtmp'), m3u8 = getParams('m3u8'), mp4 = getParams('mp4'), live = (getParams('live') == 'true' ? true : false), coverpic = getParams('coverpic'), width = getParams('width'), height = getParams('height'), volume = getParams('volume'), flash = (getParams('flash') == 'true' ? true : false), h5_flv = (getParams('h5_flv') == 'true' ? true : false), autoplay = (getParams('autoplay') == 'true' ? true : false), log = getParams('log'); /** * 视频类型播放优先级 * mobile :m3u8>mp4 * PC :RTMP>flv>m3u8>mp4 */ var srl1 = $('.video1').attr('href'); var srl2 = $('.video2').attr('href'); var srl3 = $('.video3').attr('href'); console.log(srl1); var options = { mp4 : srl1, mp4_hd : srl2, mp4_sd : srl3, clarity: 'sd', clarityLabel:{ sd: '高清', od: '流畅', hd: '标清' }, "coverpic" : {"style":"stretch", "src":"//lib.zozen.com/5ab9f1bda624634ee3649458/images/20210727/97f0fcce976a0b33989ea3f76c89622a.jpg!/both/890x500"}, autoplay: autoplay ? true : false, live: live, width : width || '890', height : height || '500', volume : volume || 0.5, flash : flash, listener: function (msg) { if(msg.type=='ended'){ $('.bz-bz').show(); } if(msg.type=='pause'){ $('.vcp-poster-pic').hide(); } } }; var player = new TcPlayer('video-container', options); window.tcplayer = player; $('.vcp-playtoggle').click (function () { $(".bz-bz").toggle(); }) $('.vcp-bigplay').click (function () { $(".bz-bz").toggle(); }) $('.bz-bz').click(function () { player.play(); $(this).hide(); }) })();
Baidu
map