zwplayer-vue2x 1.0.9 → 1.0.11
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.
- package/lib/zwplayervue2.common.js +187 -291
- package/lib/zwplayervue2.umd.js +186 -290
- package/lib/zwplayervue2.umd.min.js +1 -1
- package/package.json +1 -1
- package/sources/index.js +5 -5
|
@@ -1,34 +1,149 @@
|
|
|
1
1
|
/******/ (function() { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
5
|
-
/***/ (function(module
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
__webpack_require__.a(module, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {
|
|
9
|
-
__webpack_require__.r(__webpack_exports__);
|
|
10
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
-
/* harmony export */ Player: function() { return /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_1__.ai; },
|
|
12
|
-
/* harmony export */ zwplayer: function() { return /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_1__.j6; }
|
|
13
|
-
/* harmony export */ });
|
|
14
|
-
/* harmony import */ var _setPublicPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(860);
|
|
15
|
-
/* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
|
|
16
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_entry__WEBPACK_IMPORTED_MODULE_1__]);
|
|
17
|
-
_entry__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
18
|
-
|
|
4
|
+
/***/ 709:
|
|
5
|
+
/***/ (function(module) {
|
|
19
6
|
|
|
20
|
-
|
|
7
|
+
// zwplayer tools
|
|
21
8
|
|
|
9
|
+
const zwplayer_loadjs = function (id, url, cb) {
|
|
10
|
+
let headNode = document.getElementsByTagName("head");
|
|
11
|
+
if (headNode.length == 0) {
|
|
12
|
+
headNode = document.createElement("head");
|
|
13
|
+
let body = document.getElementsByTagName("body");
|
|
14
|
+
if (body.length > 0) {
|
|
15
|
+
body = body[0];
|
|
16
|
+
document.insertBefore(headNode, body);
|
|
17
|
+
} else {
|
|
18
|
+
alert('Invalid html document: no HEAD tag');
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
headNode = headNode[0];
|
|
23
|
+
const nodes = headNode.childNodes;
|
|
24
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
25
|
+
const node = nodes[i];
|
|
26
|
+
if (node.nodeName.toUpperCase() === 'SCRIPT') {
|
|
27
|
+
if (node.id && node.id == id) {
|
|
28
|
+
if (node.getAttribute('loadstate') != 'true') {
|
|
29
|
+
const checkLoad = function () {
|
|
30
|
+
if (node.getAttribute('loadstate') != 'true') {
|
|
31
|
+
setTimeout(checkLoad, 50);
|
|
32
|
+
} else {
|
|
33
|
+
if (typeof cb == 'function') cb(id);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
setTimeout(checkLoad, 50);
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (typeof cb == 'function') cb(id);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const script = document.createElement("script");
|
|
46
|
+
script.type = "text/javascript";
|
|
47
|
+
if (script.readyState) {
|
|
48
|
+
// IE
|
|
49
|
+
script.onreadystatechange = function () {
|
|
50
|
+
if (script.readyState == "loaded" || script.readyState == "complete") {
|
|
51
|
+
script.onreadystatechange = null;
|
|
52
|
+
script.setAttribute('loadstate', 'true');
|
|
53
|
+
if (typeof cb == 'function') cb(id);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
} else {
|
|
57
|
+
script.onload = function () {
|
|
58
|
+
script.setAttribute('loadstate', 'true');
|
|
59
|
+
script.setAttribute('charset', 'utf-8');
|
|
60
|
+
if (typeof cb == 'function') cb(id);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
script.id = id;
|
|
64
|
+
script.src = url;
|
|
65
|
+
headNode.appendChild(script);
|
|
66
|
+
return false;
|
|
67
|
+
};
|
|
68
|
+
module.exports.l = zwplayer_loadjs;
|
|
22
69
|
|
|
23
|
-
|
|
24
|
-
} catch(e) { __webpack_async_result__(e); } });
|
|
70
|
+
/***/ })
|
|
25
71
|
|
|
26
|
-
|
|
72
|
+
/******/ });
|
|
73
|
+
/************************************************************************/
|
|
74
|
+
/******/ // The module cache
|
|
75
|
+
/******/ var __webpack_module_cache__ = {};
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // The require function
|
|
78
|
+
/******/ function __webpack_require__(moduleId) {
|
|
79
|
+
/******/ // Check if module is in cache
|
|
80
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
81
|
+
/******/ if (cachedModule !== undefined) {
|
|
82
|
+
/******/ return cachedModule.exports;
|
|
83
|
+
/******/ }
|
|
84
|
+
/******/ // Create a new module (and put it into the cache)
|
|
85
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
86
|
+
/******/ // no module.id needed
|
|
87
|
+
/******/ // no module.loaded needed
|
|
88
|
+
/******/ exports: {}
|
|
89
|
+
/******/ };
|
|
90
|
+
/******/
|
|
91
|
+
/******/ // Execute the module function
|
|
92
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
93
|
+
/******/
|
|
94
|
+
/******/ // Return the exports of the module
|
|
95
|
+
/******/ return module.exports;
|
|
96
|
+
/******/ }
|
|
97
|
+
/******/
|
|
98
|
+
/************************************************************************/
|
|
99
|
+
/******/ /* webpack/runtime/define property getters */
|
|
100
|
+
/******/ !function() {
|
|
101
|
+
/******/ // define getter functions for harmony exports
|
|
102
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
103
|
+
/******/ for(var key in definition) {
|
|
104
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
105
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
106
|
+
/******/ }
|
|
107
|
+
/******/ }
|
|
108
|
+
/******/ };
|
|
109
|
+
/******/ }();
|
|
110
|
+
/******/
|
|
111
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
112
|
+
/******/ !function() {
|
|
113
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
114
|
+
/******/ }();
|
|
115
|
+
/******/
|
|
116
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
117
|
+
/******/ !function() {
|
|
118
|
+
/******/ // define __esModule on exports
|
|
119
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
120
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
121
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
122
|
+
/******/ }
|
|
123
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
124
|
+
/******/ };
|
|
125
|
+
/******/ }();
|
|
126
|
+
/******/
|
|
127
|
+
/******/ /* webpack/runtime/publicPath */
|
|
128
|
+
/******/ !function() {
|
|
129
|
+
/******/ __webpack_require__.p = "";
|
|
130
|
+
/******/ }();
|
|
131
|
+
/******/
|
|
132
|
+
/************************************************************************/
|
|
133
|
+
var __webpack_exports__ = {};
|
|
134
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
135
|
+
!function() {
|
|
136
|
+
"use strict";
|
|
137
|
+
// ESM COMPAT FLAG
|
|
138
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
139
|
|
|
28
|
-
|
|
29
|
-
|
|
140
|
+
// EXPORTS
|
|
141
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
142
|
+
"default": function() { return /* binding */ entry_lib; },
|
|
143
|
+
zwplayer: function() { return /* reexport */ vueplayer; }
|
|
144
|
+
});
|
|
30
145
|
|
|
31
|
-
|
|
146
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
32
147
|
/* eslint-disable no-var */
|
|
33
148
|
// This file is imported into lib/wc client bundles.
|
|
34
149
|
|
|
@@ -43,71 +158,7 @@ if (typeof window !== 'undefined') {
|
|
|
43
158
|
}
|
|
44
159
|
|
|
45
160
|
// Indicate to webpack that this file can be concatenated
|
|
46
|
-
/*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/***/ }),
|
|
50
|
-
|
|
51
|
-
/***/ 211:
|
|
52
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
53
|
-
|
|
54
|
-
"use strict";
|
|
55
|
-
__webpack_require__.a(module, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {
|
|
56
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
57
|
-
/* harmony export */ ai: function() { return /* binding */ Player; },
|
|
58
|
-
/* harmony export */ j6: function() { return /* reexport safe */ _vueplayer_index_js__WEBPACK_IMPORTED_MODULE_0__.A; }
|
|
59
|
-
/* harmony export */ });
|
|
60
|
-
/* harmony import */ var _vueplayer_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(665);
|
|
61
|
-
/* harmony import */ var _vueplayer_src_loadjs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(709);
|
|
62
|
-
// 引入该目录下所有的组件
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const components = [_vueplayer_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A];
|
|
66
|
-
const ZwModule = {};
|
|
67
|
-
ZwModule.install = Vue => {
|
|
68
|
-
components.forEach(component => {
|
|
69
|
-
component.install(Vue);
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
if (typeof window !== 'undefined' && window.Vue) {
|
|
73
|
-
ZwModule.install(window.Vue);
|
|
74
|
-
}
|
|
75
|
-
const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
76
|
-
let Player;
|
|
77
|
-
if (typeof window.ZWPlayer === 'undefined') {
|
|
78
|
-
const loadTask = new Promise(function (resolve, reject) {
|
|
79
|
-
(0,_vueplayer_src_loadjs_js__WEBPACK_IMPORTED_MODULE_1__/* .zwplayer_loadjs */ .l)('zwplayer-core', zwplayer_js_def, function (jsid) {
|
|
80
|
-
if (jsid) {
|
|
81
|
-
resolve(window.ZWPlayer);
|
|
82
|
-
} else {
|
|
83
|
-
reject('Load zwplayer library failed.');
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
try {
|
|
88
|
-
Player = await loadTask;
|
|
89
|
-
} catch (e) {
|
|
90
|
-
alert(e.msg);
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
Player = window.ZWPlayer;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* harmony default export */ __webpack_exports__.Ay = (ZwModule);
|
|
97
|
-
__webpack_async_result__();
|
|
98
|
-
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
99
|
-
|
|
100
|
-
/***/ }),
|
|
101
|
-
|
|
102
|
-
/***/ 665:
|
|
103
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
104
|
-
|
|
105
|
-
"use strict";
|
|
106
|
-
|
|
107
|
-
// EXPORTS
|
|
108
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
109
|
-
A: function() { return /* binding */ vueplayer; }
|
|
110
|
-
});
|
|
161
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
111
162
|
|
|
112
163
|
// EXTERNAL MODULE: ./sources/vueplayer/src/loadjs.js
|
|
113
164
|
var loadjs = __webpack_require__(709);
|
|
@@ -539,214 +590,59 @@ main.install = function (Vue) {
|
|
|
539
590
|
Vue.component('ZPlayer', main);
|
|
540
591
|
};
|
|
541
592
|
/* harmony default export */ var vueplayer = (main);
|
|
593
|
+
;// CONCATENATED MODULE: ./sources/index.js
|
|
594
|
+
// 引入该目录下所有的组件
|
|
542
595
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
/***/ 709:
|
|
546
|
-
/***/ (function(module) {
|
|
547
|
-
|
|
548
|
-
// zwplayer tools
|
|
596
|
+
// import { zwplayer_loadjs } from "./vueplayer/src/loadjs.js"
|
|
549
597
|
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
body = body[0];
|
|
557
|
-
document.insertBefore(headNode, body);
|
|
558
|
-
} else {
|
|
559
|
-
alert('Invalid html document: no HEAD tag');
|
|
560
|
-
return false;
|
|
561
|
-
}
|
|
562
|
-
} else {
|
|
563
|
-
headNode = headNode[0];
|
|
564
|
-
const nodes = headNode.childNodes;
|
|
565
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
566
|
-
const node = nodes[i];
|
|
567
|
-
if (node.nodeName.toUpperCase() === 'SCRIPT') {
|
|
568
|
-
if (node.id && node.id == id) {
|
|
569
|
-
if (node.getAttribute('loadstate') != 'true') {
|
|
570
|
-
const checkLoad = function () {
|
|
571
|
-
if (node.getAttribute('loadstate') != 'true') {
|
|
572
|
-
setTimeout(checkLoad, 50);
|
|
573
|
-
} else {
|
|
574
|
-
if (typeof cb == 'function') cb(id);
|
|
575
|
-
}
|
|
576
|
-
};
|
|
577
|
-
setTimeout(checkLoad, 50);
|
|
578
|
-
return false;
|
|
579
|
-
}
|
|
580
|
-
if (typeof cb == 'function') cb(id);
|
|
581
|
-
return true;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
const script = document.createElement("script");
|
|
587
|
-
script.type = "text/javascript";
|
|
588
|
-
if (script.readyState) {
|
|
589
|
-
// IE
|
|
590
|
-
script.onreadystatechange = function () {
|
|
591
|
-
if (script.readyState == "loaded" || script.readyState == "complete") {
|
|
592
|
-
script.onreadystatechange = null;
|
|
593
|
-
script.setAttribute('loadstate', 'true');
|
|
594
|
-
if (typeof cb == 'function') cb(id);
|
|
595
|
-
}
|
|
596
|
-
};
|
|
597
|
-
} else {
|
|
598
|
-
script.onload = function () {
|
|
599
|
-
script.setAttribute('loadstate', 'true');
|
|
600
|
-
script.setAttribute('charset', 'utf-8');
|
|
601
|
-
if (typeof cb == 'function') cb(id);
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
|
-
script.id = id;
|
|
605
|
-
script.src = url;
|
|
606
|
-
headNode.appendChild(script);
|
|
607
|
-
return false;
|
|
598
|
+
const components = [vueplayer];
|
|
599
|
+
const ZwModule = {};
|
|
600
|
+
ZwModule.install = Vue => {
|
|
601
|
+
components.forEach(component => {
|
|
602
|
+
component.install(Vue);
|
|
603
|
+
});
|
|
608
604
|
};
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
605
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
606
|
+
ZwModule.install(window.Vue);
|
|
607
|
+
}
|
|
612
608
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
/******/ }
|
|
651
|
-
/******/ }
|
|
652
|
-
/******/ var wrapDeps = function(deps) { return deps.map(function(dep) {
|
|
653
|
-
/******/ if(dep !== null && typeof dep === "object") {
|
|
654
|
-
/******/ if(dep[webpackQueues]) return dep;
|
|
655
|
-
/******/ if(dep.then) {
|
|
656
|
-
/******/ var queue = [];
|
|
657
|
-
/******/ queue.d = 0;
|
|
658
|
-
/******/ dep.then(function(r) {
|
|
659
|
-
/******/ obj[webpackExports] = r;
|
|
660
|
-
/******/ resolveQueue(queue);
|
|
661
|
-
/******/ }, function(e) {
|
|
662
|
-
/******/ obj[webpackError] = e;
|
|
663
|
-
/******/ resolveQueue(queue);
|
|
664
|
-
/******/ });
|
|
665
|
-
/******/ var obj = {};
|
|
666
|
-
/******/ obj[webpackQueues] = function(fn) { fn(queue); };
|
|
667
|
-
/******/ return obj;
|
|
668
|
-
/******/ }
|
|
669
|
-
/******/ }
|
|
670
|
-
/******/ var ret = {};
|
|
671
|
-
/******/ ret[webpackQueues] = function() {};
|
|
672
|
-
/******/ ret[webpackExports] = dep;
|
|
673
|
-
/******/ return ret;
|
|
674
|
-
/******/ }); };
|
|
675
|
-
/******/ __webpack_require__.a = function(module, body, hasAwait) {
|
|
676
|
-
/******/ var queue;
|
|
677
|
-
/******/ hasAwait && ((queue = []).d = -1);
|
|
678
|
-
/******/ var depQueues = new Set();
|
|
679
|
-
/******/ var exports = module.exports;
|
|
680
|
-
/******/ var currentDeps;
|
|
681
|
-
/******/ var outerResolve;
|
|
682
|
-
/******/ var reject;
|
|
683
|
-
/******/ var promise = new Promise(function(resolve, rej) {
|
|
684
|
-
/******/ reject = rej;
|
|
685
|
-
/******/ outerResolve = resolve;
|
|
686
|
-
/******/ });
|
|
687
|
-
/******/ promise[webpackExports] = exports;
|
|
688
|
-
/******/ promise[webpackQueues] = function(fn) { queue && fn(queue), depQueues.forEach(fn), promise["catch"](function() {}); };
|
|
689
|
-
/******/ module.exports = promise;
|
|
690
|
-
/******/ body(function(deps) {
|
|
691
|
-
/******/ currentDeps = wrapDeps(deps);
|
|
692
|
-
/******/ var fn;
|
|
693
|
-
/******/ var getResult = function() { return currentDeps.map(function(d) {
|
|
694
|
-
/******/ if(d[webpackError]) throw d[webpackError];
|
|
695
|
-
/******/ return d[webpackExports];
|
|
696
|
-
/******/ }); }
|
|
697
|
-
/******/ var promise = new Promise(function(resolve) {
|
|
698
|
-
/******/ fn = function() { resolve(getResult); };
|
|
699
|
-
/******/ fn.r = 0;
|
|
700
|
-
/******/ var fnQueue = function(q) { q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))); };
|
|
701
|
-
/******/ currentDeps.map(function(dep) { dep[webpackQueues](fnQueue); });
|
|
702
|
-
/******/ });
|
|
703
|
-
/******/ return fn.r ? promise : getResult();
|
|
704
|
-
/******/ }, function(err) { (err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue); });
|
|
705
|
-
/******/ queue && queue.d < 0 && (queue.d = 0);
|
|
706
|
-
/******/ };
|
|
707
|
-
/******/ }();
|
|
708
|
-
/******/
|
|
709
|
-
/******/ /* webpack/runtime/define property getters */
|
|
710
|
-
/******/ !function() {
|
|
711
|
-
/******/ // define getter functions for harmony exports
|
|
712
|
-
/******/ __webpack_require__.d = function(exports, definition) {
|
|
713
|
-
/******/ for(var key in definition) {
|
|
714
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
715
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
716
|
-
/******/ }
|
|
717
|
-
/******/ }
|
|
718
|
-
/******/ };
|
|
719
|
-
/******/ }();
|
|
720
|
-
/******/
|
|
721
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
722
|
-
/******/ !function() {
|
|
723
|
-
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
724
|
-
/******/ }();
|
|
725
|
-
/******/
|
|
726
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
727
|
-
/******/ !function() {
|
|
728
|
-
/******/ // define __esModule on exports
|
|
729
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
730
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
731
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
732
|
-
/******/ }
|
|
733
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
734
|
-
/******/ };
|
|
735
|
-
/******/ }();
|
|
736
|
-
/******/
|
|
737
|
-
/******/ /* webpack/runtime/publicPath */
|
|
738
|
-
/******/ !function() {
|
|
739
|
-
/******/ __webpack_require__.p = "";
|
|
740
|
-
/******/ }();
|
|
741
|
-
/******/
|
|
742
|
-
/************************************************************************/
|
|
743
|
-
/******/
|
|
744
|
-
/******/ // startup
|
|
745
|
-
/******/ // Load entry module and return exports
|
|
746
|
-
/******/ // This entry module used 'module' so it can't be inlined
|
|
747
|
-
/******/ var __webpack_exports__ = __webpack_require__(368);
|
|
748
|
-
/******/ module.exports = __webpack_exports__;
|
|
749
|
-
/******/
|
|
609
|
+
// const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
610
|
+
/*
|
|
611
|
+
let Player;
|
|
612
|
+
|
|
613
|
+
if (typeof window.ZWPlayer === 'undefined') {
|
|
614
|
+
const loadTask = new Promise(function(resolve, reject) {
|
|
615
|
+
zwplayer_loadjs('zwplayer-core', zwplayer_js_def, function(jsid) {
|
|
616
|
+
if (jsid) {
|
|
617
|
+
resolve(window.ZWPlayer);
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
reject('Load zwplayer library failed.');
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
try {
|
|
626
|
+
Player = await loadTask;
|
|
627
|
+
}
|
|
628
|
+
catch(e) {
|
|
629
|
+
alert(e.msg);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
Player = window.ZWPlayer;
|
|
634
|
+
}
|
|
635
|
+
*/
|
|
636
|
+
|
|
637
|
+
/* harmony default export */ var sources = (ZwModule);
|
|
638
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
/* harmony default export */ var entry_lib = (sources);
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
}();
|
|
645
|
+
module.exports = __webpack_exports__;
|
|
750
646
|
/******/ })()
|
|
751
647
|
;
|
|
752
648
|
//# sourceMappingURL=zwplayervue2.common.js.map
|
package/lib/zwplayervue2.umd.js
CHANGED
|
@@ -11,34 +11,149 @@
|
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
15
|
-
/***/ (function(module
|
|
16
|
-
|
|
17
|
-
"use strict";
|
|
18
|
-
__webpack_require__.a(module, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {
|
|
19
|
-
__webpack_require__.r(__webpack_exports__);
|
|
20
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21
|
-
/* harmony export */ Player: function() { return /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_1__.ai; },
|
|
22
|
-
/* harmony export */ zwplayer: function() { return /* reexport safe */ _entry__WEBPACK_IMPORTED_MODULE_1__.j6; }
|
|
23
|
-
/* harmony export */ });
|
|
24
|
-
/* harmony import */ var _setPublicPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(860);
|
|
25
|
-
/* harmony import */ var _entry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(189);
|
|
26
|
-
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_entry__WEBPACK_IMPORTED_MODULE_1__]);
|
|
27
|
-
_entry__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
28
|
-
|
|
14
|
+
/***/ 15:
|
|
15
|
+
/***/ (function(module) {
|
|
29
16
|
|
|
30
|
-
|
|
17
|
+
// zwplayer tools
|
|
31
18
|
|
|
19
|
+
const zwplayer_loadjs = function (id, url, cb) {
|
|
20
|
+
let headNode = document.getElementsByTagName("head");
|
|
21
|
+
if (headNode.length == 0) {
|
|
22
|
+
headNode = document.createElement("head");
|
|
23
|
+
let body = document.getElementsByTagName("body");
|
|
24
|
+
if (body.length > 0) {
|
|
25
|
+
body = body[0];
|
|
26
|
+
document.insertBefore(headNode, body);
|
|
27
|
+
} else {
|
|
28
|
+
alert('Invalid html document: no HEAD tag');
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
headNode = headNode[0];
|
|
33
|
+
const nodes = headNode.childNodes;
|
|
34
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
35
|
+
const node = nodes[i];
|
|
36
|
+
if (node.nodeName.toUpperCase() === 'SCRIPT') {
|
|
37
|
+
if (node.id && node.id == id) {
|
|
38
|
+
if (node.getAttribute('loadstate') != 'true') {
|
|
39
|
+
const checkLoad = function () {
|
|
40
|
+
if (node.getAttribute('loadstate') != 'true') {
|
|
41
|
+
setTimeout(checkLoad, 50);
|
|
42
|
+
} else {
|
|
43
|
+
if (typeof cb == 'function') cb(id);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
setTimeout(checkLoad, 50);
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
if (typeof cb == 'function') cb(id);
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const script = document.createElement("script");
|
|
56
|
+
script.type = "text/javascript";
|
|
57
|
+
if (script.readyState) {
|
|
58
|
+
// IE
|
|
59
|
+
script.onreadystatechange = function () {
|
|
60
|
+
if (script.readyState == "loaded" || script.readyState == "complete") {
|
|
61
|
+
script.onreadystatechange = null;
|
|
62
|
+
script.setAttribute('loadstate', 'true');
|
|
63
|
+
if (typeof cb == 'function') cb(id);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
} else {
|
|
67
|
+
script.onload = function () {
|
|
68
|
+
script.setAttribute('loadstate', 'true');
|
|
69
|
+
script.setAttribute('charset', 'utf-8');
|
|
70
|
+
if (typeof cb == 'function') cb(id);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
script.id = id;
|
|
74
|
+
script.src = url;
|
|
75
|
+
headNode.appendChild(script);
|
|
76
|
+
return false;
|
|
77
|
+
};
|
|
78
|
+
module.exports.l = zwplayer_loadjs;
|
|
32
79
|
|
|
33
|
-
|
|
34
|
-
} catch(e) { __webpack_async_result__(e); } });
|
|
80
|
+
/***/ })
|
|
35
81
|
|
|
36
|
-
|
|
82
|
+
/******/ });
|
|
83
|
+
/************************************************************************/
|
|
84
|
+
/******/ // The module cache
|
|
85
|
+
/******/ var __webpack_module_cache__ = {};
|
|
86
|
+
/******/
|
|
87
|
+
/******/ // The require function
|
|
88
|
+
/******/ function __webpack_require__(moduleId) {
|
|
89
|
+
/******/ // Check if module is in cache
|
|
90
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
91
|
+
/******/ if (cachedModule !== undefined) {
|
|
92
|
+
/******/ return cachedModule.exports;
|
|
93
|
+
/******/ }
|
|
94
|
+
/******/ // Create a new module (and put it into the cache)
|
|
95
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
96
|
+
/******/ // no module.id needed
|
|
97
|
+
/******/ // no module.loaded needed
|
|
98
|
+
/******/ exports: {}
|
|
99
|
+
/******/ };
|
|
100
|
+
/******/
|
|
101
|
+
/******/ // Execute the module function
|
|
102
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
103
|
+
/******/
|
|
104
|
+
/******/ // Return the exports of the module
|
|
105
|
+
/******/ return module.exports;
|
|
106
|
+
/******/ }
|
|
107
|
+
/******/
|
|
108
|
+
/************************************************************************/
|
|
109
|
+
/******/ /* webpack/runtime/define property getters */
|
|
110
|
+
/******/ !function() {
|
|
111
|
+
/******/ // define getter functions for harmony exports
|
|
112
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
113
|
+
/******/ for(var key in definition) {
|
|
114
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
115
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
116
|
+
/******/ }
|
|
117
|
+
/******/ }
|
|
118
|
+
/******/ };
|
|
119
|
+
/******/ }();
|
|
120
|
+
/******/
|
|
121
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
122
|
+
/******/ !function() {
|
|
123
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
124
|
+
/******/ }();
|
|
125
|
+
/******/
|
|
126
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
127
|
+
/******/ !function() {
|
|
128
|
+
/******/ // define __esModule on exports
|
|
129
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
130
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
131
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
132
|
+
/******/ }
|
|
133
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
134
|
+
/******/ };
|
|
135
|
+
/******/ }();
|
|
136
|
+
/******/
|
|
137
|
+
/******/ /* webpack/runtime/publicPath */
|
|
138
|
+
/******/ !function() {
|
|
139
|
+
/******/ __webpack_require__.p = "";
|
|
140
|
+
/******/ }();
|
|
141
|
+
/******/
|
|
142
|
+
/************************************************************************/
|
|
143
|
+
var __webpack_exports__ = {};
|
|
144
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
145
|
+
!function() {
|
|
146
|
+
"use strict";
|
|
147
|
+
// ESM COMPAT FLAG
|
|
148
|
+
__webpack_require__.r(__webpack_exports__);
|
|
37
149
|
|
|
38
|
-
|
|
39
|
-
|
|
150
|
+
// EXPORTS
|
|
151
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
152
|
+
"default": function() { return /* binding */ entry_lib; },
|
|
153
|
+
zwplayer: function() { return /* reexport */ vueplayer; }
|
|
154
|
+
});
|
|
40
155
|
|
|
41
|
-
|
|
156
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
42
157
|
/* eslint-disable no-var */
|
|
43
158
|
// This file is imported into lib/wc client bundles.
|
|
44
159
|
|
|
@@ -53,71 +168,7 @@ if (typeof window !== 'undefined') {
|
|
|
53
168
|
}
|
|
54
169
|
|
|
55
170
|
// Indicate to webpack that this file can be concatenated
|
|
56
|
-
/*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/***/ }),
|
|
60
|
-
|
|
61
|
-
/***/ 189:
|
|
62
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
63
|
-
|
|
64
|
-
"use strict";
|
|
65
|
-
__webpack_require__.a(module, async function (__webpack_handle_async_dependencies__, __webpack_async_result__) { try {
|
|
66
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
67
|
-
/* harmony export */ ai: function() { return /* binding */ Player; },
|
|
68
|
-
/* harmony export */ j6: function() { return /* reexport safe */ _vueplayer_index_js__WEBPACK_IMPORTED_MODULE_0__.A; }
|
|
69
|
-
/* harmony export */ });
|
|
70
|
-
/* harmony import */ var _vueplayer_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(602);
|
|
71
|
-
/* harmony import */ var _vueplayer_src_loadjs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
|
|
72
|
-
// 引入该目录下所有的组件
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const components = [_vueplayer_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A];
|
|
76
|
-
const ZwModule = {};
|
|
77
|
-
ZwModule.install = Vue => {
|
|
78
|
-
components.forEach(component => {
|
|
79
|
-
component.install(Vue);
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
if (typeof window !== 'undefined' && window.Vue) {
|
|
83
|
-
ZwModule.install(window.Vue);
|
|
84
|
-
}
|
|
85
|
-
const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
86
|
-
let Player;
|
|
87
|
-
if (typeof window.ZWPlayer === 'undefined') {
|
|
88
|
-
const loadTask = new Promise(function (resolve, reject) {
|
|
89
|
-
(0,_vueplayer_src_loadjs_js__WEBPACK_IMPORTED_MODULE_1__/* .zwplayer_loadjs */ .l)('zwplayer-core', zwplayer_js_def, function (jsid) {
|
|
90
|
-
if (jsid) {
|
|
91
|
-
resolve(window.ZWPlayer);
|
|
92
|
-
} else {
|
|
93
|
-
reject('Load zwplayer library failed.');
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
try {
|
|
98
|
-
Player = await loadTask;
|
|
99
|
-
} catch (e) {
|
|
100
|
-
alert(e.msg);
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
Player = window.ZWPlayer;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* harmony default export */ __webpack_exports__.Ay = (ZwModule);
|
|
107
|
-
__webpack_async_result__();
|
|
108
|
-
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
109
|
-
|
|
110
|
-
/***/ }),
|
|
111
|
-
|
|
112
|
-
/***/ 602:
|
|
113
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
114
|
-
|
|
115
|
-
"use strict";
|
|
116
|
-
|
|
117
|
-
// EXPORTS
|
|
118
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
119
|
-
A: function() { return /* binding */ vueplayer; }
|
|
120
|
-
});
|
|
171
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
121
172
|
|
|
122
173
|
// EXTERNAL MODULE: ./sources/vueplayer/src/loadjs.js
|
|
123
174
|
var loadjs = __webpack_require__(15);
|
|
@@ -549,213 +600,58 @@ main.install = function (Vue) {
|
|
|
549
600
|
Vue.component('ZPlayer', main);
|
|
550
601
|
};
|
|
551
602
|
/* harmony default export */ var vueplayer = (main);
|
|
603
|
+
;// CONCATENATED MODULE: ./sources/index.js
|
|
604
|
+
// 引入该目录下所有的组件
|
|
552
605
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
/***/ 15:
|
|
556
|
-
/***/ (function(module) {
|
|
557
|
-
|
|
558
|
-
// zwplayer tools
|
|
606
|
+
// import { zwplayer_loadjs } from "./vueplayer/src/loadjs.js"
|
|
559
607
|
|
|
560
|
-
const
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
body = body[0];
|
|
567
|
-
document.insertBefore(headNode, body);
|
|
568
|
-
} else {
|
|
569
|
-
alert('Invalid html document: no HEAD tag');
|
|
570
|
-
return false;
|
|
571
|
-
}
|
|
572
|
-
} else {
|
|
573
|
-
headNode = headNode[0];
|
|
574
|
-
const nodes = headNode.childNodes;
|
|
575
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
576
|
-
const node = nodes[i];
|
|
577
|
-
if (node.nodeName.toUpperCase() === 'SCRIPT') {
|
|
578
|
-
if (node.id && node.id == id) {
|
|
579
|
-
if (node.getAttribute('loadstate') != 'true') {
|
|
580
|
-
const checkLoad = function () {
|
|
581
|
-
if (node.getAttribute('loadstate') != 'true') {
|
|
582
|
-
setTimeout(checkLoad, 50);
|
|
583
|
-
} else {
|
|
584
|
-
if (typeof cb == 'function') cb(id);
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
setTimeout(checkLoad, 50);
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
if (typeof cb == 'function') cb(id);
|
|
591
|
-
return true;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
const script = document.createElement("script");
|
|
597
|
-
script.type = "text/javascript";
|
|
598
|
-
if (script.readyState) {
|
|
599
|
-
// IE
|
|
600
|
-
script.onreadystatechange = function () {
|
|
601
|
-
if (script.readyState == "loaded" || script.readyState == "complete") {
|
|
602
|
-
script.onreadystatechange = null;
|
|
603
|
-
script.setAttribute('loadstate', 'true');
|
|
604
|
-
if (typeof cb == 'function') cb(id);
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
} else {
|
|
608
|
-
script.onload = function () {
|
|
609
|
-
script.setAttribute('loadstate', 'true');
|
|
610
|
-
script.setAttribute('charset', 'utf-8');
|
|
611
|
-
if (typeof cb == 'function') cb(id);
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
script.id = id;
|
|
615
|
-
script.src = url;
|
|
616
|
-
headNode.appendChild(script);
|
|
617
|
-
return false;
|
|
608
|
+
const components = [vueplayer];
|
|
609
|
+
const ZwModule = {};
|
|
610
|
+
ZwModule.install = Vue => {
|
|
611
|
+
components.forEach(component => {
|
|
612
|
+
component.install(Vue);
|
|
613
|
+
});
|
|
618
614
|
};
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
615
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
616
|
+
ZwModule.install(window.Vue);
|
|
617
|
+
}
|
|
622
618
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
/******/ queue.forEach(function(fn) { fn.r-- ? fn.r++ : fn(); });
|
|
660
|
-
/******/ }
|
|
661
|
-
/******/ }
|
|
662
|
-
/******/ var wrapDeps = function(deps) { return deps.map(function(dep) {
|
|
663
|
-
/******/ if(dep !== null && typeof dep === "object") {
|
|
664
|
-
/******/ if(dep[webpackQueues]) return dep;
|
|
665
|
-
/******/ if(dep.then) {
|
|
666
|
-
/******/ var queue = [];
|
|
667
|
-
/******/ queue.d = 0;
|
|
668
|
-
/******/ dep.then(function(r) {
|
|
669
|
-
/******/ obj[webpackExports] = r;
|
|
670
|
-
/******/ resolveQueue(queue);
|
|
671
|
-
/******/ }, function(e) {
|
|
672
|
-
/******/ obj[webpackError] = e;
|
|
673
|
-
/******/ resolveQueue(queue);
|
|
674
|
-
/******/ });
|
|
675
|
-
/******/ var obj = {};
|
|
676
|
-
/******/ obj[webpackQueues] = function(fn) { fn(queue); };
|
|
677
|
-
/******/ return obj;
|
|
678
|
-
/******/ }
|
|
679
|
-
/******/ }
|
|
680
|
-
/******/ var ret = {};
|
|
681
|
-
/******/ ret[webpackQueues] = function() {};
|
|
682
|
-
/******/ ret[webpackExports] = dep;
|
|
683
|
-
/******/ return ret;
|
|
684
|
-
/******/ }); };
|
|
685
|
-
/******/ __webpack_require__.a = function(module, body, hasAwait) {
|
|
686
|
-
/******/ var queue;
|
|
687
|
-
/******/ hasAwait && ((queue = []).d = -1);
|
|
688
|
-
/******/ var depQueues = new Set();
|
|
689
|
-
/******/ var exports = module.exports;
|
|
690
|
-
/******/ var currentDeps;
|
|
691
|
-
/******/ var outerResolve;
|
|
692
|
-
/******/ var reject;
|
|
693
|
-
/******/ var promise = new Promise(function(resolve, rej) {
|
|
694
|
-
/******/ reject = rej;
|
|
695
|
-
/******/ outerResolve = resolve;
|
|
696
|
-
/******/ });
|
|
697
|
-
/******/ promise[webpackExports] = exports;
|
|
698
|
-
/******/ promise[webpackQueues] = function(fn) { queue && fn(queue), depQueues.forEach(fn), promise["catch"](function() {}); };
|
|
699
|
-
/******/ module.exports = promise;
|
|
700
|
-
/******/ body(function(deps) {
|
|
701
|
-
/******/ currentDeps = wrapDeps(deps);
|
|
702
|
-
/******/ var fn;
|
|
703
|
-
/******/ var getResult = function() { return currentDeps.map(function(d) {
|
|
704
|
-
/******/ if(d[webpackError]) throw d[webpackError];
|
|
705
|
-
/******/ return d[webpackExports];
|
|
706
|
-
/******/ }); }
|
|
707
|
-
/******/ var promise = new Promise(function(resolve) {
|
|
708
|
-
/******/ fn = function() { resolve(getResult); };
|
|
709
|
-
/******/ fn.r = 0;
|
|
710
|
-
/******/ var fnQueue = function(q) { q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))); };
|
|
711
|
-
/******/ currentDeps.map(function(dep) { dep[webpackQueues](fnQueue); });
|
|
712
|
-
/******/ });
|
|
713
|
-
/******/ return fn.r ? promise : getResult();
|
|
714
|
-
/******/ }, function(err) { (err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue); });
|
|
715
|
-
/******/ queue && queue.d < 0 && (queue.d = 0);
|
|
716
|
-
/******/ };
|
|
717
|
-
/******/ }();
|
|
718
|
-
/******/
|
|
719
|
-
/******/ /* webpack/runtime/define property getters */
|
|
720
|
-
/******/ !function() {
|
|
721
|
-
/******/ // define getter functions for harmony exports
|
|
722
|
-
/******/ __webpack_require__.d = function(exports, definition) {
|
|
723
|
-
/******/ for(var key in definition) {
|
|
724
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
725
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
726
|
-
/******/ }
|
|
727
|
-
/******/ }
|
|
728
|
-
/******/ };
|
|
729
|
-
/******/ }();
|
|
730
|
-
/******/
|
|
731
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
732
|
-
/******/ !function() {
|
|
733
|
-
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
734
|
-
/******/ }();
|
|
735
|
-
/******/
|
|
736
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
737
|
-
/******/ !function() {
|
|
738
|
-
/******/ // define __esModule on exports
|
|
739
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
740
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
741
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
742
|
-
/******/ }
|
|
743
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
744
|
-
/******/ };
|
|
745
|
-
/******/ }();
|
|
746
|
-
/******/
|
|
747
|
-
/******/ /* webpack/runtime/publicPath */
|
|
748
|
-
/******/ !function() {
|
|
749
|
-
/******/ __webpack_require__.p = "";
|
|
750
|
-
/******/ }();
|
|
751
|
-
/******/
|
|
752
|
-
/************************************************************************/
|
|
753
|
-
/******/
|
|
754
|
-
/******/ // startup
|
|
755
|
-
/******/ // Load entry module and return exports
|
|
756
|
-
/******/ // This entry module used 'module' so it can't be inlined
|
|
757
|
-
/******/ var __webpack_exports__ = __webpack_require__(368);
|
|
758
|
-
/******/
|
|
619
|
+
// const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
620
|
+
/*
|
|
621
|
+
let Player;
|
|
622
|
+
|
|
623
|
+
if (typeof window.ZWPlayer === 'undefined') {
|
|
624
|
+
const loadTask = new Promise(function(resolve, reject) {
|
|
625
|
+
zwplayer_loadjs('zwplayer-core', zwplayer_js_def, function(jsid) {
|
|
626
|
+
if (jsid) {
|
|
627
|
+
resolve(window.ZWPlayer);
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
reject('Load zwplayer library failed.');
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
try {
|
|
636
|
+
Player = await loadTask;
|
|
637
|
+
}
|
|
638
|
+
catch(e) {
|
|
639
|
+
alert(e.msg);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
Player = window.ZWPlayer;
|
|
644
|
+
}
|
|
645
|
+
*/
|
|
646
|
+
|
|
647
|
+
/* harmony default export */ var sources = (ZwModule);
|
|
648
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
/* harmony default export */ var entry_lib = (sources);
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
}();
|
|
759
655
|
/******/ return __webpack_exports__;
|
|
760
656
|
/******/ })()
|
|
761
657
|
;
|
|
@@ -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={
|
|
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={234:function(e){const t=function(e,t,o){let n=document.getElementsByTagName("head");if(0==n.length){n=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(n,e)}else{n=n[0];const t=n.childNodes;for(let n=0;n<t.length;n++){const r=t[n];if("SCRIPT"===r.nodeName.toUpperCase()&&r.id&&r.id==e){if("true"!=r.getAttribute("loadstate")){const t=function(){"true"!=r.getAttribute("loadstate")?setTimeout(t,50):"function"==typeof o&&o(e)};return setTimeout(t,50),!1}return"function"==typeof o&&o(e),!0}}}const r=document.createElement("script");return r.type="text/javascript",r.readyState?r.onreadystatechange=function(){"loaded"!=r.readyState&&"complete"!=r.readyState||(r.onreadystatechange=null,r.setAttribute("loadstate","true"),"function"==typeof o&&o(e))}:r.onload=function(){r.setAttribute("loadstate","true"),r.setAttribute("charset","utf-8"),"function"==typeof o&&o(e)},r.id=e,r.src=t,n.appendChild(r),!1};e.exports.l=t}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,o),l.exports}!function(){o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){o.p=""}();var n={};return function(){"use strict";if(o.r(n),o.d(n,{default:function(){return b},zwplayer:function(){return f}}),"undefined"!==typeof window){var e=window.document.currentScript,t=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);t&&(o.p=t[1])}var r=o(234);const l="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"};var i,s,u={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,o){let n=this;e||(e=this.murl),n.zwplayer&&n.zwplayer.play(e,t,o)},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 o=this;o.zwplayer&&o.zwplayer.appendDanmu(e,t)},setChapters(e){let t=this;t.zwplayer&&t.zwplayer.setChapters(e)},addSubtitle(e,t,o){let n=this;n.zwplayer&&n.zwplayer.addSubtitle(e,t,o)},removeSubtitle(){let e=this;e.zwplayer&&e.zwplayer.removeSubtitle()},buildDanmuControlbar(e,t){let o=this;o.zwplayer&&o.zwplayer.buildDanmuControlbar(e,t)},notifyResize(e,t){let o=this;o.zwplayer&&o.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 o=e("div",{class:{"zwplayer-vue":!0},attrs:{id:t}},[]);if(o){let e=this;e.playerid=t}return this.zwplayer&&this.murl!==this.old_murl&&(this.zwplayer.play(this.murl),this.old_murl=this.murl),o},mounted(){let e,t=this;e=t.zwplayerlib?t.zwplayerlib:l,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,r.l)("zwplayer-core",e,(function(e){let o="";e||console.log("zwplayer_loadjs failed!"),t.murl?o=t.murl:t.videoprop&&"undefined"!==typeof t.videoprop.url&&(o=t.videoprop.url);let n="width:100%;height:100%;";t.videoprop&&"undefined"!==typeof t.videoprop.videostyle&&(n=t.videoprop.videostyle);let r={url:o,playerElm:t.rootElm,videostyle:n,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)}},l=a;for(let a in t.$attrs)a in l&&typeof t.$attrs[a]===l[a]&&("object"===typeof t.$attrs[a]?r[a]=JSON.parse(JSON.stringify(t.$attrs[a])):r[a]=t.$attrs[a]);t.zwplayer=new window.ZWPlayer(r),r.danmuBarId&&t.zwplayer.buildDanmuControlbar(r.danmuBarId,"vue-zwp-danmubar"),t.old_murl=o}))},beforeDestroy(){let e=this;e.zwplayer&&e.zwplayer.stop()},destroyed(){let e=this;e.zwplayer&&(e.zwplayer.destroy(),delete e.zwplayer)}},d=u;function p(e,t,o,n,r,l,a,i){var s,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=o,u._compiled=!0),n&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),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__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=s):r&&(s=i?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(u.functional){u._injectStyles=s;var d=u.render;u.render=function(e,t){return s.call(t),d(e,t)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,s):[s]}return{exports:e,options:u}}var y=p(d,i,s,!1,null,null,null),c=y.exports;c.install=function(e){e.component(c.name,c),e.component("zero-web-player",c),e.component("zero-player",c),e.component("ZPlayer",c)};var f=c;const m=[f],w={install:e=>{m.forEach((t=>{t.install(e)}))}};"undefined"!==typeof window&&window.Vue&&w.install(window.Vue);var h=w,b=h}(),n}()}));
|
|
2
2
|
//# sourceMappingURL=zwplayervue2.umd.min.js.map
|
package/package.json
CHANGED
package/sources/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 引入该目录下所有的组件
|
|
2
2
|
import zwplayer from "./vueplayer/index.js";
|
|
3
|
-
import { zwplayer_loadjs } from "./vueplayer/src/loadjs.js"
|
|
3
|
+
// import { zwplayer_loadjs } from "./vueplayer/src/loadjs.js"
|
|
4
4
|
|
|
5
5
|
const components = [
|
|
6
6
|
zwplayer
|
|
@@ -17,8 +17,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
17
17
|
ZwModule.install(window.Vue)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
21
|
-
|
|
20
|
+
// const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
21
|
+
/*
|
|
22
22
|
let Player;
|
|
23
23
|
|
|
24
24
|
if (typeof window.ZWPlayer === 'undefined') {
|
|
@@ -43,10 +43,10 @@ if (typeof window.ZWPlayer === 'undefined') {
|
|
|
43
43
|
else {
|
|
44
44
|
Player = window.ZWPlayer;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
*/
|
|
47
47
|
export {
|
|
48
48
|
zwplayer,
|
|
49
|
-
Player
|
|
49
|
+
// Player
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export default ZwModule;
|