zwplayer-vue2x 1.0.11 → 1.0.12
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 +291 -187
- package/lib/zwplayervue2.umd.js +290 -186
- package/lib/zwplayervue2.umd.min.js +1 -1
- package/package.json +1 -1
- package/sources/index.js +5 -5
|
@@ -1,149 +1,34 @@
|
|
|
1
1
|
/******/ (function() { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
5
|
-
/***/ (function(module) {
|
|
4
|
+
/***/ 368:
|
|
5
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6
6
|
|
|
7
|
-
|
|
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];
|
|
8
18
|
|
|
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;
|
|
69
19
|
|
|
70
|
-
|
|
20
|
+
/* harmony default export */ __webpack_exports__["default"] = (_entry__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay);
|
|
71
21
|
|
|
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__);
|
|
139
22
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
23
|
+
__webpack_async_result__();
|
|
24
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
25
|
+
|
|
26
|
+
/***/ }),
|
|
145
27
|
|
|
146
|
-
|
|
28
|
+
/***/ 860:
|
|
29
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
30
|
+
|
|
31
|
+
"use strict";
|
|
147
32
|
/* eslint-disable no-var */
|
|
148
33
|
// This file is imported into lib/wc client bundles.
|
|
149
34
|
|
|
@@ -158,7 +43,71 @@ if (typeof window !== 'undefined') {
|
|
|
158
43
|
}
|
|
159
44
|
|
|
160
45
|
// Indicate to webpack that this file can be concatenated
|
|
161
|
-
/* harmony default export */ var
|
|
46
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (null);
|
|
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
|
+
});
|
|
162
111
|
|
|
163
112
|
// EXTERNAL MODULE: ./sources/vueplayer/src/loadjs.js
|
|
164
113
|
var loadjs = __webpack_require__(709);
|
|
@@ -590,59 +539,214 @@ main.install = function (Vue) {
|
|
|
590
539
|
Vue.component('ZPlayer', main);
|
|
591
540
|
};
|
|
592
541
|
/* harmony default export */ var vueplayer = (main);
|
|
593
|
-
;// CONCATENATED MODULE: ./sources/index.js
|
|
594
|
-
// 引入该目录下所有的组件
|
|
595
542
|
|
|
596
|
-
|
|
543
|
+
/***/ }),
|
|
597
544
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
545
|
+
/***/ 709:
|
|
546
|
+
/***/ (function(module) {
|
|
547
|
+
|
|
548
|
+
// zwplayer tools
|
|
549
|
+
|
|
550
|
+
const zwplayer_loadjs = function (id, url, cb) {
|
|
551
|
+
let headNode = document.getElementsByTagName("head");
|
|
552
|
+
if (headNode.length == 0) {
|
|
553
|
+
headNode = document.createElement("head");
|
|
554
|
+
let body = document.getElementsByTagName("body");
|
|
555
|
+
if (body.length > 0) {
|
|
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;
|
|
604
608
|
};
|
|
605
|
-
|
|
606
|
-
ZwModule.install(window.Vue);
|
|
607
|
-
}
|
|
609
|
+
module.exports.l = zwplayer_loadjs;
|
|
608
610
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
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
|
-
|
|
611
|
+
/***/ })
|
|
612
|
+
|
|
613
|
+
/******/ });
|
|
614
|
+
/************************************************************************/
|
|
615
|
+
/******/ // The module cache
|
|
616
|
+
/******/ var __webpack_module_cache__ = {};
|
|
617
|
+
/******/
|
|
618
|
+
/******/ // The require function
|
|
619
|
+
/******/ function __webpack_require__(moduleId) {
|
|
620
|
+
/******/ // Check if module is in cache
|
|
621
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
622
|
+
/******/ if (cachedModule !== undefined) {
|
|
623
|
+
/******/ return cachedModule.exports;
|
|
624
|
+
/******/ }
|
|
625
|
+
/******/ // Create a new module (and put it into the cache)
|
|
626
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
627
|
+
/******/ // no module.id needed
|
|
628
|
+
/******/ // no module.loaded needed
|
|
629
|
+
/******/ exports: {}
|
|
630
|
+
/******/ };
|
|
631
|
+
/******/
|
|
632
|
+
/******/ // Execute the module function
|
|
633
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
634
|
+
/******/
|
|
635
|
+
/******/ // Return the exports of the module
|
|
636
|
+
/******/ return module.exports;
|
|
637
|
+
/******/ }
|
|
638
|
+
/******/
|
|
639
|
+
/************************************************************************/
|
|
640
|
+
/******/ /* webpack/runtime/async module */
|
|
641
|
+
/******/ !function() {
|
|
642
|
+
/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
|
|
643
|
+
/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
|
|
644
|
+
/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
|
|
645
|
+
/******/ var resolveQueue = function(queue) {
|
|
646
|
+
/******/ if(queue && queue.d < 1) {
|
|
647
|
+
/******/ queue.d = 1;
|
|
648
|
+
/******/ queue.forEach(function(fn) { fn.r--; });
|
|
649
|
+
/******/ queue.forEach(function(fn) { fn.r-- ? fn.r++ : fn(); });
|
|
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
|
+
/******/
|
|
646
750
|
/******/ })()
|
|
647
751
|
;
|
|
648
752
|
//# sourceMappingURL=zwplayervue2.common.js.map
|
package/lib/zwplayervue2.umd.js
CHANGED
|
@@ -11,149 +11,34 @@
|
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
15
|
-
/***/ (function(module) {
|
|
14
|
+
/***/ 368:
|
|
15
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
16
16
|
|
|
17
|
-
|
|
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];
|
|
18
28
|
|
|
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;
|
|
79
29
|
|
|
80
|
-
|
|
30
|
+
/* harmony default export */ __webpack_exports__["default"] = (_entry__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay);
|
|
81
31
|
|
|
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__);
|
|
149
32
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
});
|
|
33
|
+
__webpack_async_result__();
|
|
34
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
35
|
+
|
|
36
|
+
/***/ }),
|
|
155
37
|
|
|
156
|
-
|
|
38
|
+
/***/ 860:
|
|
39
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
40
|
+
|
|
41
|
+
"use strict";
|
|
157
42
|
/* eslint-disable no-var */
|
|
158
43
|
// This file is imported into lib/wc client bundles.
|
|
159
44
|
|
|
@@ -168,7 +53,71 @@ if (typeof window !== 'undefined') {
|
|
|
168
53
|
}
|
|
169
54
|
|
|
170
55
|
// Indicate to webpack that this file can be concatenated
|
|
171
|
-
/* harmony default export */ var
|
|
56
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (null);
|
|
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
|
+
});
|
|
172
121
|
|
|
173
122
|
// EXTERNAL MODULE: ./sources/vueplayer/src/loadjs.js
|
|
174
123
|
var loadjs = __webpack_require__(15);
|
|
@@ -600,58 +549,213 @@ main.install = function (Vue) {
|
|
|
600
549
|
Vue.component('ZPlayer', main);
|
|
601
550
|
};
|
|
602
551
|
/* harmony default export */ var vueplayer = (main);
|
|
603
|
-
;// CONCATENATED MODULE: ./sources/index.js
|
|
604
|
-
// 引入该目录下所有的组件
|
|
605
552
|
|
|
606
|
-
|
|
553
|
+
/***/ }),
|
|
607
554
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
555
|
+
/***/ 15:
|
|
556
|
+
/***/ (function(module) {
|
|
557
|
+
|
|
558
|
+
// zwplayer tools
|
|
559
|
+
|
|
560
|
+
const zwplayer_loadjs = function (id, url, cb) {
|
|
561
|
+
let headNode = document.getElementsByTagName("head");
|
|
562
|
+
if (headNode.length == 0) {
|
|
563
|
+
headNode = document.createElement("head");
|
|
564
|
+
let body = document.getElementsByTagName("body");
|
|
565
|
+
if (body.length > 0) {
|
|
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;
|
|
614
618
|
};
|
|
615
|
-
|
|
616
|
-
ZwModule.install(window.Vue);
|
|
617
|
-
}
|
|
619
|
+
module.exports.l = zwplayer_loadjs;
|
|
618
620
|
|
|
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
|
-
|
|
653
|
-
|
|
654
|
-
|
|
621
|
+
/***/ })
|
|
622
|
+
|
|
623
|
+
/******/ });
|
|
624
|
+
/************************************************************************/
|
|
625
|
+
/******/ // The module cache
|
|
626
|
+
/******/ var __webpack_module_cache__ = {};
|
|
627
|
+
/******/
|
|
628
|
+
/******/ // The require function
|
|
629
|
+
/******/ function __webpack_require__(moduleId) {
|
|
630
|
+
/******/ // Check if module is in cache
|
|
631
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
632
|
+
/******/ if (cachedModule !== undefined) {
|
|
633
|
+
/******/ return cachedModule.exports;
|
|
634
|
+
/******/ }
|
|
635
|
+
/******/ // Create a new module (and put it into the cache)
|
|
636
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
637
|
+
/******/ // no module.id needed
|
|
638
|
+
/******/ // no module.loaded needed
|
|
639
|
+
/******/ exports: {}
|
|
640
|
+
/******/ };
|
|
641
|
+
/******/
|
|
642
|
+
/******/ // Execute the module function
|
|
643
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
644
|
+
/******/
|
|
645
|
+
/******/ // Return the exports of the module
|
|
646
|
+
/******/ return module.exports;
|
|
647
|
+
/******/ }
|
|
648
|
+
/******/
|
|
649
|
+
/************************************************************************/
|
|
650
|
+
/******/ /* webpack/runtime/async module */
|
|
651
|
+
/******/ !function() {
|
|
652
|
+
/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
|
|
653
|
+
/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
|
|
654
|
+
/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
|
|
655
|
+
/******/ var resolveQueue = function(queue) {
|
|
656
|
+
/******/ if(queue && queue.d < 1) {
|
|
657
|
+
/******/ queue.d = 1;
|
|
658
|
+
/******/ queue.forEach(function(fn) { fn.r--; });
|
|
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
|
+
/******/
|
|
655
759
|
/******/ return __webpack_exports__;
|
|
656
760
|
/******/ })()
|
|
657
761
|
;
|
|
@@ -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={368:function(e,t,n){"use strict";n.a(e,(async function(e,o){try{n.r(t),n.d(t,{Player:function(){return r.ai},zwplayer:function(){return r.j6}});n(860);var r=n(502),a=e([r]);r=(a.then?(await a)():a)[0],t["default"]=r.Ay,o()}catch(l){o(l)}}))},860:function(e,t,n){"use strict";if("undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}},502:function(e,t,n){"use strict";n.a(e,(async function(e,o){try{n.d(t,{ai:function(){return s},j6:function(){return r.A}});var r=n(645),a=n(234);const e=[r.A],i={install:t=>{e.forEach((e=>{e.install(t)}))}};"undefined"!==typeof window&&window.Vue&&i.install(window.Vue);const u="zwplayer/zwplayer.js?v=3.6";let s;if("undefined"===typeof window.ZWPlayer){const e=new Promise((function(e,t){(0,a.l)("zwplayer-core",u,(function(n){n?e(window.ZWPlayer):t("Load zwplayer library failed.")}))}));try{s=await e}catch(l){alert(l.msg)}}else s=window.ZWPlayer;t.Ay=i,o()}catch(l){o(l)}}),1)},645:function(e,t,n){"use strict";n.d(t,{A:function(){return y}});var o=n(234);const r="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 l,i,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,n){let o=this;e||(e=this.murl),o.zwplayer&&o.zwplayer.play(e,t,n)},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 n=this;n.zwplayer&&n.zwplayer.appendDanmu(e,t)},setChapters(e){let t=this;t.zwplayer&&t.zwplayer.setChapters(e)},addSubtitle(e,t,n){let o=this;o.zwplayer&&o.zwplayer.addSubtitle(e,t,n)},removeSubtitle(){let e=this;e.zwplayer&&e.zwplayer.removeSubtitle()},buildDanmuControlbar(e,t){let n=this;n.zwplayer&&n.zwplayer.buildDanmuControlbar(e,t)},notifyResize(e,t){let n=this;n.zwplayer&&n.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 n=e("div",{class:{"zwplayer-vue":!0},attrs:{id:t}},[]);if(n){let e=this;e.playerid=t}return this.zwplayer&&this.murl!==this.old_murl&&(this.zwplayer.play(this.murl),this.old_murl=this.murl),n},mounted(){let e,t=this;e=t.zwplayerlib?t.zwplayerlib:r,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,o.l)("zwplayer-core",e,(function(e){let n="";e||console.log("zwplayer_loadjs failed!"),t.murl?n=t.murl:t.videoprop&&"undefined"!==typeof t.videoprop.url&&(n=t.videoprop.url);let o="width:100%;height:100%;";t.videoprop&&"undefined"!==typeof t.videoprop.videostyle&&(o=t.videoprop.videostyle);let r={url:n,playerElm:t.rootElm,videostyle:o,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=n}))},beforeDestroy(){let e=this;e.zwplayer&&e.zwplayer.stop()},destroyed(){let e=this;e.zwplayer&&(e.zwplayer.destroy(),delete e.zwplayer)}},s=u;function p(e,t,n,o,r,a,l,i){var u,s="function"===typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=n,s._compiled=!0),o&&(s.functional=!0),a&&(s._scopeId="data-v-"+a),l?(u=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(l)},s._ssrRegister=u):r&&(u=i?function(){r.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:r),u)if(s.functional){s._injectStyles=u;var p=s.render;s.render=function(e,t){return u.call(t),p(e,t)}}else{var d=s.beforeCreate;s.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:s}}var d=p(s,l,i,!1,null,null,null),c=d.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 y=c},234:function(e){const t=function(e,t,n){let o=document.getElementsByTagName("head");if(0==o.length){o=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(o,e)}else{o=o[0];const t=o.childNodes;for(let o=0;o<t.length;o++){const r=t[o];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 n&&n(e)};return setTimeout(t,50),!1}return"function"==typeof n&&n(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 n&&n(e))}:r.onload=function(){r.setAttribute("loadstate","true"),r.setAttribute("charset","utf-8"),"function"==typeof n&&n(e)},r.id=e,r.src=t,o.appendChild(r),!1};e.exports.l=t}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}!function(){var e="function"===typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"===typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",o="function"===typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=function(e){e&&e.d<1&&(e.d=1,e.forEach((function(e){e.r--})),e.forEach((function(e){e.r--?e.r++:e()})))},a=function(n){return n.map((function(n){if(null!==n&&"object"===typeof n){if(n[e])return n;if(n.then){var a=[];a.d=0,n.then((function(e){l[t]=e,r(a)}),(function(e){l[o]=e,r(a)}));var l={};return l[e]=function(e){e(a)},l}}var i={};return i[e]=function(){},i[t]=n,i}))};n.a=function(n,l,i){var u;i&&((u=[]).d=-1);var s,p,d,c=new Set,y=n.exports,f=new Promise((function(e,t){d=t,p=e}));f[t]=y,f[e]=function(e){u&&e(u),c.forEach(e),f["catch"]((function(){}))},n.exports=f,l((function(n){var r;s=a(n);var l=function(){return s.map((function(e){if(e[o])throw e[o];return e[t]}))},i=new Promise((function(t){r=function(){t(l)},r.r=0;var n=function(e){e!==u&&!c.has(e)&&(c.add(e),e&&!e.d&&(r.r++,e.push(r)))};s.map((function(t){t[e](n)}))}));return r.r?i:l()}),(function(e){e?d(f[o]=e):p(y),r(u)})),u&&u.d<0&&(u.d=0)}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){n.p=""}();var o=n(368);return o}()}));
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
+
Player
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export default ZwModule;
|