xdyVideo.js
10.4 KB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.flashvideo=t():e.flashvideo=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(2)},function(e,t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(){function e(){if(!J&&document.getElementsByTagName("body")[0]){try{var e,t=g("span");t.style.display="none",e=U.getElementsByTagName("body")[0].appendChild(t),e.parentNode.removeChild(e),e=null,t=null}catch(e){return}J=!0;for(var n=D.length,i=0;i<n;i++)D[i]()}}function t(e){J?e():D[D.length]=e}function i(e){if(n($.addEventListener)!==O)$.addEventListener("load",e,!1);else if(n(U.addEventListener)!==O)U.addEventListener("load",e,!1);else if(n($.attachEvent)!==O)w($,"onload",e);else if("function"==typeof $.onload){var t=$.onload;$.onload=function(){t(),e()}}else $.onload=e}function a(){var e=U.getElementsByTagName("body")[0],t=g(B);t.setAttribute("style","visibility: hidden;"),t.setAttribute("type",F);var i=e.appendChild(t);if(i){var a=0;!function o(){if(n(i.GetVariable)!==O)try{var s=i.GetVariable("$version");s&&(s=s.split(" ")[1].split(","),Q.pv=[b(s[0]),b(s[1]),b(s[2])])}catch(e){Q.pv=[8,0,0]}else if(a<10)return a++,void setTimeout(o,10);e.removeChild(t),i=null,r()}()}else r()}function r(){var e=H.length;if(e>0)for(var t=0;t<e;t++){var i=H[t].id,a=H[t].callbackFn,r={success:!1,id:i};if(Q.pv[0]>0){var c=m(i);if(c)if(!E(H[t].swfVersion)||Q.wk&&Q.wk<312)if(H[t].expressInstall&&s()){var f={};f.data=H[t].expressInstall,f.width=c.getAttribute("width")||"0",f.height=c.getAttribute("height")||"0",c.getAttribute("class")&&(f.styleclass=c.getAttribute("class")),c.getAttribute("align")&&(f.align=c.getAttribute("align"));for(var u={},p=c.getElementsByTagName("param"),v=p.length,y=0;y<v;y++)"movie"!==p[y].getAttribute("name").toLowerCase()&&(u[p[y].getAttribute("name")]=p[y].getAttribute("value"));l(f,u,i,a)}else d(c),a&&a(r);else S(i,!0),a&&(r.success=!0,r.ref=o(i),r.id=i,a(r))}else if(S(i,!0),a){var h=o(i);h&&n(h.SetVariable)!==O&&(r.success=!0,r.ref=h,r.id=h.id),a(r)}}}function o(e){var t=null,i=m(e);return i&&"OBJECT"===i.nodeName.toUpperCase()&&(t=n(i.SetVariable)!==O?i:i.getElementsByTagName(B)[0]||i),t}function s(){return!X&&E("6.0.65")&&(Q.win||Q.mac)&&!(Q.wk&&Q.wk<312)}function l(e,t,i,a){var r=m(i);if(i=h(i),X=!0,x=a||null,k={success:!1,id:i},r){"OBJECT"===r.nodeName.toUpperCase()?(T=c(r),N=null):(T=r,N=i),e.id=_,(n(e.width)===O||!/%$/.test(e.width)&&b(e.width)<310)&&(e.width="310"),(n(e.height)===O||!/%$/.test(e.height)&&b(e.height)<137)&&(e.height="137");var o=Q.ie?"ActiveX":"PlugIn",s="MMredirectURL="+encodeURIComponent($.location.toString().replace(/&/g,"%26"))+"&MMplayerType="+o+"&MMdoctitle="+encodeURIComponent(U.title.slice(0,47)+" - Flash Player Installation");if(n(t.flashvars)!==O?t.flashvars+="&"+s:t.flashvars=s,Q.ie&&4!=r.readyState){var l=g("div");i+="SWFObjectNew",l.setAttribute("id",i),r.parentNode.insertBefore(l,r),r.style.display="none",v(r)}u(e,t,i)}}function d(e){if(Q.ie&&4!=e.readyState){e.style.display="none";var t=g("div");e.parentNode.insertBefore(t,e),t.parentNode.replaceChild(c(e),t),v(e)}else e.parentNode.replaceChild(c(e),e)}function c(e){var t=g("div");if(Q.win&&Q.ie)t.innerHTML=e.innerHTML;else{var n=e.getElementsByTagName(B)[0];if(n){var i=n.childNodes;if(i)for(var a=i.length,r=0;r<a;r++)1==i[r].nodeType&&"PARAM"===i[r].nodeName||8==i[r].nodeType||t.appendChild(i[r].cloneNode(!0))}}return t}function f(e,t){var n=g("div");return n.innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='"+e+"'>"+t+"</object>",n.firstChild}function u(e,t,i){var a,r=m(i);if(i=h(i),Q.wk&&Q.wk<312)return a;if(r){var o,s,l,d=g(Q.ie?"div":B);n(e.id)===O&&(e.id=i);for(l in t)t.hasOwnProperty(l)&&"movie"!==l.toLowerCase()&&p(d,l,t[l]);Q.ie&&(d=f(e.data,d.innerHTML));for(o in e)e.hasOwnProperty(o)&&(s=o.toLowerCase(),"styleclass"===s?d.setAttribute("class",e[o]):"classid"!==s&&"data"!==s&&d.setAttribute(o,e[o]));Q.ie?W[W.length]=e.id:(d.setAttribute("type",F),d.setAttribute("data",e.data)),r.parentNode.replaceChild(d,r),a=d}return a}function p(e,t,n){var i=g("param");i.setAttribute("name",t),i.setAttribute("value",n),e.appendChild(i)}function v(e){var t=m(e);t&&"OBJECT"===t.nodeName.toUpperCase()&&(Q.ie?(t.style.display="none",function e(){if(4==t.readyState){for(var n in t)"function"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}else setTimeout(e,10)}()):t.parentNode.removeChild(t))}function y(e){return e&&e.nodeType&&1===e.nodeType}function h(e){return y(e)?e.id:e}function m(e){if(y(e))return e;var t=null;try{t=U.getElementById(e)}catch(e){}return t}function g(e){return U.createElement(e)}function b(e){return parseInt(e,10)}function w(e,t,n){e.attachEvent(t,n),G[G.length]=[e,t,n]}function E(e){e+="";var t=Q.pv,n=e.split(".");return n[0]=b(n[0]),n[1]=b(n[1])||0,n[2]=b(n[2])||0,t[0]>n[0]||t[0]==n[0]&&t[1]>n[1]||t[0]==n[0]&&t[1]==n[1]&&t[2]>=n[2]}function C(e,t,i,a){var r=U.getElementsByTagName("head")[0];if(r){var o="string"==typeof i?i:"screen";if(a&&(I=null,L=null),!I||L!=o){var s=g("style");s.setAttribute("type","text/css"),s.setAttribute("media",o),I=r.appendChild(s),Q.ie&&n(U.styleSheets)!==O&&U.styleSheets.length>0&&(I=U.styleSheets[U.styleSheets.length-1]),L=o}I&&(n(I.addRule)!==O?I.addRule(e,t):n(U.createTextNode)!==O&&I.appendChild(U.createTextNode(e+" {"+t+"}")))}}function S(e,t){if(z){var n=t?"visible":"hidden",i=m(e);J&&i?i.style.visibility=n:"string"==typeof e&&C("#"+e,"visibility:"+n)}}function A(e){var t=/[\\\"<>\.;]/,i=null!==t.exec(e);return i&&("undefined"==typeof encodeURIComponent?"undefined":n(encodeURIComponent))!==O?encodeURIComponent(e):e}var T,N,x,k,I,L,O="undefined",B="object",j="Shockwave Flash",R="ShockwaveFlash.ShockwaveFlash",F="application/x-shockwave-flash",_="SWFObjectExprInst",M="onreadystatechange",$=window,U=document,P=navigator,V=!1,D=[],H=[],W=[],G=[],J=!1,X=!1,z=!0,Z=!1,Q=function(){var e=n(U.getElementById)!==O&&n(U.getElementsByTagName)!==O&&n(U.createElement)!==O,t=P.userAgent.toLowerCase(),i=P.platform.toLowerCase(),a=i?/win/.test(i):/win/.test(t),r=i?/mac/.test(i):/mac/.test(t),o=!!/webkit/.test(t)&&parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),s="Microsoft Internet Explorer"===P.appName,l=[0,0,0],d=null;if(n(P.plugins)!==O&&n(P.plugins[j])===B)d=P.plugins[j].description,d&&n(P.mimeTypes)!==O&&P.mimeTypes[F]&&P.mimeTypes[F].enabledPlugin&&(V=!0,s=!1,d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),l[0]=b(d.replace(/^(.*)\..*$/,"$1")),l[1]=b(d.replace(/^.*\.(.*)\s.*$/,"$1")),l[2]=/[a-zA-Z]/.test(d)?b(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(n($.ActiveXObject)!==O)try{var c=new ActiveXObject(R);c&&(d=c.GetVariable("$version"),d&&(s=!0,d=d.split(" ")[1].split(","),l=[b(d[0]),b(d[1]),b(d[2])]))}catch(e){}return{w3:e,pv:l,wk:o,ie:s,win:a,mac:r}}();(function(){Q.w3&&((n(U.readyState)!==O&&("complete"===U.readyState||"interactive"===U.readyState)||n(U.readyState)===O&&(U.getElementsByTagName("body")[0]||U.body))&&e(),J||(n(U.addEventListener)!==O&&U.addEventListener("DOMContentLoaded",e,!1),Q.ie&&(U.attachEvent(M,function t(){"complete"===U.readyState&&(U.detachEvent(M,t),e())}),$==top&&!function t(){if(!J){try{U.documentElement.doScroll("left")}catch(e){return void setTimeout(t,0)}e()}}()),Q.wk&&!function t(){if(!J)return/loaded|complete/.test(U.readyState)?void e():void setTimeout(t,0)}()))})();D[0]=function(){V?a():r()};(function(){Q.ie&&window.attachEvent("onunload",function(){for(var e=G.length,t=0;t<e;t++)G[t][0].detachEvent(G[t][1],G[t][2]);for(var n=W.length,i=0;i<n;i++)v(W[i]);for(var a in Q)Q[a]=null;Q=null;for(var r in swfobject)swfobject[r]=null;swfobject=null})})();return{registerObject:function(e,t,n,i){if(Q.w3&&e&&t){var a={};a.id=e,a.swfVersion=t,a.expressInstall=n,a.callbackFn=i,H[H.length]=a,S(e,!1)}else i&&i({success:!1,id:e})},getObjectById:function(e){if(Q.w3)return o(e)},embedSWF:function(e,i,a,r,o,d,c,f,p,v){var y=h(i),m={success:!1,id:y};Q.w3&&!(Q.wk&&Q.wk<312)&&e&&i&&a&&r&&o?(S(y,!1),t(function(){a+="",r+="";var t={};if(p&&("undefined"==typeof p?"undefined":n(p))===B)for(var h in p)t[h]=p[h];t.data=e,t.width=a,t.height=r;var g={};if(f&&("undefined"==typeof f?"undefined":n(f))===B)for(var b in f)g[b]=f[b];if(c&&("undefined"==typeof c?"undefined":n(c))===B)for(var w in c)if(c.hasOwnProperty(w)){var C=Z?encodeURIComponent(w):w,A=Z?encodeURIComponent(c[w]):c[w];n(g.flashvars)!==O?g.flashvars+="&"+C+"="+A:g.flashvars=C+"="+A}if(E(o)){var T=u(t,g,i);t.id==y&&S(y,!0),m.success=!0,m.ref=T,m.id=T.id}else{if(d&&s())return t.data=d,void l(t,g,i,v);S(y,!0)}v&&v(m)})):v&&v(m)},switchOffAutoHideShow:function(){z=!1},enableUriEncoding:function(e){Z=("undefined"==typeof e?"undefined":n(e))===O||e},ua:Q,getFlashPlayerVersion:function(){return{major:Q.pv[0],minor:Q.pv[1],release:Q.pv[2]}},hasFlashPlayerVersion:E,createSWF:function(e,t,n){return Q.w3?u(e,t,n):void 0},showExpressInstall:function(e,t,n,i){Q.w3&&s()&&l(e,t,n,i)},removeSWF:function(e){Q.w3&&v(e)},createCSS:function(e,t,n,i){Q.w3&&C(e,t,n,i)},addDomLoadEvent:t,addLoadEvent:i,getQueryParamValue:function(e){var t=U.location.search||U.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),!e)return A(t);for(var n=t.split("&"),i=0;i<n.length;i++)if(n[i].substring(0,n[i].indexOf("="))==e)return A(n[i].substring(n[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(X){var e=m(_);e&&T&&(e.parentNode.replaceChild(T,e),N&&(S(N,!0),Q.ie&&(T.style.display="block")),x&&x(k)),X=!1}},version:"2.3"}}();(function(){"undefined"==typeof __REACT_HOT_LOADER__})()},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var a=n(1),r=i(a);console.log(r.default),e.exports=function(e,t,n,i,a){var o="_flashReady"+Date.now(),s=o+10;console.log(o,s),window[o]=function(){i&&i(null,r.default.getObjectById(e))},window[s]=function(e){a&&a(e)};var l="http://192.168.1.44:8080/xdyvideo";r.default.embedSWF(l+"/flashvideo.swf",e,t,n,"11.4.0",l+"/flashinstall.swf",{flashReady:o,msgCallback:s},{allowScriptAccess:"always"},{objattr:"objattrvalue"},function(e){e.success||i("flash create errors")})};(function(){"undefined"==typeof __REACT_HOT_LOADER__})()}])});