Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var isSupportVOD = !1,
- isScriptLoaded = !1,
- head = document.getElementsByTagName("head")[0], istablet;
- try {
- if (
- "MediaSource" in window ||
- navigator.userAgent.match(/Android/i) ||
- navigator.userAgent.match(/BlackBerry/i) ||
- navigator.userAgent.match(/iPhone|iPad|iPod/i) ||
- navigator.userAgent.match(/Opera Mini/i) ||
- navigator.userAgent.match(/IEMobile/i)
- ) {
- isSupportVOD = !0;
- }
- } catch (a) {
- console.log(a);
- }
- if (document.cookie.indexOf('device_env=4') > -1 && document.cookie.indexOf('device_env_real=2') > -1) {
- istablet = 'm';
- } else {
- istablet = '';
- }
- if (1 == isSupportVOD) {
- var s_hls = document.createElement("script");
- s_hls.type = "text/javascript";
- s_hls.async = !0;
- s_hls.src = js_url_vne + "/v2/helper/" + istablet + "vod/hls.js";
- s_hls.onload = function () {
- var s_vlib = document.createElement("script");
- s_vlib.type = "text/javascript";
- s_vlib.async = !0;
- s_vlib.src = js_url_vne + "/v2/helper/" + istablet + "vod/video.lib.js";
- s_vlib.onload = function () {
- isScriptLoaded = !0;
- };
- head.appendChild(s_vlib);
- };
- head.appendChild(s_hls);
- var scriptVOD = document.createElement("script");
- scriptVOD.type = "text/javascript";
- scriptVOD.async = !0;
- scriptVOD.src =
- js_url_vne + "/v2/helper/" + istablet + "embed_vod.js";
- scriptVOD.onload = function () {
- };
- head.appendChild(scriptVOD);
- var link = document.createElement("link");
- link.rel = "stylesheet";
- link.type = "text/css";
- link.href = js_url_vne + "/v2/helper/" + istablet + "vod/video-js.css";
- link.media = "all";
- head.appendChild(link);
- var scriptAds = document.createElement("script");
- scriptAds.type = "text/javascript";
- scriptAds.async = !0;
- scriptAds.src = js_url_vne + "/v2/helper/" + istablet + "vod/ads.js";
- scriptAds.onload = function () {
- };
- head.appendChild(scriptAds);
- } else {
- if (document.cookie.indexOf('device_env=4') > -1 && document.cookie.indexOf('device_env_real=2') > -1) {
- var link = document.createElement("link");
- link.rel = "stylesheet";
- link.type = "text/css";
- link.href = js_url_vne + "/v2/helper/mvod/fp-style.css";
- link.media = "all";
- head.appendChild(link);
- var mfplayer = document.createElement("script");
- mfplayer.type = "text/javascript";
- mfplayer.async = !0;
- mfplayer.src = js_url_vne + "/v2/helper/mfplayer.js";
- mfplayer.onload = function () {
- var a = document.createElement("script");
- a.type = "text/javascript";
- a.async = !0;
- a.src = js_url_vne + "/v2/helper/membed.js";
- a.onload = function () {
- isScriptLoaded = !0
- };
- head.appendChild(a)
- };
- head.appendChild(mfplayer);
- } else {
- script = document.createElement("script"), script.type = "text/javascript", script.async = !0, script.src = js_url_vne + "/v2/helper/embed.js", script.onload = function () {
- }, head.appendChild(script);
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement