zwplayer-vue2x 1.0.9 → 1.0.10
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/package.json +1 -1
- package/sources/index.js +3 -3
- package/lib/demo.html +0 -1
- package/lib/zwplayervue2.common.js +0 -752
- package/lib/zwplayervue2.umd.js +0 -763
- package/lib/zwplayervue2.umd.min.js +0 -2
package/lib/zwplayervue2.umd.js
DELETED
|
@@ -1,763 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["zwplayervue2"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["zwplayervue2"] = factory();
|
|
10
|
-
})((typeof self !== 'undefined' ? self : this), function() {
|
|
11
|
-
return /******/ (function() { // webpackBootstrap
|
|
12
|
-
/******/ var __webpack_modules__ = ({
|
|
13
|
-
|
|
14
|
-
/***/ 368:
|
|
15
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
/* harmony default export */ __webpack_exports__["default"] = (_entry__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Ay);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
__webpack_async_result__();
|
|
34
|
-
} catch(e) { __webpack_async_result__(e); } });
|
|
35
|
-
|
|
36
|
-
/***/ }),
|
|
37
|
-
|
|
38
|
-
/***/ 860:
|
|
39
|
-
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
40
|
-
|
|
41
|
-
"use strict";
|
|
42
|
-
/* eslint-disable no-var */
|
|
43
|
-
// This file is imported into lib/wc client bundles.
|
|
44
|
-
|
|
45
|
-
if (typeof window !== 'undefined') {
|
|
46
|
-
var currentScript = window.document.currentScript
|
|
47
|
-
if (false) { var getCurrentScript; }
|
|
48
|
-
|
|
49
|
-
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
50
|
-
if (src) {
|
|
51
|
-
__webpack_require__.p = src[1] // eslint-disable-line
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Indicate to webpack that this file can be concatenated
|
|
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
|
-
});
|
|
121
|
-
|
|
122
|
-
// EXTERNAL MODULE: ./sources/vueplayer/src/loadjs.js
|
|
123
|
-
var loadjs = __webpack_require__(15);
|
|
124
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./sources/vueplayer/src/main.vue?vue&type=script&lang=js
|
|
125
|
-
// import { h } from 'vue'
|
|
126
|
-
|
|
127
|
-
const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
|
|
128
|
-
const availabe_props = {
|
|
129
|
-
isLive: 'boolean',
|
|
130
|
-
useOldFlv: 'boolean',
|
|
131
|
-
useFlv: 'boolean',
|
|
132
|
-
streamtype: 'string',
|
|
133
|
-
hasAudio: 'boolean',
|
|
134
|
-
hasVideo: 'boolean',
|
|
135
|
-
xmc_url: 'string',
|
|
136
|
-
fixedControlbar: 'boolean',
|
|
137
|
-
nativecontrols: 'boolean',
|
|
138
|
-
infoButton: 'boolean',
|
|
139
|
-
speedButton: 'boolean',
|
|
140
|
-
optionButton: 'boolean',
|
|
141
|
-
snapshotButton: 'boolean',
|
|
142
|
-
chapterButton: 'boolean',
|
|
143
|
-
enableDanmu: 'boolean',
|
|
144
|
-
useProgressTooltip: 'boolean',
|
|
145
|
-
hidePlayBtn: 'boolean',
|
|
146
|
-
disablePlayBtn: 'boolean',
|
|
147
|
-
disableSeek: 'boolean',
|
|
148
|
-
disableFullscreenWin: 'boolean',
|
|
149
|
-
disablePicInPic: 'boolean',
|
|
150
|
-
disableVolumeControl: 'boolean',
|
|
151
|
-
lostFocusPause: 'boolean',
|
|
152
|
-
autoSmallWindow: 'boolean',
|
|
153
|
-
thumbnails: 'object',
|
|
154
|
-
sendDanmu: 'function',
|
|
155
|
-
danmuBarId: 'string',
|
|
156
|
-
fluid: 'boolean'
|
|
157
|
-
};
|
|
158
|
-
/* harmony default export */ var mainvue_type_script_lang_js = ({
|
|
159
|
-
name: 'ZwPlayer',
|
|
160
|
-
data() {
|
|
161
|
-
return {
|
|
162
|
-
zwplayer: null,
|
|
163
|
-
nodename: 'ZwPlayer'
|
|
164
|
-
};
|
|
165
|
-
},
|
|
166
|
-
props: {
|
|
167
|
-
zwplayerlib: String,
|
|
168
|
-
murl: String,
|
|
169
|
-
nodeid: String,
|
|
170
|
-
muted: Boolean,
|
|
171
|
-
autoplay: {
|
|
172
|
-
type: Boolean,
|
|
173
|
-
default: true
|
|
174
|
-
},
|
|
175
|
-
videoprop: Object,
|
|
176
|
-
videostyle: String,
|
|
177
|
-
reconnect: {
|
|
178
|
-
type: Boolean,
|
|
179
|
-
default: true
|
|
180
|
-
},
|
|
181
|
-
controlbar: {
|
|
182
|
-
type: Boolean,
|
|
183
|
-
default: true
|
|
184
|
-
},
|
|
185
|
-
useProgressTooltip: {
|
|
186
|
-
type: Boolean,
|
|
187
|
-
default: true
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
emits: ['oneterror', 'onmediaevent', 'onready'],
|
|
191
|
-
methods: {
|
|
192
|
-
play(url, isLive, useOldFlv) {
|
|
193
|
-
let vm = this;
|
|
194
|
-
if (!url) url = this.murl;
|
|
195
|
-
if (!vm.zwplayer) return;
|
|
196
|
-
vm.zwplayer.play(url, isLive, useOldFlv);
|
|
197
|
-
},
|
|
198
|
-
stop() {
|
|
199
|
-
let vm = this;
|
|
200
|
-
if (vm.zwplayer) {
|
|
201
|
-
vm.zwplayer.stop();
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
pause() {
|
|
205
|
-
let vm = this;
|
|
206
|
-
if (vm.zwplayer) {
|
|
207
|
-
vm.zwplayer.pause();
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
resume() {
|
|
211
|
-
let vm = this;
|
|
212
|
-
if (vm.zwplayer) {
|
|
213
|
-
vm.zwplayer.resume();
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
getDuration() {
|
|
217
|
-
let vm = this;
|
|
218
|
-
if (vm.zwplayer) {
|
|
219
|
-
return vm.zwplayer.getDuration();
|
|
220
|
-
}
|
|
221
|
-
return undefined;
|
|
222
|
-
},
|
|
223
|
-
getCurrentTime() {
|
|
224
|
-
let vm = this;
|
|
225
|
-
if (vm.zwplayer) {
|
|
226
|
-
return vm.zwplayer.CurrentTime;
|
|
227
|
-
}
|
|
228
|
-
return undefined;
|
|
229
|
-
},
|
|
230
|
-
seekTime(time) {
|
|
231
|
-
let vm = this;
|
|
232
|
-
if (vm.zwplayer) {
|
|
233
|
-
vm.zwplayer.seekTime(time);
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
destroy() {
|
|
237
|
-
let vm = this;
|
|
238
|
-
if (vm.zwplayer) {
|
|
239
|
-
vm.zwplayer.destroy();
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
setplaystate(bPlaying) {
|
|
243
|
-
let vm = this;
|
|
244
|
-
if (vm.zwplayer) {
|
|
245
|
-
vm.zwplayer.setplaystate(bPlaying);
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
setEnableDanmu(bEnable) {
|
|
249
|
-
let vm = this;
|
|
250
|
-
if (vm.zwplayer) {
|
|
251
|
-
vm.zwplayer.setEnableDanmu(bEnable);
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
appendDanmu(msgObj, setting) {
|
|
255
|
-
let vm = this;
|
|
256
|
-
if (vm.zwplayer) {
|
|
257
|
-
vm.zwplayer.appendDanmu(msgObj, setting);
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
setChapters(chapters) {
|
|
261
|
-
let vm = this;
|
|
262
|
-
if (vm.zwplayer) {
|
|
263
|
-
vm.zwplayer.setChapters(chapters);
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
addSubtitle(subtitleUrl, pos, title) {
|
|
267
|
-
let vm = this;
|
|
268
|
-
if (vm.zwplayer) {
|
|
269
|
-
vm.zwplayer.addSubtitle(subtitleUrl, pos, title);
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
removeSubtitle() {
|
|
273
|
-
let vm = this;
|
|
274
|
-
if (vm.zwplayer) {
|
|
275
|
-
vm.zwplayer.removeSubtitle();
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
buildDanmuControlbar(parentId, className) {
|
|
279
|
-
let vm = this;
|
|
280
|
-
if (vm.zwplayer) {
|
|
281
|
-
vm.zwplayer.buildDanmuControlbar(parentId, className);
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
notifyResize(width, height) {
|
|
285
|
-
let vm = this;
|
|
286
|
-
if (vm.zwplayer) {
|
|
287
|
-
vm.zwplayer.notifyResize(width, height);
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
setMute(bMute) {
|
|
291
|
-
let vm = this;
|
|
292
|
-
if (vm.zwplayer) {
|
|
293
|
-
vm.zwplayer.setMuted(bMute);
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
setullscr(bFullScr) {
|
|
297
|
-
let vm = this;
|
|
298
|
-
if (vm.zwplayer) {
|
|
299
|
-
vm.is_fullscr = bFullScr;
|
|
300
|
-
vm.zwplayer.setFullscreen(bFullScr);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
computed: {
|
|
305
|
-
CurrentTime: function () {
|
|
306
|
-
let vm = this;
|
|
307
|
-
if (vm.zwplayer) {
|
|
308
|
-
return vm.zwplayer.CurrentTime;
|
|
309
|
-
}
|
|
310
|
-
return -1;
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
render(createElement) {
|
|
314
|
-
let playerid;
|
|
315
|
-
|
|
316
|
-
// console.log('render');
|
|
317
|
-
if (this.nodeid) {
|
|
318
|
-
playerid = this.nodeid;
|
|
319
|
-
} else {
|
|
320
|
-
let now = new Date().getTime();
|
|
321
|
-
if (!window.nextZWPlayerId) {
|
|
322
|
-
window.nextZWPlayerId = 1000;
|
|
323
|
-
} else {
|
|
324
|
-
window.nextZWPlayerId++;
|
|
325
|
-
}
|
|
326
|
-
playerid = 'zwplayer-' + window.nextZWPlayerId + '-' + now;
|
|
327
|
-
}
|
|
328
|
-
let playerWrap = createElement('div', {
|
|
329
|
-
class: {
|
|
330
|
-
'zwplayer-vue': true
|
|
331
|
-
},
|
|
332
|
-
attrs: {
|
|
333
|
-
id: playerid
|
|
334
|
-
}
|
|
335
|
-
}, []);
|
|
336
|
-
if (playerWrap) {
|
|
337
|
-
let vm = this;
|
|
338
|
-
vm.playerid = playerid;
|
|
339
|
-
}
|
|
340
|
-
if (this.zwplayer && this.murl !== this.old_murl) {
|
|
341
|
-
this.zwplayer.play(this.murl); // change movie url
|
|
342
|
-
this.old_murl = this.murl;
|
|
343
|
-
}
|
|
344
|
-
return playerWrap;
|
|
345
|
-
},
|
|
346
|
-
mounted() {
|
|
347
|
-
let vm = this;
|
|
348
|
-
// console.log('mounted');
|
|
349
|
-
let zwplayer_js;
|
|
350
|
-
if (vm.zwplayerlib) zwplayer_js = vm.zwplayerlib;else zwplayer_js = zwplayer_js_def;
|
|
351
|
-
vm.rootElm = document.getElementById(vm.playerid);
|
|
352
|
-
if (vm.rootElm) {
|
|
353
|
-
vm.rootElm.style.width = '100%';
|
|
354
|
-
vm.rootElm.style.height = '100%';
|
|
355
|
-
vm.rootElm.style.margin = '0';
|
|
356
|
-
vm.rootElm.style.padding = '0';
|
|
357
|
-
}
|
|
358
|
-
(0,loadjs/* zwplayer_loadjs */.l)('zwplayer-core', zwplayer_js, function (jsid) {
|
|
359
|
-
let url = '';
|
|
360
|
-
if (!jsid) {
|
|
361
|
-
console.log('zwplayer_loadjs failed!');
|
|
362
|
-
}
|
|
363
|
-
if (vm.murl) url = vm.murl;else if (vm.videoprop && typeof vm.videoprop.url !== 'undefined') url = vm.videoprop.url;
|
|
364
|
-
let videostyle = "width:100%;height:100%;";
|
|
365
|
-
if (vm.videoprop && typeof vm.videoprop.videostyle !== 'undefined') videostyle = vm.videoprop.videostyle;
|
|
366
|
-
let params = {
|
|
367
|
-
url: url,
|
|
368
|
-
playerElm: vm.rootElm,
|
|
369
|
-
videostyle: videostyle,
|
|
370
|
-
reconnect: vm.reconnect,
|
|
371
|
-
autoplay: vm.autoplay,
|
|
372
|
-
muted: vm.muted,
|
|
373
|
-
controlbar: vm.controlbar,
|
|
374
|
-
useProgressTooltip: vm.useProgressTooltip,
|
|
375
|
-
onready: function () {
|
|
376
|
-
vm.$emit('onready', this);
|
|
377
|
-
},
|
|
378
|
-
onnetclose: function () {
|
|
379
|
-
vm.$emit('onnetclose', this);
|
|
380
|
-
return true;
|
|
381
|
-
},
|
|
382
|
-
onneterror: function () {
|
|
383
|
-
vm.$emit('onneterror', this);
|
|
384
|
-
},
|
|
385
|
-
onmediaevent: function (event) {
|
|
386
|
-
vm.$emit('onmediaevent', event, this);
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
let props_list = availabe_props;
|
|
390
|
-
for (let prop in vm.$attrs) {
|
|
391
|
-
if (prop in props_list && typeof vm.$attrs[prop] === props_list[prop]) {
|
|
392
|
-
if (typeof vm.$attrs[prop] === 'object') params[prop] = JSON.parse(JSON.stringify(vm.$attrs[prop]));else params[prop] = vm.$attrs[prop];
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
vm.zwplayer = new window.ZWPlayer(params);
|
|
396
|
-
if (params.danmuBarId) {
|
|
397
|
-
vm.zwplayer.buildDanmuControlbar(params.danmuBarId, 'vue-zwp-danmubar');
|
|
398
|
-
}
|
|
399
|
-
vm.old_murl = url;
|
|
400
|
-
});
|
|
401
|
-
},
|
|
402
|
-
beforeDestroy() {
|
|
403
|
-
// vue3.x beforeUnmount
|
|
404
|
-
let vm = this;
|
|
405
|
-
// console.log('beforeUnmount');
|
|
406
|
-
if (vm.zwplayer) {
|
|
407
|
-
vm.zwplayer.stop();
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
destroyed() {
|
|
411
|
-
// vue3.x unmounted
|
|
412
|
-
let vm = this;
|
|
413
|
-
// console.log('unmounted');
|
|
414
|
-
if (vm.zwplayer) {
|
|
415
|
-
vm.zwplayer.destroy();
|
|
416
|
-
delete vm.zwplayer;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
;// CONCATENATED MODULE: ./sources/vueplayer/src/main.vue?vue&type=script&lang=js
|
|
421
|
-
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
422
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
423
|
-
/* globals __VUE_SSR_CONTEXT__ */
|
|
424
|
-
|
|
425
|
-
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
426
|
-
// This module is a runtime utility for cleaner component module output and will
|
|
427
|
-
// be included in the final webpack user bundle.
|
|
428
|
-
|
|
429
|
-
function normalizeComponent(
|
|
430
|
-
scriptExports,
|
|
431
|
-
render,
|
|
432
|
-
staticRenderFns,
|
|
433
|
-
functionalTemplate,
|
|
434
|
-
injectStyles,
|
|
435
|
-
scopeId,
|
|
436
|
-
moduleIdentifier /* server only */,
|
|
437
|
-
shadowMode /* vue-cli only */
|
|
438
|
-
) {
|
|
439
|
-
// Vue.extend constructor export interop
|
|
440
|
-
var options =
|
|
441
|
-
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
442
|
-
|
|
443
|
-
// render functions
|
|
444
|
-
if (render) {
|
|
445
|
-
options.render = render
|
|
446
|
-
options.staticRenderFns = staticRenderFns
|
|
447
|
-
options._compiled = true
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
// functional template
|
|
451
|
-
if (functionalTemplate) {
|
|
452
|
-
options.functional = true
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// scopedId
|
|
456
|
-
if (scopeId) {
|
|
457
|
-
options._scopeId = 'data-v-' + scopeId
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
var hook
|
|
461
|
-
if (moduleIdentifier) {
|
|
462
|
-
// server build
|
|
463
|
-
hook = function (context) {
|
|
464
|
-
// 2.3 injection
|
|
465
|
-
context =
|
|
466
|
-
context || // cached call
|
|
467
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
468
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
469
|
-
// 2.2 with runInNewContext: true
|
|
470
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
471
|
-
context = __VUE_SSR_CONTEXT__
|
|
472
|
-
}
|
|
473
|
-
// inject component styles
|
|
474
|
-
if (injectStyles) {
|
|
475
|
-
injectStyles.call(this, context)
|
|
476
|
-
}
|
|
477
|
-
// register component module identifier for async chunk inferrence
|
|
478
|
-
if (context && context._registeredComponents) {
|
|
479
|
-
context._registeredComponents.add(moduleIdentifier)
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
// used by ssr in case component is cached and beforeCreate
|
|
483
|
-
// never gets called
|
|
484
|
-
options._ssrRegister = hook
|
|
485
|
-
} else if (injectStyles) {
|
|
486
|
-
hook = shadowMode
|
|
487
|
-
? function () {
|
|
488
|
-
injectStyles.call(
|
|
489
|
-
this,
|
|
490
|
-
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
491
|
-
)
|
|
492
|
-
}
|
|
493
|
-
: injectStyles
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
if (hook) {
|
|
497
|
-
if (options.functional) {
|
|
498
|
-
// for template-only hot-reload because in that case the render fn doesn't
|
|
499
|
-
// go through the normalizer
|
|
500
|
-
options._injectStyles = hook
|
|
501
|
-
// register for functional component in vue file
|
|
502
|
-
var originalRender = options.render
|
|
503
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
504
|
-
hook.call(context)
|
|
505
|
-
return originalRender(h, context)
|
|
506
|
-
}
|
|
507
|
-
} else {
|
|
508
|
-
// inject component registration as beforeCreate hook
|
|
509
|
-
var existing = options.beforeCreate
|
|
510
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
return {
|
|
515
|
-
exports: scriptExports,
|
|
516
|
-
options: options
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
;// CONCATENATED MODULE: ./sources/vueplayer/src/main.vue
|
|
521
|
-
var render, staticRenderFns
|
|
522
|
-
;
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
/* normalize component */
|
|
527
|
-
;
|
|
528
|
-
var component = normalizeComponent(
|
|
529
|
-
src_mainvue_type_script_lang_js,
|
|
530
|
-
render,
|
|
531
|
-
staticRenderFns,
|
|
532
|
-
false,
|
|
533
|
-
null,
|
|
534
|
-
null,
|
|
535
|
-
null
|
|
536
|
-
|
|
537
|
-
)
|
|
538
|
-
|
|
539
|
-
/* harmony default export */ var main = (component.exports);
|
|
540
|
-
;// CONCATENATED MODULE: ./sources/vueplayer/index.js
|
|
541
|
-
//export defines
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/* istanbul ignore next */
|
|
545
|
-
main.install = function (Vue) {
|
|
546
|
-
Vue.component(main.name, main); //
|
|
547
|
-
Vue.component('zero-web-player', main);
|
|
548
|
-
Vue.component('zero-player', main);
|
|
549
|
-
Vue.component('ZPlayer', main);
|
|
550
|
-
};
|
|
551
|
-
/* harmony default export */ var vueplayer = (main);
|
|
552
|
-
|
|
553
|
-
/***/ }),
|
|
554
|
-
|
|
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;
|
|
618
|
-
};
|
|
619
|
-
module.exports.l = zwplayer_loadjs;
|
|
620
|
-
|
|
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
|
-
/******/
|
|
759
|
-
/******/ return __webpack_exports__;
|
|
760
|
-
/******/ })()
|
|
761
|
-
;
|
|
762
|
-
});
|
|
763
|
-
//# sourceMappingURL=zwplayervue2.umd.js.map
|