zwplayer-vue2x 1.0.31 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["zwplayervue2"]=t():e["zwplayervue2"]=t()})("undefined"!==typeof self?self:this,function(){return function(){var e={421:function(e){const t=function(e,t,r){let l=document.getElementsByTagName("head");if(0==l.length){l=document.createElement("head");let e=document.getElementsByTagName("body");if(!(e.length>0))return alert("Invalid html document: no HEAD tag"),!1;e=e[0],document.insertBefore(l,e)}else{l=l[0];const t=l.childNodes;for(let l=0;l<t.length;l++){const n=t[l];if("SCRIPT"===n.nodeName.toUpperCase()&&n.id&&n.id==e){if("true"!=n.getAttribute("loadstate")){const t=function(){"true"!=n.getAttribute("loadstate")?setTimeout(t,50):"function"==typeof r&&r(e)};return setTimeout(t,50),!1}return"function"==typeof r&&r(e),!0}}}const n=document.createElement("script");return n.type="text/javascript",n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,n.setAttribute("loadstate","true"),"function"==typeof r&&r(e))}:n.onload=function(){n.setAttribute("loadstate","true"),n.setAttribute("charset","utf-8"),"function"==typeof r&&r(e)},n.id=e,n.src=t,l.appendChild(n),!1};e.exports.l=t}},t={};function r(l){var n=t[l];if(void 0!==n)return n.exports;var o=t[l]={exports:{}};return e[l](o,o.exports,r),o.exports}!function(){r.d=function(e,t){for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}}(),function(){r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){r.p=""}();var l={};return function(){"use strict";if(r.r(l),r.d(l,{Player:function(){return h},default:function(){return g},zwplayer:function(){return c}}),"undefined"!==typeof window){var e=window.document.currentScript,t=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);t&&(r.p=t[1])}var n=r(421);const o="zwplayer/zwplayer.js?v=3.6",a={isLive:"boolean",useOldFlv:"boolean",useFlv:"boolean",streamtype:"string",hasAudio:"boolean",hasVideo:"boolean",xmc_url:"string",fixedControlbar:"boolean",nativecontrols:"boolean",infoButton:"boolean",speedButton:"boolean",optionButton:"boolean",snapshotButton:"boolean",chapterButton:"boolean",enableDanmu:"boolean",useProgressTooltip:"boolean",hidePlayBtn:"boolean",disablePlayBtn:"boolean",disableSeek:"boolean",disableFullscreenWin:"boolean",disablePicInPic:"boolean",disableVolumeControl:"boolean",lostFocusPause:"boolean",autoSmallWindow:"boolean",thumbnails:"object",sendDanmu:"function",danmuBarId:"string",fluid:"boolean",poster:"string",logo:"object|string",ratio:"string|number",width:"string|number",height:"string|number"};var i,s,p={name:"ZwPlayer",data(){return{zwplayer:null,nodename:"ZwPlayer"}},props:{zwplayerlib:String,murl:String,nodeid:String,muted:Boolean,autoplay:{type:Boolean,default:!0},videoprop:Object,videostyle:String,reconnect:{type:Boolean,default:!0},controlbar:{type:Boolean,default:!0},useProgressTooltip:{type:Boolean,default:!0}},emits:["oneterror","onmediaevent","onready"],methods:{play(e,t,r){let l=this;e||(e=this.murl),l.zwplayer&&l.zwplayer.play(e,t,r)},stop(){let e=this;e.zwplayer&&e.zwplayer.stop()},pause(){let e=this;e.zwplayer&&e.zwplayer.pause()},resume(){let e=this;e.zwplayer&&e.zwplayer.resume()},getDuration(){let e=this;if(e.zwplayer)return e.zwplayer.getDuration()},getCurrentTime(){let e=this;if(e.zwplayer)return e.zwplayer.CurrentTime},seekTime(e){let t=this;t.zwplayer&&t.zwplayer.seekTime(e)},destroy(){let e=this;e.zwplayer&&e.zwplayer.destroy()},setplaystate(e){let t=this;t.zwplayer&&t.zwplayer.setplaystate(e)},setEnableDanmu(e){let t=this;t.zwplayer&&t.zwplayer.setEnableDanmu(e)},appendDanmu(e,t){let r=this;r.zwplayer&&r.zwplayer.appendDanmu(e,t)},setChapters(e){let t=this;t.zwplayer&&t.zwplayer.setChapters(e)},addSubtitle(e,t,r){let l=this;l.zwplayer&&l.zwplayer.addSubtitle(e,t,r)},removeSubtitle(){let e=this;e.zwplayer&&e.zwplayer.removeSubtitle()},buildDanmuControlbar(e,t){let r=this;r.zwplayer&&r.zwplayer.buildDanmuControlbar(e,t)},notifyResize(e,t){let r=this;r.zwplayer&&r.zwplayer.notifyResize(e,t)},setMute(e){let t=this;t.zwplayer&&t.zwplayer.setMuted(e)},setullscr(e){let t=this;t.zwplayer&&(t.is_fullscr=e,t.zwplayer.setFullscreen(e))}},computed:{CurrentTime:function(){let e=this;return e.zwplayer?e.zwplayer.CurrentTime:-1}},render(e){let t;if(this.nodeid)t=this.nodeid;else{let e=(new Date).getTime();window.nextZWPlayerId?window.nextZWPlayerId++:window.nextZWPlayerId=1e3,t="zwplayer-"+window.nextZWPlayerId+"-"+e}let r=e("div",{class:{"zwplayer-vue":!0},attrs:{id:t}},[]);if(r){let e=this;e.playerid=t}return this.zwplayer&&this.murl!==this.old_murl&&(this.zwplayer.play(this.murl),this.old_murl=this.murl),r},mounted(){let e,t=this;e=t.zwplayerlib?t.zwplayerlib:o,t.rootElm=document.getElementById(t.playerid),t.rootElm&&(t.rootElm.style.width="100%",t.rootElm.style.height="100%",t.rootElm.style.margin="0",t.rootElm.style.padding="0"),(0,n.l)("zwplayer-core",e,function(e){let r="";e||console.log("zwplayer_loadjs failed!"),t.murl?r=t.murl:t.videoprop&&"undefined"!==typeof t.videoprop.url&&(r=t.videoprop.url);let l="width:100%;height:100%;";t.videoprop&&"undefined"!==typeof t.videoprop.videostyle&&(l=t.videoprop.videostyle);let n={url:r,playerElm:t.rootElm,videostyle:l,reconnect:t.reconnect,autoplay:t.autoplay,muted:t.muted,controlbar:t.controlbar,useProgressTooltip:t.useProgressTooltip,onready:function(){t.$emit("onready",this)},onnetclose:function(){return t.$emit("onnetclose",this),!0},onneterror:function(){t.$emit("onneterror",this)},onmediaevent:function(e){t.$emit("onmediaevent",e,this)}},o=a;const i=function(e,t){if(t.indexOf("|")>0){var r=t.split("|");for(let t=0;t<r.length;t++)if(e===r[t])return!0;return!1}return e===t};for(let a in t.$attrs){var s=typeof t.$attrs[a];a in o&&i(s,o[a])&&(n[a]="object"===s?JSON.parse(JSON.stringify(t.$attrs[a])):t.$attrs[a])}t.zwplayer=new window.ZWPlayer(n),n.danmuBarId&&t.zwplayer.buildDanmuControlbar(n.danmuBarId,"vue-zwp-danmubar"),t.old_murl=r})},beforeDestroy(){let e=this;e.zwplayer&&e.zwplayer.stop()},destroyed(){let e=this;e.zwplayer&&(e.zwplayer.destroy(),delete e.zwplayer)}},u=p;function y(e,t,r,l,n,o,a,i){var s,p="function"===typeof e?e.options:e;if(t&&(p.render=t,p.staticRenderFns=r,p._compiled=!0),l&&(p.functional=!0),o&&(p._scopeId="data-v-"+o),a?(s=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},p._ssrRegister=s):n&&(s=i?function(){n.call(this,(p.functional?this.parent:this).$root.$options.shadowRoot)}:n),s)if(p.functional){p._injectStyles=s;var u=p.render;p.render=function(e,t){return s.call(t),u(e,t)}}else{var y=p.beforeCreate;p.beforeCreate=y?[].concat(y,s):[s]}return{exports:e,options:p}}var d=y(u,i,s,!1,null,null,null),w=d.exports;w.install=function(e){e.component(w.name,w),e.component("zero-web-player",w),e.component("zero-player",w),e.component("ZPlayer",w)};var c=w;const f=[c],m={install:e=>{f.forEach(t=>{t.install(e)})}};"undefined"!==typeof window&&window.Vue&&m.install(window.Vue);const z="zwplayer/zwplayer.js?v=3.6",h=function(e){this.zwplayer=null;const t=this;(0,n.l)("zwplayer-core",z,function(r){r?t.zwplayer=new window.ZWPlayer(e):console.log("Load zwplayer library failed.")})};h.prototype={play(e,t,r){let l=this;e||(e=this.murl),l.zwplayer&&l.zwplayer.play(e,t,r)},stop(){let e=this;e.zwplayer&&e.zwplayer.stop()},pause(){let e=this;e.zwplayer&&e.zwplayer.pause()},resume(){let e=this;e.zwplayer&&e.zwplayer.resume()},getDuration(){let e=this;if(e.zwplayer)return e.zwplayer.getDuration()},getCurrentTime(){let e=this;if(e.zwplayer)return e.zwplayer.CurrentTime},seekTime(e){let t=this;t.zwplayer&&t.zwplayer.seekTime(e)},destroy(){let e=this;e.zwplayer&&e.zwplayer.destroy()},setplaystate(e){let t=this;t.zwplayer&&t.zwplayer.setplaystate(e)},setEnableDanmu(e){let t=this;t.zwplayer&&t.zwplayer.setEnableDanmu(e)},appendDanmu(e,t){let r=this;r.zwplayer&&r.zwplayer.appendDanmu(e,t)},setChapters(e){let t=this;t.zwplayer&&t.zwplayer.setChapters(e)},addSubtitle(e,t,r){let l=this;l.zwplayer&&l.zwplayer.addSubtitle(e,t,r)},removeSubtitle(){let e=this;e.zwplayer&&e.zwplayer.removeSubtitle()},buildDanmuControlbar(e,t){let r=this;r.zwplayer&&r.zwplayer.buildDanmuControlbar(e,t)},notifyResize(e,t){let r=this;r.zwplayer&&r.zwplayer.notifyResize(e,t)},setMute(e){let t=this;t.zwplayer&&t.zwplayer.setMuted(e)},setullscr(e){let t=this;t.zwplayer&&(t.is_fullscr=e,t.zwplayer.setFullscreen(e))},lightOff(){let e=this;e.zwplayer&&e.zwplayer.lightOff()},lightOn(){let e=this;e.zwplayer&&e.zwplayer.lightOn()},get CurrentTime(){let e=this;return e.zwplayer?e.zwplayer.CurrentTime:-1}};var b=m,g=b}(),l}()});
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["zwplayervue2"]=e():t["zwplayervue2"]=e()})("undefined"!==typeof self?self:this,function(){return function(){var t={34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},283:function(t,e,r){"use strict";var n=r(9504),o=r(9039),i=r(4901),u=r(9297),a=r(3724),s=r(350).CONFIGURABLE,l=r(3706),c=r(1181),f=c.enforce,p=c.get,y=String,d=Object.defineProperty,h=n("".slice),v=n("".replace),w=n([].join),b=a&&!o(function(){return 8!==d(function(){},"length",{value:8}).length}),m=String(String).split("String"),g=t.exports=function(t,e,r){"Symbol("===h(y(e),0,7)&&(e="["+v(y(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!u(t,"name")||s&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),b&&r&&u(r,"arity")&&t.length!==r.arity&&d(t,"length",{value:r.arity});try{r&&u(r,"constructor")&&r.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=f(t);return u(n,"source")||(n.source=w(m,"string"==typeof e?e:"")),t};Function.prototype.toString=g(function(){return i(this)&&p(this).source||l(this)},"toString")},350:function(t,e,r){"use strict";var n=r(3724),o=r(9297),i=Function.prototype,u=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),s=a&&"something"===function(){}.name,l=a&&(!n||n&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:s,CONFIGURABLE:l}},421:function(t){"use strict";t.exports={}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},655:function(t,e,r){"use strict";var n=r(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},741:function(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},757:function(t,e,r){"use strict";var n=r(7751),o=r(4901),i=r(1625),u=r(7040),a=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,a(t))}},1181:function(t,e,r){"use strict";var n,o,i,u=r(8622),a=r(4576),s=r(34),l=r(6699),c=r(9297),f=r(7629),p=r(6119),y=r(421),d="Object already initialized",h=a.TypeError,v=a.WeakMap,w=function(t){return i(t)?o(t):n(t,{})},b=function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw new h("Incompatible receiver, "+t+" required");return r}};if(u||f.state){var m=f.state||(f.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,n=function(t,e){if(m.has(t))throw new h(d);return e.facade=t,m.set(t,e),e},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var g=p("state");y[g]=!0,n=function(t,e){if(c(t,g))throw new h(d);return e.facade=t,l(t,g,e),e},o=function(t){return c(t,g)?t[g]:{}},i=function(t){return c(t,g)}}t.exports={set:n,get:o,has:i,enforce:w,getterFor:b}},1291:function(t,e,r){"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,r){"use strict";var n=r(9504),o=r(9297),i=r(5397),u=r(9617).indexOf,a=r(421),s=n([].push);t.exports=function(t,e){var r,n=i(t),l=0,c=[];for(r in n)!o(a,r)&&o(n,r)&&s(c,r);while(e.length>l)o(n,r=e[l++])&&(~u(c,r)||s(c,r));return c}},2140:function(t,e,r){"use strict";var n=r(8227),o=n("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},2195:function(t,e,r){"use strict";var n=r(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},2777:function(t,e,r){"use strict";var n=r(9565),o=r(34),i=r(757),u=r(5966),a=r(4270),s=r(8227),l=TypeError,c=s("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,s=u(t,c);if(s){if(void 0===e&&(e="default"),r=n(s,t,e),!o(r)||i(r))return r;throw new l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},2796:function(t,e,r){"use strict";var n=r(9039),o=r(4901),i=/#|\.prototype\./,u=function(t,e){var r=s[a(t)];return r===c||r!==l&&(o(e)?n(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=u.data={},l=u.NATIVE="N",c=u.POLYFILL="P";t.exports=u},2839:function(t,e,r){"use strict";var n=r(4576),o=n.navigator,i=o&&o.userAgent;t.exports=i?String(i):""},3110:function(t,e,r){"use strict";var n=r(6518),o=r(7751),i=r(8745),u=r(9565),a=r(9504),s=r(9039),l=r(4376),c=r(4901),f=r(5810),p=r(757),y=r(2195),d=r(655),h=r(7680),v=r(8235),w=r(3392),b=r(4495),m=r(7819),g=String,z=o("JSON","stringify"),x=a(/./.exec),S=a("".charAt),O=a("".charCodeAt),j=a("".replace),P=a("".slice),C=a([].push),E=a(1.1.toString),T=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,F=/^[\uDC00-\uDFFF]$/,D=w(),_=D.length,N=!b||s(function(){var t=o("Symbol")("stringify detection");return"[null]"!==z([t])||"{}"!==z({a:t})||"{}"!==z(Object(t))}),$=s(function(){return'"\\udf06\\ud834"'!==z("\udf06\ud834")||'"\\udead"'!==z("\udead")}),B=N?function(t,e){var r=h(arguments),n=I(e);if(c(n)||void 0!==t&&!p(t))return r[1]=function(t,e){if(c(n)&&(e=u(n,this,g(t),e)),!p(e))return e},i(z,null,r)}:z,A=function(t,e,r){var n=S(r,e-1),o=S(r,e+1);return x(k,t)&&!x(F,o)||x(F,t)&&!x(k,n)?"\\u"+E(O(t,0),16):t},I=function(t){if(c(t))return t;if(l(t)){for(var e=t.length,r=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?C(r,o):"number"!=typeof o&&"Number"!==y(o)&&"String"!==y(o)||C(r,d(o))}var i=r.length,u=!0;return function(t,e){if(u)return u=!1,e;if(l(this))return e;for(var n=0;n<i;n++)if(r[n]===t)return e}}};z&&n({target:"JSON",stat:!0,arity:3,forced:N||$||!m},{stringify:function(t,e,r){var n=I(e),o=[],i=B(t,function(t,e){var r=c(n)?u(n,this,g(t),e):e;return!m&&f(r)?D+(C(o,r.rawJSON)-1):r},r);if("string"!=typeof i)return i;if($&&(i=j(i,T,A)),m)return i;for(var a="",s=i.length,l=0;l<s;l++){var p=S(i,l);if('"'===p){var y=v(i,++l).end-1,d=P(i,l,y);a+=P(d,0,_)===D?o[P(d,_)]:'"'+d+'"',l=y}else a+=p}return a}})},3392:function(t,e,r){"use strict";var n=r(9504),o=0,i=Math.random(),u=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},3706:function(t,e,r){"use strict";var n=r(9504),o=r(4901),i=r(7629),u=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},3717:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},4055:function(t,e,r){"use strict";var n=r(4576),o=r(34),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},4270:function(t,e,r){"use strict";var n=r(9565),o=r(4901),i=r(34),u=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&o(r=t.toString)&&!i(a=n(r,t)))return a;if(o(r=t.valueOf)&&!i(a=n(r,t)))return a;if("string"!==e&&o(r=t.toString)&&!i(a=n(r,t)))return a;throw new u("Can't convert object to primitive value")}},4376:function(t,e,r){"use strict";var n=r(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4495:function(t,e,r){"use strict";var n=r(9519),o=r(9039),i=r(4576),u=i.String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!u(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4659:function(t,e,r){"use strict";var n=r(3724),o=r(4913),i=r(6980);t.exports=function(t,e,r){n?o.f(t,e,i(0,r)):t[e]=r}},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,r){"use strict";var n=r(3724),o=r(5917),i=r(8686),u=r(8551),a=r(6969),s=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",y="writable";e.f=n?i?function(t,e,r){if(u(t),e=a(e),u(r),"function"===typeof t&&"prototype"===e&&"value"in r&&y in r&&!r[y]){var n=c(t,e);n&&n[y]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:f in r?r[f]:n[f],writable:!1})}return l(t,e,r)}:l:function(t,e,r){if(u(t),e=a(e),u(r),o)try{return l(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new s("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},5031:function(t,e,r){"use strict";var n=r(7751),o=r(9504),i=r(8480),u=r(3717),a=r(8551),s=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(a(t)),r=u.f;return r?s(e,r(t)):e}},5234:function(t){const e=function(t,e,r){let n=document.getElementsByTagName("head");if(0==n.length){n=document.createElement("head");let t=document.getElementsByTagName("body");if(!(t.length>0))return alert("Invalid html document: no HEAD tag"),!1;t=t[0],document.insertBefore(n,t)}else{n=n[0];const e=n.childNodes;for(let n=0;n<e.length;n++){const o=e[n];if("SCRIPT"===o.nodeName.toUpperCase()&&o.id&&o.id==t){if("true"!=o.getAttribute("loadstate")){const e=function(){"true"!=o.getAttribute("loadstate")?setTimeout(e,50):"function"==typeof r&&r(t)};return setTimeout(e,50),!1}return"function"==typeof r&&r(t),!0}}}const o=document.createElement("script");return o.type="text/javascript",o.readyState?o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(o.onreadystatechange=null,o.setAttribute("loadstate","true"),"function"==typeof r&&r(t))}:o.onload=function(){o.setAttribute("loadstate","true"),o.setAttribute("charset","utf-8"),"function"==typeof r&&r(t)},o.id=t,o.src=e,n.appendChild(o),!1};t.exports.l=e},5397:function(t,e,r){"use strict";var n=r(7055),o=r(7750);t.exports=function(t){return n(o(t))}},5610:function(t,e,r){"use strict";var n=r(1291),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5810:function(t,e,r){"use strict";var n=r(34),o=r(1181).get;t.exports=function(t){if(!n(t))return!1;var e=o(t);return!!e&&"RawJSON"===e.type}},5917:function(t,e,r){"use strict";var n=r(3724),o=r(9039),i=r(4055);t.exports=!n&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,r){"use strict";var n=r(9306),o=r(4117);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},6119:function(t,e,r){"use strict";var n=r(5745),o=r(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},6198:function(t,e,r){"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},6395:function(t){"use strict";t.exports=!1},6518:function(t,e,r){"use strict";var n=r(4576),o=r(7347).f,i=r(6699),u=r(6840),a=r(9433),s=r(7740),l=r(2796);t.exports=function(t,e){var r,c,f,p,y,d,h=t.target,v=t.global,w=t.stat;if(c=v?n:w?n[h]||a(h,{}):n[h]&&n[h].prototype,c)for(f in e){if(y=e[f],t.dontCallGetSet?(d=o(c,f),p=d&&d.value):p=c[f],r=l(v?f:h+(w?".":"#")+f,t.forced),!r&&void 0!==p){if(typeof y==typeof p)continue;s(y,p)}(t.sham||p&&p.sham)&&i(y,"sham",!0),u(c,f,y,t)}}},6699:function(t,e,r){"use strict";var n=r(3724),o=r(4913),i=r(6980);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},6840:function(t,e,r){"use strict";var n=r(4901),o=r(4913),i=r(283),u=r(9433);t.exports=function(t,e,r,a){a||(a={});var s=a.enumerable,l=void 0!==a.name?a.name:e;if(n(r)&&i(r,l,a),a.global)s?t[e]=r:u(e,r);else{try{a.unsafe?t[e]&&(s=!0):delete t[e]}catch(c){}s?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},6955:function(t,e,r){"use strict";var n=r(2140),o=r(4901),i=r(2195),u=r(8227),a=u("toStringTag"),s=Object,l="Arguments"===i(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(r){}};t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=c(e=s(t),a))?r:l?i(e):"Object"===(n=i(e))&&o(e.callee)?"Arguments":n}},6969:function(t,e,r){"use strict";var n=r(2777),o=r(757);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(t,e,r){"use strict";var n=r(9504),o=r(9039),i=r(2195),u=Object,a=n("".split);t.exports=o(function(){return!u("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?a(t,""):u(t)}:u},7347:function(t,e,r){"use strict";var n=r(3724),o=r(9565),i=r(8773),u=r(6980),a=r(5397),s=r(6969),l=r(9297),c=r(5917),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=s(e),c)try{return f(t,e)}catch(r){}if(l(t,e))return u(!o(i.f,t,e),t[e])}},7629:function(t,e,r){"use strict";var n=r(6395),o=r(4576),i=r(9433),u="__core-js_shared__",a=t.exports=o[u]||i(u,{});(a.versions||(a.versions=[])).push({version:"3.48.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7680:function(t,e,r){"use strict";var n=r(9504);t.exports=n([].slice)},7740:function(t,e,r){"use strict";var n=r(9297),o=r(5031),i=r(7347),u=r(4913);t.exports=function(t,e,r){for(var a=o(e),s=u.f,l=i.f,c=0;c<a.length;c++){var f=a[c];n(t,f)||r&&n(r,f)||s(t,f,l(e,f))}}},7750:function(t,e,r){"use strict";var n=r(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},7751:function(t,e,r){"use strict";var n=r(4576),o=r(4901),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},7819:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t="9007199254740993",e=JSON.rawJSON(t);return!JSON.isRawJSON(e)||JSON.stringify(e)!==t})},8014:function(t,e,r){"use strict";var n=r(1291),o=Math.min;t.exports=function(t){var e=n(t);return e>0?o(e,9007199254740991):0}},8227:function(t,e,r){"use strict";var n=r(4576),o=r(5745),i=r(9297),u=r(3392),a=r(4495),s=r(7040),l=n.Symbol,c=o("wks"),f=s?l["for"]||l:l&&l.withoutSetter||u;t.exports=function(t){return i(c,t)||(c[t]=a&&i(l,t)?l[t]:f("Symbol."+t)),c[t]}},8235:function(t,e,r){"use strict";var n=r(9504),o=r(9297),i=SyntaxError,u=parseInt,a=String.fromCharCode,s=n("".charAt),l=n("".slice),c=n(/./.exec),f={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},p=/^[\da-f]{4}$/i,y=/^[\u0000-\u001F]$/;t.exports=function(t,e){var r=!0,n="";while(e<t.length){var d=s(t,e);if("\\"===d){var h=l(t,e,e+2);if(o(f,h))n+=f[h],e+=2;else{if("\\u"!==h)throw new i('Unknown escape sequence: "'+h+'"');e+=2;var v=l(t,e,e+4);if(!c(p,v))throw new i("Bad Unicode escape at: "+e);n+=a(u(v,16)),e+=4}}else{if('"'===d){r=!1,e++;break}if(c(y,d))throw new i("Bad control character in string literal at: "+e);n+=d,e++}}if(r)throw new i("Unterminated string at: "+e);return{value:n,end:e}}},8335:function(t,e,r){"use strict";r(9112)},8480:function(t,e,r){"use strict";var n=r(1828),o=r(8727),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},8551:function(t,e,r){"use strict";var n=r(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},8622:function(t,e,r){"use strict";var n=r(4576),o=r(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8686:function(t,e,r){"use strict";var n=r(3724),o=r(9039);t.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8745:function(t,e,r){"use strict";var n=r(616),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?u.bind(i):function(){return u.apply(i,arguments)})},8773:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},8981:function(t,e,r){"use strict";var n=r(7750),o=Object;t.exports=function(t){return o(n(t))}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9112:function(t,e,r){"use strict";var n=r(6518),o=r(3724),i=r(4576),u=r(7751),a=r(9504),s=r(9565),l=r(4901),c=r(34),f=r(4376),p=r(9297),y=r(655),d=r(6198),h=r(4659),v=r(9039),w=r(8235),b=r(4495),m=i.JSON,g=i.Number,z=i.SyntaxError,x=m&&m.parse,S=u("Object","keys"),O=Object.getOwnPropertyDescriptor,j=a("".charAt),P=a("".slice),C=a(/./.exec),E=a([].push),T=/^\d$/,k=/^[1-9]$/,F=/^[\d-]$/,D=/^[\t\n\r ]$/,_=0,N=1,$=function(t,e){t=y(t);var r=new R(t,0,""),n=r.parse(),o=n.value,i=r.skip(D,n.end);if(i<t.length)throw new z('Unexpected extra character: "'+j(t,i)+'" after the parsed data at: '+i);return l(e)?B({"":o},"",e,n):o},B=function(t,e,r,n){var o,i,u,a,l,y=t[e],h=n&&y===n.value,v=h&&"string"==typeof n.source?{source:n.source}:{};if(c(y)){var w=f(y),b=h?n.nodes:w?[]:{};if(w)for(o=b.length,u=d(y),a=0;a<u;a++)A(y,a,B(y,""+a,r,a<o?b[a]:void 0));else for(i=S(y),u=d(i),a=0;a<u;a++)l=i[a],A(y,l,B(y,l,r,p(b,l)?b[l]:void 0))}return s(r,t,e,y,v)},A=function(t,e,r){if(o){var n=O(t,e);if(n&&!n.configurable)return}void 0===r?delete t[e]:h(t,e,r)},I=function(t,e,r,n){this.value=t,this.end=e,this.source=r,this.nodes=n},R=function(t,e){this.source=t,this.index=e};R.prototype={fork:function(t){return new R(this.source,t)},parse:function(){var t=this.source,e=this.skip(D,this.index),r=this.fork(e),n=j(t,e);if(C(F,n))return r.number();switch(n){case"{":return r.object();case"[":return r.array();case'"':return r.string();case"t":return r.keyword(!0);case"f":return r.keyword(!1);case"n":return r.keyword(null)}throw new z('Unexpected character: "'+n+'" at: '+e)},node:function(t,e,r,n,o){return new I(e,n,t?null:P(this.source,r,n),o)},object:function(){var t=this.source,e=this.index+1,r=!1,n={},o={};while(e<t.length){if(e=this.until(['"',"}"],e),"}"===j(t,e)&&!r){e++;break}var i=this.fork(e).string(),u=i.value;e=i.end,e=this.until([":"],e)+1,e=this.skip(D,e),i=this.fork(e).parse(),h(o,u,i),h(n,u,i.value),e=this.until([",","}"],i.end);var a=j(t,e);if(","===a)r=!0,e++;else if("}"===a){e++;break}}return this.node(N,n,this.index,e,o)},array:function(){var t=this.source,e=this.index+1,r=!1,n=[],o=[];while(e<t.length){if(e=this.skip(D,e),"]"===j(t,e)&&!r){e++;break}var i=this.fork(e).parse();if(E(o,i),E(n,i.value),e=this.until([",","]"],i.end),","===j(t,e))r=!0,e++;else if("]"===j(t,e)){e++;break}}return this.node(N,n,this.index,e,o)},string:function(){var t=this.index,e=w(this.source,this.index+1);return this.node(_,e.value,t,e.end)},number:function(){var t=this.source,e=this.index,r=e;if("-"===j(t,r)&&r++,"0"===j(t,r))r++;else{if(!C(k,j(t,r)))throw new z("Failed to parse number at: "+r);r=this.skip(T,r+1)}if("."===j(t,r)&&(r=this.skip(T,r+1)),"e"===j(t,r)||"E"===j(t,r)){r++,"+"!==j(t,r)&&"-"!==j(t,r)||r++;var n=r;if(r=this.skip(T,r),n===r)throw new z("Failed to parse number's exponent value at: "+r)}return this.node(_,g(P(t,e,r)),e,r)},keyword:function(t){var e=""+t,r=this.index,n=r+e.length;if(P(this.source,r,n)!==e)throw new z("Failed to parse value at: "+r);return this.node(_,t,r,n)},skip:function(t,e){for(var r=this.source;e<r.length;e++)if(!C(t,j(r,e)))break;return e},until:function(t,e){e=this.skip(D,e);for(var r=j(this.source,e),n=0;n<t.length;n++)if(t[n]===r)return e;throw new z('Unexpected character: "'+r+'" at: '+e)}};var M=v(function(){var t,e="9007199254740993";return x(e,function(e,r,n){t=n.source}),t!==e}),J=b&&!v(function(){return 1/x("-0 \t")!==-1/0});n({target:"JSON",stat:!0,forced:M},{parse:function(t,e){return J&&!l(e)?x(t):$(t,e)}})},9297:function(t,e,r){"use strict";var n=r(9504),o=r(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},9306:function(t,e,r){"use strict";var n=r(4901),o=r(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},9433:function(t,e,r){"use strict";var n=r(4576),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9504:function(t,e,r){"use strict";var n=r(616),o=Function.prototype,i=o.call,u=n&&o.bind.bind(i,i);t.exports=n?u:function(t){return function(){return i.apply(t,arguments)}}},9519:function(t,e,r){"use strict";var n,o,i=r(4576),u=r(2839),a=i.process,s=i.Deno,l=a&&a.versions||s&&s.version,c=l&&l.v8;c&&(n=c.split("."),o=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&u&&(n=u.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/),n&&(o=+n[1]))),t.exports=o},9565:function(t,e,r){"use strict";var n=r(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},9617:function(t,e,r){"use strict";var n=r(5397),o=r(5610),i=r(6198),u=function(t){return function(e,r,u){var a=n(e),s=i(a);if(0===s)return!t&&-1;var l,c=o(u,s);if(t&&r!==r){while(s>c)if(l=a[c++],l!==l)return!0}else for(;s>c;c++)if((t||c in a)&&a[c]===r)return t||c||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}!function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}();var n={};return function(){"use strict";if(r.r(n),r.d(n,{Player:function(){return b},default:function(){return g},zwplayer:function(){return d}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(r.p=e[1])}r(3110),r(8335);var o=r(5234);const i="zwplayer/zwplayer.js?v=3.6",u={isLive:"boolean",useOldFlv:"boolean",useFlv:"boolean",streamtype:"string",hasAudio:"boolean",hasVideo:"boolean",xmc_url:"string",fixedControlbar:"boolean",nativecontrols:"boolean",infoButton:"boolean",speedButton:"boolean",optionButton:"boolean",snapshotButton:"boolean",chapterButton:"boolean",enableDanmu:"boolean",useProgressTooltip:"boolean",hidePlayBtn:"boolean",disablePlayBtn:"boolean",disableSeek:"boolean",disableFullscreenWin:"boolean",disablePicInPic:"boolean",disableVolumeControl:"boolean",lostFocusPause:"boolean",autoSmallWindow:"boolean",localPlayback:"boolean",recordButton:"boolean",segmentButton:"boolean",disableMutedConfirm:"boolean",keepAudioWindow:"boolean",lang:"string",thumbnails:"object",sendDanmu:"function",danmuBarId:"string",fluid:"boolean",poster:"string",logo:"object|string",ratio:"string|number",width:"string|number",height:"string|number"};var a,s,l={name:"ZwPlayer",data(){return{zwplayer:null,nodename:"ZwPlayer"}},props:{zwplayerlib:String,murl:String,nodeid:String,muted:Boolean,autoplay:{type:Boolean,default:!0},videoprop:Object,videostyle:String,reconnect:{type:Boolean,default:!0},controlbar:{type:Boolean,default:!0},useProgressTooltip:{type:Boolean,default:!0}},emits:["oneterror","onmediaevent","onready","onFileSelected","onFileLoaded"],methods:{play(t,e,r){let n=this;t||(t=this.murl),n.zwplayer&&n.zwplayer.play(t,e,r)},stop(){let t=this;t.zwplayer&&t.zwplayer.stop()},pause(){let t=this;t.zwplayer&&t.zwplayer.pause()},resume(){let t=this;t.zwplayer&&t.zwplayer.resume()},getDuration(){let t=this;if(t.zwplayer)return t.zwplayer.getDuration()},getCurrentTime(){let t=this;if(t.zwplayer)return t.zwplayer.CurrentTime},seekTime(t){let e=this;e.zwplayer&&e.zwplayer.seekTime(t)},destroy(){let t=this;t.zwplayer&&t.zwplayer.destroy()},setplaystate(t){let e=this;e.zwplayer&&e.zwplayer.setplaystate(t)},setEnableDanmu(t){let e=this;e.zwplayer&&e.zwplayer.setEnableDanmu(t)},appendDanmu(t,e){let r=this;r.zwplayer&&r.zwplayer.appendDanmu(t,e)},setChapters(t){let e=this;e.zwplayer&&e.zwplayer.setChapters(t)},addSubtitle(t,e,r){let n=this;n.zwplayer&&n.zwplayer.addSubtitle(t,e,r)},removeSubtitle(){let t=this;t.zwplayer&&t.zwplayer.removeSubtitle()},buildDanmuControlbar(t,e){let r=this;r.zwplayer&&r.zwplayer.buildDanmuControlbar(t,e)},notifyResize(t,e){let r=this;r.zwplayer&&r.zwplayer.notifyResize(t,e)},setMute(t){let e=this;e.zwplayer&&e.zwplayer.setMuted(t)},setullscr(t){let e=this;e.zwplayer&&(e.is_fullscr=t,e.zwplayer.setFullscreen(t))}},computed:{CurrentTime:function(){let t=this;return t.zwplayer?t.zwplayer.CurrentTime:-1}},render(t){let e;if(this.nodeid)e=this.nodeid;else{let t=(new Date).getTime();window.nextZWPlayerId?window.nextZWPlayerId++:window.nextZWPlayerId=1e3,e="zwplayer-"+window.nextZWPlayerId+"-"+t}let r=t("div",{class:{"zwplayer-vue":!0},attrs:{id:e}},[]);if(r){let t=this;t.playerid=e}return this.zwplayer&&this.murl!==this.old_murl&&(this.zwplayer.play(this.murl),this.old_murl=this.murl),r},mounted(){let t,e=this;t=e.zwplayerlib?e.zwplayerlib:i,e.rootElm=document.getElementById(e.playerid),e.rootElm&&(e.rootElm.style.width="100%",e.rootElm.style.height="100%",e.rootElm.style.margin="0",e.rootElm.style.padding="0"),(0,o.l)("zwplayer-core",t,function(t){let r="";e.murl?r=e.murl:e.videoprop&&"undefined"!==typeof e.videoprop.url&&(r=e.videoprop.url);let n="width:100%;height:100%;";e.videoprop&&"undefined"!==typeof e.videoprop.videostyle&&(n=e.videoprop.videostyle);let o={url:r,playerElm:e.rootElm,videostyle:n,reconnect:e.reconnect,autoplay:e.autoplay,muted:e.muted,controlbar:e.controlbar,useProgressTooltip:e.useProgressTooltip,onready:function(){e.$emit("onready",this)},onnetclose:function(){return e.$emit("onnetclose",this),!0},onFileSelected:function(t){e.$emit("onFileSelected",t,this)},onFileLoaded:function(t){e.$emit("onFileLoaded",t,this)},onneterror:function(){e.$emit("onneterror",this)},onmediaevent:function(t){e.$emit("onmediaevent",t,this)}},i=u;const a=function(t,e){if(e.indexOf("|")>0){var r=e.split("|");for(let e=0;e<r.length;e++)if(t===r[e])return!0;return!1}return t===e};for(let u in e.$attrs){var s=typeof e.$attrs[u];u in i&&a(s,i[u])&&(o[u]="object"===s?JSON.parse(JSON.stringify(e.$attrs[u])):e.$attrs[u])}e.zwplayer=new window.ZWPlayer(o),o.danmuBarId&&e.zwplayer.buildDanmuControlbar(o.danmuBarId,"vue-zwp-danmubar"),e.old_murl=r})},beforeDestroy(){let t=this;t.zwplayer&&t.zwplayer.stop()},destroyed(){let t=this;t.zwplayer&&(t.zwplayer.destroy(),delete t.zwplayer)}},c=l;function f(t,e,r,n,o,i,u,a){var s,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=r,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),u?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(u)},l._ssrRegister=s):o&&(s=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(l.functional){l._injectStyles=s;var c=l.render;l.render=function(t,e){return s.call(e),c(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:l}}var p=f(c,a,s,!1,null,null,null),y=p.exports;y.install=function(t){t.component(y.name,y),t.component("zero-web-player",y),t.component("zero-player",y),t.component("ZPlayer",y)};var d=y;const h=[d],v={install:t=>{h.forEach(e=>{e.install(t)})}};"undefined"!==typeof window&&window.Vue&&v.install(window.Vue);const w="zwplayer/zwplayer.js?v=3.6",b=function(t){this.zwplayer=null;const e=this;(0,o.l)("zwplayer-core",w,function(r){r?e.zwplayer=new window.ZWPlayer(t):console.log("Load zwplayer library failed.")})};b.prototype={play(t,e,r){let n=this;t||(t=this.murl),n.zwplayer&&n.zwplayer.play(t,e,r)},stop(){let t=this;t.zwplayer&&t.zwplayer.stop()},pause(){let t=this;t.zwplayer&&t.zwplayer.pause()},resume(){let t=this;t.zwplayer&&t.zwplayer.resume()},getDuration(){let t=this;if(t.zwplayer)return t.zwplayer.getDuration()},getCurrentTime(){let t=this;if(t.zwplayer)return t.zwplayer.CurrentTime},seekTime(t){let e=this;e.zwplayer&&e.zwplayer.seekTime(t)},destroy(){let t=this;t.zwplayer&&t.zwplayer.destroy()},setplaystate(t){let e=this;e.zwplayer&&e.zwplayer.setplaystate(t)},setEnableDanmu(t){let e=this;e.zwplayer&&e.zwplayer.setEnableDanmu(t)},appendDanmu(t,e){let r=this;r.zwplayer&&r.zwplayer.appendDanmu(t,e)},setChapters(t){let e=this;e.zwplayer&&e.zwplayer.setChapters(t)},addSubtitle(t,e,r){let n=this;n.zwplayer&&n.zwplayer.addSubtitle(t,e,r)},loadSubtitle(t,e,r){let n=this;n.zwplayer&&n.zwplayer.loadSubtitle(t,e,r)},removeSubtitle(){let t=this;t.zwplayer&&t.zwplayer.removeSubtitle()},buildDanmuControlbar(t,e){let r=this;r.zwplayer&&r.zwplayer.buildDanmuControlbar(t,e)},notifyResize(t,e){let r=this;r.zwplayer&&r.zwplayer.notifyResize(t,e)},setMute(t){let e=this;e.zwplayer&&e.zwplayer.setMuted(t)},setullscr(t){let e=this;e.zwplayer&&(e.is_fullscr=t,e.zwplayer.setFullscreen(t))},lightOff(){let t=this;t.zwplayer&&t.zwplayer.lightOff()},lightOn(){let t=this;t.zwplayer&&t.zwplayer.lightOn()},get CurrentTime(){let t=this;return t.zwplayer?t.zwplayer.CurrentTime:-1}};var m=v,g=m}(),n}()});
2
2
  //# sourceMappingURL=zwplayervue2.umd.min.js.map
package/npm-scripts.mjs CHANGED
@@ -33,6 +33,7 @@ async function run()
33
33
  {
34
34
  logInfo('zwplayer run script postinstall...');
35
35
 
36
+ const project_path = path.normalize(`${CURRENT_DIRECTORY}/../..`);
36
37
  const zwplayerLibDir = `${CURRENT_DIRECTORY}/zwplayerlib/zwplayer`;
37
38
  const zwplayer_js = `${zwplayerLibDir}/zwplayer.js`;
38
39
 
@@ -40,38 +41,17 @@ async function run()
40
41
 
41
42
  if (!fs.existsSync(zwplayer_js_filepath))
42
43
  {
43
- logError(`zwplayer library file "${zwplayer_js}" does not exist.`);
44
+ logError(`zwplayer library file "${zwplayer_js}" does not exist.`);
44
45
  zwplayer_library_install();
45
46
  return;
46
47
  }
47
48
 
48
- const project_path = path.normalize(`${CURRENT_DIRECTORY}/../..`);
49
- const project_package = path.normalize(`${project_path}/package.json`);
50
-
51
- if (!fs.existsSync(project_package))
52
- {
53
- logError(`project package.json ${project_package} does not exist.`);
54
- please_run_vue_crate_project();
55
- return;
56
- }
57
-
58
- const vue_config_js = path.normalize(`${project_path}/vue.config.js`);
59
- const vite_config_js = path.normalize(`${project_path}/vite.config.js`);
60
-
61
- if (!fs.existsSync(vue_config_js) && !fs.existsSync(vite_config_js))
62
- {
63
- logError(`vue config vue.config.js or vite.config.js does not exist.`);
64
- please_run_vue_crate_project();
65
- return;
66
- }
67
-
68
49
  const public_path = path.normalize(`${project_path}/public`);
69
-
50
+
70
51
  if (!fs.existsSync(public_path))
71
52
  {
72
- logError(`vue public path ${public_path} does not exist.`);
73
- please_run_vue_crate_project();
74
- return;
53
+ logInfo(`vue public path ${public_path} does not exist, creating it.`);
54
+ ensureDirSync(public_path);
75
55
  }
76
56
 
77
57
  // copy files
@@ -188,4 +168,4 @@ async function copyDirectory(srcPath, desPath)
188
168
  } catch (error) {
189
169
  console.error(`Error copying directory: ${error.message}`);
190
170
  }
191
- }
171
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zwplayer-vue2x",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "A fully functional and lightweight free open-source web player",
5
5
  "main": "lib/zwplayervue2.umd.min.js",
6
6
  "keyword": "zwplayervue2, zwplayer-vue2x, zero-web-player",
package/sources/index.js CHANGED
@@ -1,29 +1,29 @@
1
- // 引入该目录下所有的组件
1
+ // 引入该目录下所有的组件
2
2
  import zwplayer from "./vueplayer/index.js";
3
- import { zwplayer_loadjs } from "./vueplayer/src/loadjs.js"
4
-
5
- const components = [
6
- zwplayer
7
- ]
8
-
9
- const ZwModule = {}
3
+ import { zwplayer_loadjs } from "./vueplayer/src/loadjs.js"
4
+
5
+ const components = [
6
+ zwplayer
7
+ ]
8
+
9
+ const ZwModule = {}
10
10
  ZwModule.install = Vue => {
11
- components.forEach(component => {
12
- component.install(Vue);
13
- })
14
- }
15
-
11
+ components.forEach(component => {
12
+ component.install(Vue);
13
+ })
14
+ }
15
+
16
16
  if (typeof window !== 'undefined' && window.Vue) {
17
- ZwModule.install(window.Vue)
18
- }
17
+ ZwModule.install(window.Vue)
18
+ }
19
19
 
20
20
  const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
21
21
 
22
22
  const Player = function(param) {
23
23
  this.zwplayer = null;
24
-
24
+
25
25
  const that = this;
26
-
26
+
27
27
  zwplayer_loadjs('zwplayer-core', zwplayer_js_def, function(jsid) {
28
28
  if (jsid) {
29
29
  that.zwplayer = new window.ZWPlayer(param);
@@ -34,22 +34,22 @@ const Player = function(param) {
34
34
  });
35
35
  };
36
36
 
37
- Player.prototype = {
38
- play(url, isLive, useOldFlv) {
39
- let vm = this;
40
-
41
- if (!url)
42
- url = this.murl;
43
- if (!vm.zwplayer)
44
- return;
45
-
37
+ Player.prototype = {
38
+ play(url, isLive, useOldFlv) {
39
+ let vm = this;
40
+
41
+ if (!url)
42
+ url = this.murl;
43
+ if (!vm.zwplayer)
44
+ return;
45
+
46
46
  vm.zwplayer.play(url, isLive, useOldFlv);
47
- },
48
- stop() {
49
- let vm = this;
50
-
51
- if (vm.zwplayer) {
52
- vm.zwplayer.stop();
47
+ },
48
+ stop() {
49
+ let vm = this;
50
+
51
+ if (vm.zwplayer) {
52
+ vm.zwplayer.stop();
53
53
  }
54
54
  },
55
55
  pause() {
@@ -72,7 +72,7 @@ Player.prototype = {
72
72
  }
73
73
  return undefined;
74
74
  },
75
-
75
+
76
76
  getCurrentTime() {
77
77
  let vm = this;
78
78
  if (vm.zwplayer) {
@@ -80,122 +80,129 @@ Player.prototype = {
80
80
  }
81
81
  return undefined;
82
82
  },
83
-
83
+
84
84
  seekTime(time) {
85
85
  let vm = this;
86
-
86
+
87
87
  if (vm.zwplayer) {
88
88
  vm.zwplayer.seekTime(time);
89
89
  }
90
90
  },
91
91
  destroy() {
92
92
  let vm = this;
93
-
93
+
94
94
  if (vm.zwplayer) {
95
95
  vm.zwplayer.destroy();
96
96
  }
97
97
  },
98
98
  setplaystate(bPlaying) {
99
99
  let vm = this;
100
-
100
+
101
101
  if (vm.zwplayer) {
102
102
  vm.zwplayer.setplaystate(bPlaying);
103
103
  }
104
104
  },
105
-
105
+
106
106
  setEnableDanmu(bEnable) {
107
107
  let vm = this;
108
-
108
+
109
109
  if (vm.zwplayer) {
110
110
  vm.zwplayer.setEnableDanmu(bEnable);
111
111
  }
112
112
  },
113
-
113
+
114
114
  appendDanmu(msgObj, setting) {
115
115
  let vm = this;
116
-
116
+
117
117
  if (vm.zwplayer) {
118
118
  vm.zwplayer.appendDanmu(msgObj, setting);
119
119
  }
120
120
  },
121
-
121
+
122
122
  setChapters(chapters) {
123
123
  let vm = this;
124
-
124
+
125
125
  if (vm.zwplayer) {
126
126
  vm.zwplayer.setChapters(chapters);
127
127
  }
128
128
  },
129
-
129
+
130
130
  addSubtitle(subtitleUrl, pos, title) {
131
131
  let vm = this;
132
-
132
+
133
133
  if (vm.zwplayer) {
134
134
  vm.zwplayer.addSubtitle(subtitleUrl, pos, title);
135
135
  }
136
136
  },
137
-
137
+ loadSubtitle(subtitleUrl, pos, title) {
138
+ //console.log('loadSubtitle')
139
+ let vm = this;
140
+
141
+ if (vm.zwplayer) {
142
+ vm.zwplayer.loadSubtitle(subtitleUrl, pos, title);
143
+ }
144
+ },
138
145
  removeSubtitle() {
139
146
  let vm = this;
140
-
147
+
141
148
  if (vm.zwplayer) {
142
149
  vm.zwplayer.removeSubtitle();
143
150
  }
144
151
  },
145
-
152
+
146
153
  buildDanmuControlbar(parentId, className) {
147
154
  let vm = this;
148
-
155
+
149
156
  if (vm.zwplayer) {
150
157
  vm.zwplayer.buildDanmuControlbar(parentId, className);
151
158
  }
152
159
  },
153
-
160
+
154
161
  notifyResize(width, height) {
155
162
  let vm = this;
156
-
163
+
157
164
  if (vm.zwplayer) {
158
165
  vm.zwplayer.notifyResize(width, height);
159
166
  }
160
167
  },
161
-
162
- setMute(bMute) {
163
- let vm = this;
164
-
165
- if (vm.zwplayer) {
166
- vm.zwplayer.setMuted(bMute);
168
+
169
+ setMute(bMute) {
170
+ let vm = this;
171
+
172
+ if (vm.zwplayer) {
173
+ vm.zwplayer.setMuted(bMute);
167
174
  }
168
- },
169
-
170
- setullscr(bFullScr) {
171
- let vm = this;
172
-
173
- if (vm.zwplayer) {
174
- vm.is_fullscr = bFullScr;
175
- vm.zwplayer.setFullscreen(bFullScr);
175
+ },
176
+
177
+ setullscr(bFullScr) {
178
+ let vm = this;
179
+
180
+ if (vm.zwplayer) {
181
+ vm.is_fullscr = bFullScr;
182
+ vm.zwplayer.setFullscreen(bFullScr);
176
183
  }
177
184
  },
178
-
185
+
179
186
  lightOff() {
180
187
  let vm = this;
181
188
  if (vm.zwplayer) {
182
189
  vm.zwplayer.lightOff();
183
190
  }
184
191
  },
185
-
192
+
186
193
  lightOn() {
187
194
  let vm = this;
188
195
  if (vm.zwplayer) {
189
196
  vm.zwplayer.lightOn();
190
197
  }
191
198
  },
192
-
199
+
193
200
  get CurrentTime () {
194
201
  let vm = this;
195
202
  if (vm.zwplayer) {
196
203
  return vm.zwplayer.CurrentTime;
197
204
  }
198
-
205
+
199
206
  return -1;
200
207
  }
201
208
  };
@@ -204,5 +211,5 @@ export {
204
211
  zwplayer,
205
212
  Player
206
213
  };
207
-
214
+
208
215
  export default ZwModule;