zwplayer-vue2x 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,149 +1,34 @@
1
1
  /******/ (function() { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
- /***/ 709:
5
- /***/ (function(module) {
4
+ /***/ 368:
5
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6
6
 
7
- // zwplayer tools
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
- // EXPORTS
141
- __webpack_require__.d(__webpack_exports__, {
142
- "default": function() { return /* binding */ entry_lib; },
143
- zwplayer: function() { return /* reexport */ vueplayer; }
144
- });
23
+ __webpack_async_result__();
24
+ } catch(e) { __webpack_async_result__(e); } });
25
+
26
+ /***/ }),
145
27
 
146
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
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 setPublicPath = (null);
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,29 +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
- const components = [vueplayer];
597
- const ZwModule = {};
598
- ZwModule.install = Vue => {
599
- components.forEach(component => {
600
- component.install(Vue);
601
- });
602
- };
603
- if (typeof window !== 'undefined' && window.Vue) {
604
- ZwModule.install(window.Vue);
605
- }
543
+ /***/ }),
606
544
 
607
- /* harmony default export */ var sources = (ZwModule);
608
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
545
+ /***/ 709:
546
+ /***/ (function(module) {
609
547
 
548
+ // zwplayer tools
610
549
 
611
- /* harmony default export */ var entry_lib = (sources);
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;
608
+ };
609
+ module.exports.l = zwplayer_loadjs;
612
610
 
611
+ /***/ })
613
612
 
614
- }();
615
- module.exports = __webpack_exports__;
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
+ /******/
616
750
  /******/ })()
617
751
  ;
618
752
  //# sourceMappingURL=zwplayervue2.common.js.map