Advertisement
nevarda9416

Untitled

Oct 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. <script type="text/javascript">
  2. var isSupportVOD = !1,
  3. isScriptLoaded = !1,
  4. head = document.getElementsByTagName("head")[0], istablet;
  5. try {
  6. if (
  7. "MediaSource" in window ||
  8. navigator.userAgent.match(/Android/i) ||
  9. navigator.userAgent.match(/BlackBerry/i) ||
  10. navigator.userAgent.match(/iPhone|iPad|iPod/i) ||
  11. navigator.userAgent.match(/Opera Mini/i) ||
  12. navigator.userAgent.match(/IEMobile/i)
  13. ) {
  14. isSupportVOD = !0;
  15. }
  16. } catch (a) {
  17. console.log(a);
  18. }
  19.  
  20. if (document.cookie.indexOf('device_env=4') > -1 && document.cookie.indexOf('device_env_real=2') > -1) {
  21. istablet = 'm';
  22. } else {
  23. istablet = '';
  24. }
  25.  
  26. if (1 == isSupportVOD) {
  27. var s_hls = document.createElement("script");
  28. s_hls.type = "text/javascript";
  29. s_hls.async = !0;
  30. s_hls.src = js_url_vne + "/v2/helper/" + istablet + "vod/hls.js";
  31. s_hls.onload = function () {
  32. var s_vlib = document.createElement("script");
  33. s_vlib.type = "text/javascript";
  34. s_vlib.async = !0;
  35. s_vlib.src = js_url_vne + "/v2/helper/" + istablet + "vod/video.lib.js";
  36. s_vlib.onload = function () {
  37. isScriptLoaded = !0;
  38. };
  39. head.appendChild(s_vlib);
  40. };
  41. head.appendChild(s_hls);
  42. var scriptVOD = document.createElement("script");
  43. scriptVOD.type = "text/javascript";
  44. scriptVOD.async = !0;
  45. scriptVOD.src =
  46. js_url_vne + "/v2/helper/" + istablet + "embed_vod.js";
  47. scriptVOD.onload = function () {
  48. };
  49. head.appendChild(scriptVOD);
  50. var link = document.createElement("link");
  51. link.rel = "stylesheet";
  52. link.type = "text/css";
  53. link.href = js_url_vne + "/v2/helper/" + istablet + "vod/video-js.css";
  54. link.media = "all";
  55. head.appendChild(link);
  56. var scriptAds = document.createElement("script");
  57. scriptAds.type = "text/javascript";
  58. scriptAds.async = !0;
  59. scriptAds.src = js_url_vne + "/v2/helper/" + istablet + "vod/ads.js";
  60. scriptAds.onload = function () {
  61. };
  62. head.appendChild(scriptAds);
  63. } else {
  64. if (document.cookie.indexOf('device_env=4') > -1 && document.cookie.indexOf('device_env_real=2') > -1) {
  65. var link = document.createElement("link");
  66. link.rel = "stylesheet";
  67. link.type = "text/css";
  68. link.href = js_url_vne + "/v2/helper/mvod/fp-style.css";
  69. link.media = "all";
  70. head.appendChild(link);
  71. var mfplayer = document.createElement("script");
  72. mfplayer.type = "text/javascript";
  73. mfplayer.async = !0;
  74. mfplayer.src = js_url_vne + "/v2/helper/mfplayer.js";
  75. mfplayer.onload = function () {
  76. var a = document.createElement("script");
  77. a.type = "text/javascript";
  78. a.async = !0;
  79. a.src = js_url_vne + "/v2/helper/membed.js";
  80. a.onload = function () {
  81. isScriptLoaded = !0
  82. };
  83. head.appendChild(a)
  84. };
  85. head.appendChild(mfplayer);
  86. } else {
  87. script = document.createElement("script"), script.type = "text/javascript", script.async = !0, script.src = js_url_vne + "/v2/helper/embed.js", script.onload = function () {
  88. }, head.appendChild(script);
  89. }
  90. }
  91. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement