zwplayer-vue2x 1.0.15 → 1.0.17

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.
@@ -0,0 +1,763 @@
1
+ /******/ (function() { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ 709:
5
+ /***/ (function(module) {
6
+
7
+ // zwplayer tools
8
+
9
+ const zwplayer_loadjs = function (id, url, cb) {
10
+ let headNode = document.getElementsByTagName("head");
11
+ if (headNode.length == 0) {
12
+ headNode = document.createElement("head");
13
+ let body = document.getElementsByTagName("body");
14
+ if (body.length > 0) {
15
+ body = body[0];
16
+ document.insertBefore(headNode, body);
17
+ } else {
18
+ alert('Invalid html document: no HEAD tag');
19
+ return false;
20
+ }
21
+ } else {
22
+ headNode = headNode[0];
23
+ const nodes = headNode.childNodes;
24
+ for (let i = 0; i < nodes.length; i++) {
25
+ const node = nodes[i];
26
+ if (node.nodeName.toUpperCase() === 'SCRIPT') {
27
+ if (node.id && node.id == id) {
28
+ if (node.getAttribute('loadstate') != 'true') {
29
+ const checkLoad = function () {
30
+ if (node.getAttribute('loadstate') != 'true') {
31
+ setTimeout(checkLoad, 50);
32
+ } else {
33
+ if (typeof cb == 'function') cb(id);
34
+ }
35
+ };
36
+ setTimeout(checkLoad, 50);
37
+ return false;
38
+ }
39
+ if (typeof cb == 'function') cb(id);
40
+ return true;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ const script = document.createElement("script");
46
+ script.type = "text/javascript";
47
+ if (script.readyState) {
48
+ // IE
49
+ script.onreadystatechange = function () {
50
+ if (script.readyState == "loaded" || script.readyState == "complete") {
51
+ script.onreadystatechange = null;
52
+ script.setAttribute('loadstate', 'true');
53
+ if (typeof cb == 'function') cb(id);
54
+ }
55
+ };
56
+ } else {
57
+ script.onload = function () {
58
+ script.setAttribute('loadstate', 'true');
59
+ script.setAttribute('charset', 'utf-8');
60
+ if (typeof cb == 'function') cb(id);
61
+ };
62
+ }
63
+ script.id = id;
64
+ script.src = url;
65
+ headNode.appendChild(script);
66
+ return false;
67
+ };
68
+ module.exports.l = zwplayer_loadjs;
69
+
70
+ /***/ })
71
+
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
+
140
+ // EXPORTS
141
+ __webpack_require__.d(__webpack_exports__, {
142
+ Player: function() { return /* reexport */ Player; },
143
+ "default": function() { return /* binding */ entry_lib; },
144
+ zwplayer: function() { return /* reexport */ vueplayer; }
145
+ });
146
+
147
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
148
+ /* eslint-disable no-var */
149
+ // This file is imported into lib/wc client bundles.
150
+
151
+ if (typeof window !== 'undefined') {
152
+ var currentScript = window.document.currentScript
153
+ if (false) { var getCurrentScript; }
154
+
155
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
156
+ if (src) {
157
+ __webpack_require__.p = src[1] // eslint-disable-line
158
+ }
159
+ }
160
+
161
+ // Indicate to webpack that this file can be concatenated
162
+ /* harmony default export */ var setPublicPath = (null);
163
+
164
+ // EXTERNAL MODULE: ./sources/vueplayer/src/loadjs.js
165
+ var loadjs = __webpack_require__(709);
166
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./sources/vueplayer/src/main.vue?vue&type=script&lang=js
167
+ // import { h } from 'vue'
168
+
169
+ const zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
170
+ const availabe_props = {
171
+ isLive: 'boolean',
172
+ useOldFlv: 'boolean',
173
+ useFlv: 'boolean',
174
+ streamtype: 'string',
175
+ hasAudio: 'boolean',
176
+ hasVideo: 'boolean',
177
+ xmc_url: 'string',
178
+ fixedControlbar: 'boolean',
179
+ nativecontrols: 'boolean',
180
+ infoButton: 'boolean',
181
+ speedButton: 'boolean',
182
+ optionButton: 'boolean',
183
+ snapshotButton: 'boolean',
184
+ chapterButton: 'boolean',
185
+ enableDanmu: 'boolean',
186
+ useProgressTooltip: 'boolean',
187
+ hidePlayBtn: 'boolean',
188
+ disablePlayBtn: 'boolean',
189
+ disableSeek: 'boolean',
190
+ disableFullscreenWin: 'boolean',
191
+ disablePicInPic: 'boolean',
192
+ disableVolumeControl: 'boolean',
193
+ lostFocusPause: 'boolean',
194
+ autoSmallWindow: 'boolean',
195
+ thumbnails: 'object',
196
+ sendDanmu: 'function',
197
+ danmuBarId: 'string',
198
+ fluid: 'boolean'
199
+ };
200
+ /* harmony default export */ var mainvue_type_script_lang_js = ({
201
+ name: 'ZwPlayer',
202
+ data() {
203
+ return {
204
+ zwplayer: null,
205
+ nodename: 'ZwPlayer'
206
+ };
207
+ },
208
+ props: {
209
+ zwplayerlib: String,
210
+ murl: String,
211
+ nodeid: String,
212
+ muted: Boolean,
213
+ autoplay: {
214
+ type: Boolean,
215
+ default: true
216
+ },
217
+ videoprop: Object,
218
+ videostyle: String,
219
+ reconnect: {
220
+ type: Boolean,
221
+ default: true
222
+ },
223
+ controlbar: {
224
+ type: Boolean,
225
+ default: true
226
+ },
227
+ useProgressTooltip: {
228
+ type: Boolean,
229
+ default: true
230
+ }
231
+ },
232
+ emits: ['oneterror', 'onmediaevent', 'onready'],
233
+ methods: {
234
+ play(url, isLive, useOldFlv) {
235
+ let vm = this;
236
+ if (!url) url = this.murl;
237
+ if (!vm.zwplayer) return;
238
+ vm.zwplayer.play(url, isLive, useOldFlv);
239
+ },
240
+ stop() {
241
+ let vm = this;
242
+ if (vm.zwplayer) {
243
+ vm.zwplayer.stop();
244
+ }
245
+ },
246
+ pause() {
247
+ let vm = this;
248
+ if (vm.zwplayer) {
249
+ vm.zwplayer.pause();
250
+ }
251
+ },
252
+ resume() {
253
+ let vm = this;
254
+ if (vm.zwplayer) {
255
+ vm.zwplayer.resume();
256
+ }
257
+ },
258
+ getDuration() {
259
+ let vm = this;
260
+ if (vm.zwplayer) {
261
+ return vm.zwplayer.getDuration();
262
+ }
263
+ return undefined;
264
+ },
265
+ getCurrentTime() {
266
+ let vm = this;
267
+ if (vm.zwplayer) {
268
+ return vm.zwplayer.CurrentTime;
269
+ }
270
+ return undefined;
271
+ },
272
+ seekTime(time) {
273
+ let vm = this;
274
+ if (vm.zwplayer) {
275
+ vm.zwplayer.seekTime(time);
276
+ }
277
+ },
278
+ destroy() {
279
+ let vm = this;
280
+ if (vm.zwplayer) {
281
+ vm.zwplayer.destroy();
282
+ }
283
+ },
284
+ setplaystate(bPlaying) {
285
+ let vm = this;
286
+ if (vm.zwplayer) {
287
+ vm.zwplayer.setplaystate(bPlaying);
288
+ }
289
+ },
290
+ setEnableDanmu(bEnable) {
291
+ let vm = this;
292
+ if (vm.zwplayer) {
293
+ vm.zwplayer.setEnableDanmu(bEnable);
294
+ }
295
+ },
296
+ appendDanmu(msgObj, setting) {
297
+ let vm = this;
298
+ if (vm.zwplayer) {
299
+ vm.zwplayer.appendDanmu(msgObj, setting);
300
+ }
301
+ },
302
+ setChapters(chapters) {
303
+ let vm = this;
304
+ if (vm.zwplayer) {
305
+ vm.zwplayer.setChapters(chapters);
306
+ }
307
+ },
308
+ addSubtitle(subtitleUrl, pos, title) {
309
+ let vm = this;
310
+ if (vm.zwplayer) {
311
+ vm.zwplayer.addSubtitle(subtitleUrl, pos, title);
312
+ }
313
+ },
314
+ removeSubtitle() {
315
+ let vm = this;
316
+ if (vm.zwplayer) {
317
+ vm.zwplayer.removeSubtitle();
318
+ }
319
+ },
320
+ buildDanmuControlbar(parentId, className) {
321
+ let vm = this;
322
+ if (vm.zwplayer) {
323
+ vm.zwplayer.buildDanmuControlbar(parentId, className);
324
+ }
325
+ },
326
+ notifyResize(width, height) {
327
+ let vm = this;
328
+ if (vm.zwplayer) {
329
+ vm.zwplayer.notifyResize(width, height);
330
+ }
331
+ },
332
+ setMute(bMute) {
333
+ let vm = this;
334
+ if (vm.zwplayer) {
335
+ vm.zwplayer.setMuted(bMute);
336
+ }
337
+ },
338
+ setullscr(bFullScr) {
339
+ let vm = this;
340
+ if (vm.zwplayer) {
341
+ vm.is_fullscr = bFullScr;
342
+ vm.zwplayer.setFullscreen(bFullScr);
343
+ }
344
+ }
345
+ },
346
+ computed: {
347
+ CurrentTime: function () {
348
+ let vm = this;
349
+ if (vm.zwplayer) {
350
+ return vm.zwplayer.CurrentTime;
351
+ }
352
+ return -1;
353
+ }
354
+ },
355
+ render(createElement) {
356
+ let playerid;
357
+
358
+ // console.log('render');
359
+ if (this.nodeid) {
360
+ playerid = this.nodeid;
361
+ } else {
362
+ let now = new Date().getTime();
363
+ if (!window.nextZWPlayerId) {
364
+ window.nextZWPlayerId = 1000;
365
+ } else {
366
+ window.nextZWPlayerId++;
367
+ }
368
+ playerid = 'zwplayer-' + window.nextZWPlayerId + '-' + now;
369
+ }
370
+ let playerWrap = createElement('div', {
371
+ class: {
372
+ 'zwplayer-vue': true
373
+ },
374
+ attrs: {
375
+ id: playerid
376
+ }
377
+ }, []);
378
+ if (playerWrap) {
379
+ let vm = this;
380
+ vm.playerid = playerid;
381
+ }
382
+ if (this.zwplayer && this.murl !== this.old_murl) {
383
+ this.zwplayer.play(this.murl); // change movie url
384
+ this.old_murl = this.murl;
385
+ }
386
+ return playerWrap;
387
+ },
388
+ mounted() {
389
+ let vm = this;
390
+ // console.log('mounted');
391
+ let zwplayer_js;
392
+ if (vm.zwplayerlib) zwplayer_js = vm.zwplayerlib;else zwplayer_js = zwplayer_js_def;
393
+ vm.rootElm = document.getElementById(vm.playerid);
394
+ if (vm.rootElm) {
395
+ vm.rootElm.style.width = '100%';
396
+ vm.rootElm.style.height = '100%';
397
+ vm.rootElm.style.margin = '0';
398
+ vm.rootElm.style.padding = '0';
399
+ }
400
+ (0,loadjs/* zwplayer_loadjs */.l)('zwplayer-core', zwplayer_js, function (jsid) {
401
+ let url = '';
402
+ if (!jsid) {
403
+ console.log('zwplayer_loadjs failed!');
404
+ }
405
+ if (vm.murl) url = vm.murl;else if (vm.videoprop && typeof vm.videoprop.url !== 'undefined') url = vm.videoprop.url;
406
+ let videostyle = "width:100%;height:100%;";
407
+ if (vm.videoprop && typeof vm.videoprop.videostyle !== 'undefined') videostyle = vm.videoprop.videostyle;
408
+ let params = {
409
+ url: url,
410
+ playerElm: vm.rootElm,
411
+ videostyle: videostyle,
412
+ reconnect: vm.reconnect,
413
+ autoplay: vm.autoplay,
414
+ muted: vm.muted,
415
+ controlbar: vm.controlbar,
416
+ useProgressTooltip: vm.useProgressTooltip,
417
+ onready: function () {
418
+ vm.$emit('onready', this);
419
+ },
420
+ onnetclose: function () {
421
+ vm.$emit('onnetclose', this);
422
+ return true;
423
+ },
424
+ onneterror: function () {
425
+ vm.$emit('onneterror', this);
426
+ },
427
+ onmediaevent: function (event) {
428
+ vm.$emit('onmediaevent', event, this);
429
+ }
430
+ };
431
+ let props_list = availabe_props;
432
+ for (let prop in vm.$attrs) {
433
+ if (prop in props_list && typeof vm.$attrs[prop] === props_list[prop]) {
434
+ if (typeof vm.$attrs[prop] === 'object') params[prop] = JSON.parse(JSON.stringify(vm.$attrs[prop]));else params[prop] = vm.$attrs[prop];
435
+ }
436
+ }
437
+ vm.zwplayer = new window.ZWPlayer(params);
438
+ if (params.danmuBarId) {
439
+ vm.zwplayer.buildDanmuControlbar(params.danmuBarId, 'vue-zwp-danmubar');
440
+ }
441
+ vm.old_murl = url;
442
+ });
443
+ },
444
+ beforeDestroy() {
445
+ // vue3.x beforeUnmount
446
+ let vm = this;
447
+ // console.log('beforeUnmount');
448
+ if (vm.zwplayer) {
449
+ vm.zwplayer.stop();
450
+ }
451
+ },
452
+ destroyed() {
453
+ // vue3.x unmounted
454
+ let vm = this;
455
+ // console.log('unmounted');
456
+ if (vm.zwplayer) {
457
+ vm.zwplayer.destroy();
458
+ delete vm.zwplayer;
459
+ }
460
+ }
461
+ });
462
+ ;// CONCATENATED MODULE: ./sources/vueplayer/src/main.vue?vue&type=script&lang=js
463
+ /* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
464
+ ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
465
+ /* globals __VUE_SSR_CONTEXT__ */
466
+
467
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
468
+ // This module is a runtime utility for cleaner component module output and will
469
+ // be included in the final webpack user bundle.
470
+
471
+ function normalizeComponent(
472
+ scriptExports,
473
+ render,
474
+ staticRenderFns,
475
+ functionalTemplate,
476
+ injectStyles,
477
+ scopeId,
478
+ moduleIdentifier /* server only */,
479
+ shadowMode /* vue-cli only */
480
+ ) {
481
+ // Vue.extend constructor export interop
482
+ var options =
483
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
484
+
485
+ // render functions
486
+ if (render) {
487
+ options.render = render
488
+ options.staticRenderFns = staticRenderFns
489
+ options._compiled = true
490
+ }
491
+
492
+ // functional template
493
+ if (functionalTemplate) {
494
+ options.functional = true
495
+ }
496
+
497
+ // scopedId
498
+ if (scopeId) {
499
+ options._scopeId = 'data-v-' + scopeId
500
+ }
501
+
502
+ var hook
503
+ if (moduleIdentifier) {
504
+ // server build
505
+ hook = function (context) {
506
+ // 2.3 injection
507
+ context =
508
+ context || // cached call
509
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
510
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
511
+ // 2.2 with runInNewContext: true
512
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
513
+ context = __VUE_SSR_CONTEXT__
514
+ }
515
+ // inject component styles
516
+ if (injectStyles) {
517
+ injectStyles.call(this, context)
518
+ }
519
+ // register component module identifier for async chunk inferrence
520
+ if (context && context._registeredComponents) {
521
+ context._registeredComponents.add(moduleIdentifier)
522
+ }
523
+ }
524
+ // used by ssr in case component is cached and beforeCreate
525
+ // never gets called
526
+ options._ssrRegister = hook
527
+ } else if (injectStyles) {
528
+ hook = shadowMode
529
+ ? function () {
530
+ injectStyles.call(
531
+ this,
532
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
533
+ )
534
+ }
535
+ : injectStyles
536
+ }
537
+
538
+ if (hook) {
539
+ if (options.functional) {
540
+ // for template-only hot-reload because in that case the render fn doesn't
541
+ // go through the normalizer
542
+ options._injectStyles = hook
543
+ // register for functional component in vue file
544
+ var originalRender = options.render
545
+ options.render = function renderWithStyleInjection(h, context) {
546
+ hook.call(context)
547
+ return originalRender(h, context)
548
+ }
549
+ } else {
550
+ // inject component registration as beforeCreate hook
551
+ var existing = options.beforeCreate
552
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
553
+ }
554
+ }
555
+
556
+ return {
557
+ exports: scriptExports,
558
+ options: options
559
+ }
560
+ }
561
+
562
+ ;// CONCATENATED MODULE: ./sources/vueplayer/src/main.vue
563
+ var render, staticRenderFns
564
+ ;
565
+
566
+
567
+
568
+ /* normalize component */
569
+ ;
570
+ var component = normalizeComponent(
571
+ src_mainvue_type_script_lang_js,
572
+ render,
573
+ staticRenderFns,
574
+ false,
575
+ null,
576
+ null,
577
+ null
578
+
579
+ )
580
+
581
+ /* harmony default export */ var main = (component.exports);
582
+ ;// CONCATENATED MODULE: ./sources/vueplayer/index.js
583
+ //export defines
584
+
585
+
586
+ /* istanbul ignore next */
587
+ main.install = function (Vue) {
588
+ Vue.component(main.name, main); //
589
+ Vue.component('zero-web-player', main);
590
+ Vue.component('zero-player', main);
591
+ Vue.component('ZPlayer', main);
592
+ };
593
+ /* harmony default export */ var vueplayer = (main);
594
+ ;// CONCATENATED MODULE: ./sources/index.js
595
+ // 引入该目录下所有的组件
596
+
597
+
598
+ const components = [vueplayer];
599
+ const ZwModule = {};
600
+ ZwModule.install = Vue => {
601
+ components.forEach(component => {
602
+ component.install(Vue);
603
+ });
604
+ };
605
+ if (typeof window !== 'undefined' && window.Vue) {
606
+ ZwModule.install(window.Vue);
607
+ }
608
+ const sources_zwplayer_js_def = 'zwplayer/zwplayer.js?v=3.6';
609
+ const Player = function (param) {
610
+ this.zwplayer = null;
611
+ (0,loadjs/* zwplayer_loadjs */.l)('zwplayer-core', sources_zwplayer_js_def, function (jsid) {
612
+ if (jsid) {
613
+ this.zwplayer = new window.ZWPlayer(param);
614
+ } else {
615
+ console.log('Load zwplayer library failed.');
616
+ }
617
+ });
618
+ };
619
+ Player.prototype = {
620
+ play(url, isLive, useOldFlv) {
621
+ let vm = this;
622
+ if (!url) url = this.murl;
623
+ if (!vm.zwplayer) return;
624
+ vm.zwplayer.play(url, isLive, useOldFlv);
625
+ },
626
+ stop() {
627
+ let vm = this;
628
+ if (vm.zwplayer) {
629
+ vm.zwplayer.stop();
630
+ }
631
+ },
632
+ pause() {
633
+ let vm = this;
634
+ if (vm.zwplayer) {
635
+ vm.zwplayer.pause();
636
+ }
637
+ },
638
+ resume() {
639
+ let vm = this;
640
+ if (vm.zwplayer) {
641
+ vm.zwplayer.resume();
642
+ }
643
+ },
644
+ getDuration() {
645
+ let vm = this;
646
+ if (vm.zwplayer) {
647
+ return vm.zwplayer.getDuration();
648
+ }
649
+ return undefined;
650
+ },
651
+ getCurrentTime() {
652
+ let vm = this;
653
+ if (vm.zwplayer) {
654
+ return vm.zwplayer.CurrentTime;
655
+ }
656
+ return undefined;
657
+ },
658
+ seekTime(time) {
659
+ let vm = this;
660
+ if (vm.zwplayer) {
661
+ vm.zwplayer.seekTime(time);
662
+ }
663
+ },
664
+ destroy() {
665
+ let vm = this;
666
+ if (vm.zwplayer) {
667
+ vm.zwplayer.destroy();
668
+ }
669
+ },
670
+ setplaystate(bPlaying) {
671
+ let vm = this;
672
+ if (vm.zwplayer) {
673
+ vm.zwplayer.setplaystate(bPlaying);
674
+ }
675
+ },
676
+ setEnableDanmu(bEnable) {
677
+ let vm = this;
678
+ if (vm.zwplayer) {
679
+ vm.zwplayer.setEnableDanmu(bEnable);
680
+ }
681
+ },
682
+ appendDanmu(msgObj, setting) {
683
+ let vm = this;
684
+ if (vm.zwplayer) {
685
+ vm.zwplayer.appendDanmu(msgObj, setting);
686
+ }
687
+ },
688
+ setChapters(chapters) {
689
+ let vm = this;
690
+ if (vm.zwplayer) {
691
+ vm.zwplayer.setChapters(chapters);
692
+ }
693
+ },
694
+ addSubtitle(subtitleUrl, pos, title) {
695
+ let vm = this;
696
+ if (vm.zwplayer) {
697
+ vm.zwplayer.addSubtitle(subtitleUrl, pos, title);
698
+ }
699
+ },
700
+ removeSubtitle() {
701
+ let vm = this;
702
+ if (vm.zwplayer) {
703
+ vm.zwplayer.removeSubtitle();
704
+ }
705
+ },
706
+ buildDanmuControlbar(parentId, className) {
707
+ let vm = this;
708
+ if (vm.zwplayer) {
709
+ vm.zwplayer.buildDanmuControlbar(parentId, className);
710
+ }
711
+ },
712
+ notifyResize(width, height) {
713
+ let vm = this;
714
+ if (vm.zwplayer) {
715
+ vm.zwplayer.notifyResize(width, height);
716
+ }
717
+ },
718
+ setMute(bMute) {
719
+ let vm = this;
720
+ if (vm.zwplayer) {
721
+ vm.zwplayer.setMuted(bMute);
722
+ }
723
+ },
724
+ setullscr(bFullScr) {
725
+ let vm = this;
726
+ if (vm.zwplayer) {
727
+ vm.is_fullscr = bFullScr;
728
+ vm.zwplayer.setFullscreen(bFullScr);
729
+ }
730
+ },
731
+ lightOff() {
732
+ let vm = this;
733
+ if (vm.zwplayer) {
734
+ vm.zwplayer.lightOff();
735
+ }
736
+ },
737
+ lightOn() {
738
+ let vm = this;
739
+ if (vm.zwplayer) {
740
+ vm.zwplayer.lightOn();
741
+ }
742
+ },
743
+ get CurrentTime() {
744
+ let vm = this;
745
+ if (vm.zwplayer) {
746
+ return vm.zwplayer.CurrentTime;
747
+ }
748
+ return -1;
749
+ }
750
+ };
751
+
752
+ /* harmony default export */ var sources = (ZwModule);
753
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
754
+
755
+
756
+ /* harmony default export */ var entry_lib = (sources);
757
+
758
+
759
+ }();
760
+ module.exports = __webpack_exports__;
761
+ /******/ })()
762
+ ;
763
+ //# sourceMappingURL=zwplayervue2.common.js.map