Mùa Đông Không Em

Đình Phong

  • 392827
  • 0

Loading...
'); var videoEl = $('#videoPlayer'); if (adsLink.length > 10) { $.ajaxJSONP({ url: adsLink, dataType: 'json', success: function (ovaRes) { if (povaURL.length > 10) { $.ajax({ type: "POST", url: povaURL, dataType: "xml", data: {format: "xml"}, complete: function (povaRes) { if (povaRes.status == 200) { var xml = ''; if (povaRes.responseXML != null) { xml = new XMLSerializer().serializeToString(povaRes.responseXML.documentElement); } zmp3HTML5.buildPlayer(videoEl.attr('id'), ovaRes, povaURL, xml); } else { zmp3HTML5.buildPlayer(videoEl.attr('id'), ovaRes, povaURL); } } }); } else { zmp3HTML5.buildPlayer(videoEl.attr('id'), ovaRes, povaURL); } }, error: function () { zmp3HTML5.buildPlayer(videoEl.attr('id')); } }); } else { zmp3HTML5.buildPlayer(videoEl.attr('id')); } } }, toSeconds: function (t) { var s = 0.0; if (t) { var p = t.split(':'); for (var i = 0; i < p.length; i++) s = s * 60 + parseFloat(p[i].replace(',', '.')); } return s; }, buildPlayer: function (videoId, vastJson, povaURL, xml) { $('#' + videoId).removeClass('none'); this.player = videojs( videoId, {preload: 'auto', autoplay: true, nativeControlsForTouch: true, width: $(window).width(), height: $(window).width() / 1.7777}, function () { if (vastJson && vastJson.ads.schedule) { var adsSchedule = []; for (var i in vastJson.ads.schedule) { adsSchedule.push({ 'start': zmp3HTML5.toSeconds(vastJson.ads.schedule[i]['startTime']), 'xml': vastJson.ads.schedule[i]['server']['tag'], 'duration': vastJson.ads.schedule[i]['duration'], 'region': vastJson.ads.schedule[i]['region'] }); } adsSchedule.sort(function (a, b) { return a['start'] - b['start']; }); this.zingAds({ 'techOrder': ['html5'], 'adsSchedule': adsSchedule, 'timeout': 3000, 'skipEnable': vastJson.ads.skipAd['enabled'], 'skip': 5, 'pauseVast': xml, 'pauseVastUrl': povaURL }); } } ); $(window).resize(function () { zmp3HTML5.resize(); }); }, resize: function () { if (this.player) { this.player.width($(window).width(), true); this.player.height($(window).width() / 1.7777 + $('.vjs-control-bar').height(), true); } } };
Quay lại Xóa lịch sử tìm kiếm