@zhijiancloud/bpm 1.0.29 → 1.0.31
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/dist/141.umd.js +1 -0
- package/dist/204.umd.js +1 -0
- package/dist/557.umd.js +2 -0
- package/dist/557.umd.js.LICENSE.txt +283 -0
- package/dist/559.umd.js +1 -0
- package/dist/584.umd.js +1 -0
- package/dist/997.umd.js +1 -0
- package/dist/bpmAppointment.umd.js +1 -1
- package/dist/bpmArea.umd.js +1 -1
- package/dist/bpmAreaElevation.umd.js +1 -1
- package/dist/bpmAudit.umd.js +1 -1
- package/dist/bpmDateTime.umd.js +1 -1
- package/dist/bpmExternalFormLink.umd.js +1 -0
- package/dist/bpmField.umd.js +5 -5
- package/dist/bpmFieldsFilter.umd.js +3 -3
- package/dist/bpmFormField.umd.js +5 -5
- package/dist/bpmMapLocation.umd.js +1 -1
- package/dist/bpmMulFile.umd.js +1 -1
- package/dist/bpmMulImage.umd.js +1 -1
- package/dist/bpmNumber.umd.js +1 -1
- package/dist/bpmOverTime.umd.js +1 -1
- package/dist/bpmRating.umd.js +1 -1
- package/dist/bpmRichText.umd.js +1 -1
- package/dist/bpmSelect.umd.js +1 -1
- package/dist/bpmSelectCheckItem.umd.js +1 -1
- package/dist/bpmSelectEntranceForm.umd.js +3 -3
- package/dist/bpmSelectFromField.umd.js +1 -1
- package/dist/bpmSelectFromForm.umd.js +1 -1
- package/dist/bpmSelectFromId.umd.js +1 -1
- package/dist/bpmSelectFromMulForm.umd.js +1 -1
- package/dist/bpmSelectHouseOwner.umd.js +1 -1
- package/dist/bpmSelectIssue.umd.js +1 -1
- package/dist/bpmSelectUser.umd.js +1 -1
- package/dist/bpmSignature.umd.js +1 -1
- package/dist/bpmSpliter.umd.js +1 -1
- package/dist/bpmSubForm.umd.js +1 -1
- package/dist/bpmSubFormField.umd.js +5 -5
- package/dist/bpmText.umd.js +1 -1
- package/dist/bpmTime.umd.js +1 -1
- package/dist/bpmVideo.umd.js +1 -0
- package/dist/bpmVideo.umd.js.LICENSE.txt +283 -0
- package/dist/css/bpmExternalFormLink.css +1 -0
- package/dist/css/index.css +1 -1
- package/dist/index.umd.js +5 -5
- package/package.json +1 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
3
|
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
4
|
+
* @license Licensed under MIT license
|
|
5
|
+
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
6
|
+
* @version v4.2.8+1e68dce6
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*! ../config.js */
|
|
10
|
+
|
|
11
|
+
/*! ../core/media-info.js */
|
|
12
|
+
|
|
13
|
+
/*! ../core/media-segment-info.js */
|
|
14
|
+
|
|
15
|
+
/*! ../core/mse-controller.js */
|
|
16
|
+
|
|
17
|
+
/*! ../core/mse-events.js */
|
|
18
|
+
|
|
19
|
+
/*! ../core/transmuxer.js */
|
|
20
|
+
|
|
21
|
+
/*! ../core/transmuxing-events.js */
|
|
22
|
+
|
|
23
|
+
/*! ../demux/demux-errors.js */
|
|
24
|
+
|
|
25
|
+
/*! ../demux/flv-demuxer.js */
|
|
26
|
+
|
|
27
|
+
/*! ../io/io-controller.js */
|
|
28
|
+
|
|
29
|
+
/*! ../io/loader.js */
|
|
30
|
+
|
|
31
|
+
/*! ../remux/mp4-remuxer.js */
|
|
32
|
+
|
|
33
|
+
/*! ../utils/browser.js */
|
|
34
|
+
|
|
35
|
+
/*! ../utils/exception.js */
|
|
36
|
+
|
|
37
|
+
/*! ../utils/logger.js */
|
|
38
|
+
|
|
39
|
+
/*! ../utils/logging-control.js */
|
|
40
|
+
|
|
41
|
+
/*! ../utils/polyfill.js */
|
|
42
|
+
|
|
43
|
+
/*! ../utils/utf8-conv.js */
|
|
44
|
+
|
|
45
|
+
/*! ./aac-silent.js */
|
|
46
|
+
|
|
47
|
+
/*! ./amf-parser.js */
|
|
48
|
+
|
|
49
|
+
/*! ./core/features.js */
|
|
50
|
+
|
|
51
|
+
/*! ./demux-errors.js */
|
|
52
|
+
|
|
53
|
+
/*! ./exp-golomb.js */
|
|
54
|
+
|
|
55
|
+
/*! ./fetch-stream-loader.js */
|
|
56
|
+
|
|
57
|
+
/*! ./flv.js */
|
|
58
|
+
|
|
59
|
+
/*! ./io/loader.js */
|
|
60
|
+
|
|
61
|
+
/*! ./loader.js */
|
|
62
|
+
|
|
63
|
+
/*! ./logger.js */
|
|
64
|
+
|
|
65
|
+
/*! ./media-info.js */
|
|
66
|
+
|
|
67
|
+
/*! ./media-segment-info.js */
|
|
68
|
+
|
|
69
|
+
/*! ./mp4-generator.js */
|
|
70
|
+
|
|
71
|
+
/*! ./mse-events.js */
|
|
72
|
+
|
|
73
|
+
/*! ./param-seek-handler.js */
|
|
74
|
+
|
|
75
|
+
/*! ./player-errors.js */
|
|
76
|
+
|
|
77
|
+
/*! ./player-events.js */
|
|
78
|
+
|
|
79
|
+
/*! ./player/flv-player.js */
|
|
80
|
+
|
|
81
|
+
/*! ./player/native-player.js */
|
|
82
|
+
|
|
83
|
+
/*! ./player/player-errors.js */
|
|
84
|
+
|
|
85
|
+
/*! ./player/player-events.js */
|
|
86
|
+
|
|
87
|
+
/*! ./range-seek-handler.js */
|
|
88
|
+
|
|
89
|
+
/*! ./speed-sampler.js */
|
|
90
|
+
|
|
91
|
+
/*! ./sps-parser.js */
|
|
92
|
+
|
|
93
|
+
/*! ./transmuxing-controller.js */
|
|
94
|
+
|
|
95
|
+
/*! ./transmuxing-events.js */
|
|
96
|
+
|
|
97
|
+
/*! ./transmuxing-worker */
|
|
98
|
+
|
|
99
|
+
/*! ./utils/exception.js */
|
|
100
|
+
|
|
101
|
+
/*! ./utils/logging-control.js */
|
|
102
|
+
|
|
103
|
+
/*! ./utils/polyfill.js */
|
|
104
|
+
|
|
105
|
+
/*! ./websocket-loader.js */
|
|
106
|
+
|
|
107
|
+
/*! ./xhr-moz-chunked-loader.js */
|
|
108
|
+
|
|
109
|
+
/*! ./xhr-range-loader.js */
|
|
110
|
+
|
|
111
|
+
/*! es6-promise */
|
|
112
|
+
|
|
113
|
+
/*! events */
|
|
114
|
+
|
|
115
|
+
/*! webworkify-webpack */
|
|
116
|
+
|
|
117
|
+
/*!********************!*\
|
|
118
|
+
!*** ./src/flv.js ***!
|
|
119
|
+
\********************/
|
|
120
|
+
|
|
121
|
+
/*!**********************!*\
|
|
122
|
+
!*** ./src/index.js ***!
|
|
123
|
+
\**********************/
|
|
124
|
+
|
|
125
|
+
/*!***********************!*\
|
|
126
|
+
!*** ./src/config.js ***!
|
|
127
|
+
\***********************/
|
|
128
|
+
|
|
129
|
+
/*!**************************!*\
|
|
130
|
+
!*** ./src/io/loader.js ***!
|
|
131
|
+
\**************************/
|
|
132
|
+
|
|
133
|
+
/*!*****************************!*\
|
|
134
|
+
!*** ./src/utils/logger.js ***!
|
|
135
|
+
\*****************************/
|
|
136
|
+
|
|
137
|
+
/*!******************************!*\
|
|
138
|
+
!*** ./src/core/features.js ***!
|
|
139
|
+
\******************************/
|
|
140
|
+
|
|
141
|
+
/*!******************************!*\
|
|
142
|
+
!*** ./src/utils/browser.js ***!
|
|
143
|
+
\******************************/
|
|
144
|
+
|
|
145
|
+
/*!*******************************!*\
|
|
146
|
+
!*** ./src/utils/polyfill.js ***!
|
|
147
|
+
\*******************************/
|
|
148
|
+
|
|
149
|
+
/*!********************************!*\
|
|
150
|
+
!*** ./src/core/media-info.js ***!
|
|
151
|
+
\********************************/
|
|
152
|
+
|
|
153
|
+
/*!********************************!*\
|
|
154
|
+
!*** ./src/core/mse-events.js ***!
|
|
155
|
+
\********************************/
|
|
156
|
+
|
|
157
|
+
/*!********************************!*\
|
|
158
|
+
!*** ./src/core/transmuxer.js ***!
|
|
159
|
+
\********************************/
|
|
160
|
+
|
|
161
|
+
/*!********************************!*\
|
|
162
|
+
!*** ./src/utils/exception.js ***!
|
|
163
|
+
\********************************/
|
|
164
|
+
|
|
165
|
+
/*!********************************!*\
|
|
166
|
+
!*** ./src/utils/utf8-conv.js ***!
|
|
167
|
+
\********************************/
|
|
168
|
+
|
|
169
|
+
/*!*********************************!*\
|
|
170
|
+
!*** ./src/demux/amf-parser.js ***!
|
|
171
|
+
\*********************************/
|
|
172
|
+
|
|
173
|
+
/*!*********************************!*\
|
|
174
|
+
!*** ./src/demux/exp-golomb.js ***!
|
|
175
|
+
\*********************************/
|
|
176
|
+
|
|
177
|
+
/*!*********************************!*\
|
|
178
|
+
!*** ./src/demux/sps-parser.js ***!
|
|
179
|
+
\*********************************/
|
|
180
|
+
|
|
181
|
+
/*!*********************************!*\
|
|
182
|
+
!*** ./src/io/io-controller.js ***!
|
|
183
|
+
\*********************************/
|
|
184
|
+
|
|
185
|
+
/*!*********************************!*\
|
|
186
|
+
!*** ./src/io/speed-sampler.js ***!
|
|
187
|
+
\*********************************/
|
|
188
|
+
|
|
189
|
+
/*!*********************************!*\
|
|
190
|
+
!*** ./src/remux/aac-silent.js ***!
|
|
191
|
+
\*********************************/
|
|
192
|
+
|
|
193
|
+
/*!**********************************!*\
|
|
194
|
+
!*** ./src/demux/flv-demuxer.js ***!
|
|
195
|
+
\**********************************/
|
|
196
|
+
|
|
197
|
+
/*!**********************************!*\
|
|
198
|
+
!*** ./src/player/flv-player.js ***!
|
|
199
|
+
\**********************************/
|
|
200
|
+
|
|
201
|
+
/*!**********************************!*\
|
|
202
|
+
!*** ./src/remux/mp4-remuxer.js ***!
|
|
203
|
+
\**********************************/
|
|
204
|
+
|
|
205
|
+
/*!***********************************!*\
|
|
206
|
+
!*** ./src/demux/demux-errors.js ***!
|
|
207
|
+
\***********************************/
|
|
208
|
+
|
|
209
|
+
/*!************************************!*\
|
|
210
|
+
!*** ./src/core/mse-controller.js ***!
|
|
211
|
+
\************************************/
|
|
212
|
+
|
|
213
|
+
/*!************************************!*\
|
|
214
|
+
!*** ./src/io/websocket-loader.js ***!
|
|
215
|
+
\************************************/
|
|
216
|
+
|
|
217
|
+
/*!************************************!*\
|
|
218
|
+
!*** ./src/io/xhr-range-loader.js ***!
|
|
219
|
+
\************************************/
|
|
220
|
+
|
|
221
|
+
/*!************************************!*\
|
|
222
|
+
!*** ./src/remux/mp4-generator.js ***!
|
|
223
|
+
\************************************/
|
|
224
|
+
|
|
225
|
+
/*!*************************************!*\
|
|
226
|
+
!*** ./src/player/native-player.js ***!
|
|
227
|
+
\*************************************/
|
|
228
|
+
|
|
229
|
+
/*!*************************************!*\
|
|
230
|
+
!*** ./src/player/player-errors.js ***!
|
|
231
|
+
\*************************************/
|
|
232
|
+
|
|
233
|
+
/*!*************************************!*\
|
|
234
|
+
!*** ./src/player/player-events.js ***!
|
|
235
|
+
\*************************************/
|
|
236
|
+
|
|
237
|
+
/*!**************************************!*\
|
|
238
|
+
!*** ./src/io/param-seek-handler.js ***!
|
|
239
|
+
\**************************************/
|
|
240
|
+
|
|
241
|
+
/*!**************************************!*\
|
|
242
|
+
!*** ./src/io/range-seek-handler.js ***!
|
|
243
|
+
\**************************************/
|
|
244
|
+
|
|
245
|
+
/*!**************************************!*\
|
|
246
|
+
!*** ./src/utils/logging-control.js ***!
|
|
247
|
+
\**************************************/
|
|
248
|
+
|
|
249
|
+
/*!***************************************!*\
|
|
250
|
+
!*** ./node_modules/events/events.js ***!
|
|
251
|
+
\***************************************/
|
|
252
|
+
|
|
253
|
+
/*!***************************************!*\
|
|
254
|
+
!*** ./src/io/fetch-stream-loader.js ***!
|
|
255
|
+
\***************************************/
|
|
256
|
+
|
|
257
|
+
/*!****************************************!*\
|
|
258
|
+
!*** ./src/core/media-segment-info.js ***!
|
|
259
|
+
\****************************************/
|
|
260
|
+
|
|
261
|
+
/*!****************************************!*\
|
|
262
|
+
!*** ./src/core/transmuxing-events.js ***!
|
|
263
|
+
\****************************************/
|
|
264
|
+
|
|
265
|
+
/*!****************************************!*\
|
|
266
|
+
!*** ./src/core/transmuxing-worker.js ***!
|
|
267
|
+
\****************************************/
|
|
268
|
+
|
|
269
|
+
/*!******************************************!*\
|
|
270
|
+
!*** ./src/io/xhr-moz-chunked-loader.js ***!
|
|
271
|
+
\******************************************/
|
|
272
|
+
|
|
273
|
+
/*!********************************************!*\
|
|
274
|
+
!*** ./src/core/transmuxing-controller.js ***!
|
|
275
|
+
\********************************************/
|
|
276
|
+
|
|
277
|
+
/*!**************************************************!*\
|
|
278
|
+
!*** ./node_modules/webworkify-webpack/index.js ***!
|
|
279
|
+
\**************************************************/
|
|
280
|
+
|
|
281
|
+
/*!******************************************************!*\
|
|
282
|
+
!*** ./node_modules/es6-promise/dist/es6-promise.js ***!
|
|
283
|
+
\******************************************************/
|
package/dist/559.umd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkbpm2=self.webpackChunkbpm2||[]).push([[559],{228:function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,d=this._events[s],f=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),f){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,i),!0;case 5:return d.fn.call(d.context,t,r,i,o),!0;case 6:return d.fn.call(d.context,t,r,i,o,a),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];d.fn.apply(d.context,u)}else{var l,p=d.length;for(c=0;c<p;c++)switch(d[c].once&&this.removeListener(e,d[c].fn,void 0,!0),f){case 1:d[c].fn.call(d[c].context);break;case 2:d[c].fn.call(d[c].context,t);break;case 3:d[c].fn.call(d[c].context,t,r);break;case 4:d[c].fn.call(d[c].context,t,r,i);break;default:if(!u)for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];d[c].fn.apply(d[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],d=s.length;u<d;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},310:function(e,t,n){n.d(t,{A:function(){return r}});var r="3.0.23"},3592:function(e,t,n){n.d(t,{A:function(){return u},L:function(){return a}});var r=n(1894),i=n(310),o=n(5489),a={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},s={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},u=(0,r.j6)((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};(0,r.xs)(this,e);var a=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var u=n.mediaError?n.mediaError:t.media.error||{},c=t.duration,d=t.currentTime,f=t.ended,l=t.src,p=t.currentSrc,h=t.media,m=h.readyState,v=h.networkState,y=n.errorCode||u.code;s[y]&&(y=s[y]);var g={playerVersion:i.A,currentTime:d,duration:c,ended:f,readyState:m,networkState:v,src:l||p,errorType:n.errorType,errorCode:y,message:n.errorMessage||u.message,mediaError:u,originError:n.originError?n.originError.stack:"",host:o.Ay.getHostFromUrl(l||p)};return n.ext&&Object.keys(n.ext).map((function(e){g[e]=n.ext[e]})),g}if(arguments.length>1){for(var b={playerVersion:i.A,domain:document.domain},x=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],S=0;S<arguments.length;S++)b[x[S]]=arguments[S];return b.ex=a?(a[arguments[0]]||{}).msg:"",b}}))},5559:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,"symbol"==typeof(i=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i)),r)}var i}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.r(t),n.d(t,{default:function(){return L}});var h=n(6985),m=n(4680),v=n(228),y=n.n(v),g={ArrayBufferToString:function(e){for(var t="",n=new Uint8Array(e),r=0;r<n.length;r++)t+=String.fromCharCode(n[r]);return t},StringToArrayBuffer:function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return t},Base64ToHex:function(e){for(var t=window.atob(e.replace(/-/g,"+").replace(/_/g,"/")),n="",r=0;r<t.length;r++)n+=("0"+t.charCodeAt(r).toString(16)).substr(-2);return n},HexToBase64:function(e){for(var t="",n=0;n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return window.btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},findBox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.type!==t){if(e&&e.subBox){var r=e.subBox.filter((function(e){return e.type===t}));r.length?r.forEach((function(e){return n.push(e)})):e.subBox.forEach((function(e){return g.findBox(e,t,n)}))}}else n.push(e);return(n=[].concat(n)).length>1?n:n[0]},padStart:function(e,t,n){for(var r=String(n),i=0|t,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},durationConvert:function(e){var t=0,n=0,r=0;return(e=e.slice(e.indexOf("PT")+2)).indexOf("H")>-1&&e.indexOf("M")>-1&&e.indexOf("S")>-1?(t=parseFloat(e.slice(0,e.indexOf("H"))),n=parseFloat(e.slice(e.indexOf("H")+1,e.indexOf("M"))),r=parseFloat(e.slice(e.indexOf("M")+1,e.indexOf("S")))):e.indexOf("H")<0&&e.indexOf("M")>0&&e.indexOf("S")>-1?(n=parseFloat(e.slice(0,e.indexOf("M"))),r=parseFloat(e.slice(e.indexOf("M")+1,e.indexOf("S")))):e.indexOf("H")<0&&e.indexOf("M")<0&&e.indexOf("S")>-1&&(r=parseFloat(e.slice(0,e.indexOf("S")))),3600*t+60*n+r},preFixInterge:function(e,t){return(Array(t).join(0)+e).slice(-t)},toHex:function(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.push(g.padStart(Number(t).toString(16),2,0))})),e},sum:function(){for(var e=0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e+=t})),e},toUTF8:function(e){for(var t=encodeURIComponent(e),n=unescape(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r.buffer},fromHex:function(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)t[n/2]=window.parseInt(e.substr(n,2),16);return t},fromCharCode:function(e){for(var t="",n=0;n<e.length;n+=16e3){var r=e.subarray(n,n+16e3);t+=String.fromCharCode.apply(null,r)}return t},toBase64:function(e,t){var n=g.fromCharCode(e);t=void 0===t||t;var r=window.btoa(n).replace(/\+/g,"-").replace(/\//g,"_");return t?r:r.replace(/=*$/,"")}},b=a((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,r=t.method,o=void 0===r?"GET":r,a=t.type,s=void 0===a?"arraybuffer":a,u=t.data,c=void 0===u?{}:u;return i(this,e),new Promise((function(e,t){var r=new window.XMLHttpRequest,i=o.toUpperCase(),a=[];for(var u in s&&(r.responseType=s),c)Object.prototype.hasOwnProperty.call(c,u)&&a.push("k=".concat(c[u]));if("GET"===i)r.open(i,"".concat(n,"?").concat(a.join("&"))),r.send();else{if("post"!==i)throw new Error("xhr ".concat(i," is not supported"));0===n.indexOf("data:application/json;base64")?(r.open(i,n,!0),r.timeout=0,r.withCredentials=!1,r.send(a)):(r.open(i,n),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(a.join("&")))}r.onload=function(){200===r.status||206===r.status?e(r):t(r)},r.onerror=function(){t(r)}}))})),x=function(){function e(){i(this,e)}return a(e,null,[{key:"parse",value:function(t){var n=e.parseXmlString(t);return null!=n?e.parseDOMChildren(n):null}},{key:"parseXmlString",value:function(e){if(void 0===e)return null;var t,n=new window.DOMParser;try{(t=n.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}return t}},{key:"parseDOMChildren",value:function(t,n){if(t.nodeType===Node.DOCUMENT_NODE){for(var r={},i=t.childNodes,o=0;o<i.length;o++){var a=i[o];a.nodeType===Node.ELEMENT_NODE&&(r=e.parseDOMChildren(a))}return r}if(t.nodeType===Node.ELEMENT_NODE){for(var s={__cnt:0},u=[],c=t.childNodes,d=0;d<c.length;d++){var f=c[d],l=e.getNodeLocalName(f);if(f.nodeType!==Node.COMMENT_NODE){var p=n+"."+l;if(s.__cnt++,null===s[l]||void 0===s[l]){var h=e.parseDOMChildren(f,p);if("#text"!==l||/[^\s]/.test(h)){var m={};m[l]=h,u.push(m)}s[l]=h,e.toArrayAccessForm(s,l)}else{null!==s[l]&&void 0!==s[l]&&(s[l]instanceof Array||(s[l]=[s[l]],e.toArrayAccessForm(s,l,p)));var v=e.parseDOMChildren(f,p);if("#text"!==l||/[^\s]/.test(v)){var y={};y[l]=v,u.push(y)}s[l][s[l].length]=v}}}for(var g=0;g<t.attributes.length;g++){var b=t.attributes[g];s.__cnt++;var x=b.value;s[b.name]=x}var S=t.prefix;return null!=S&&""!==S&&(s.__cnt++,s.__prefix=S),null!==s["#text"]&&void 0!==s["#text"]&&(s.__text=s["#text"],s.__text instanceof Array&&(s.__text=s.__text.join("\n")),delete s["#text"],delete s["#text_asArray"]),null!==s["#cdata-section"]&&void 0!==s["#cdata-section"]&&(s.__cdata=s["#cdata-section"],delete s["#cdata-section"],delete s["#cdata-section_asArray"]),1===s.__cnt&&null!==s.__text&&void 0!==s.__text?s=s.__text:1===s.__cnt&&null!==s.__cdata&&void 0!==s.__cdata&&(s=s.__cdata),delete s.__cnt,s}if(t.nodeType===Node.TEXT_NODE||t.nodeType===Node.CDATA_SECTION_NODE)return t.nodeValue}},{key:"getNodeLocalName",value:function(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}},{key:"toArrayAccessForm",value:function(e,t){e[t]instanceof Array||(e[t]=[e[t]])}}]),e}(),S=function(e){s(n,e);var t=l(n);function n(e){var r;return i(this,n),(r=t.call(this)).url=e,r.mediaList={video:[],audio:[]},r.retryMax=10,r.retry=0,r.type="live",r.isEnd=!1,r.duration=0,r.init(e),r}return a(n,[{key:"fetch",value:function(e){var t=this,n={TYPE:"LIVE",ENDLIST:""},r=[];return new Promise((function(i,o){new b({type:"",url:e}).then((function(a){var s=a.responseText;if(s){var u=[],c=function(e){var t;if("string"==typeof e&&(t=e),e instanceof ArrayBuffer){var n=new Uint8Array(e);t=String.fromCharCode.apply(null,n)}return t?(t=t.replace(/<(\/)?(\w+:)+(\w+)/g,"<$1$3"),x.parse(t)):null}(s);"static"===c.type&&(n.TYPE="VOD"),c.minBufferTime&&(n.minBufferTime=g.durationConvert(c.minBufferTime)),c.maxSegmentDuration&&(n.maxSegmentDuration=g.durationConvert(c.maxSegmentDuration)),c.mediaPresentationDuration&&(t.duration=g.durationConvert(c.mediaPresentationDuration));var d="";c.BaseURL&&(d=c.BaseURL[0]);var f=c.Period[0];!t.duration&&f&&f.duration&&(t.duration=g.durationConvert(f.duration)),n.duration=t.duration,f.AdaptationSet.forEach((function(n,r){var i="video/mp4",o="avc1.64001E",a="640",s="360",c="640",f="360",l="25",p="1:1",h="1",m="588633";n.mimeType&&("video/mp4"===(i=n.mimeType)?(o=n.codecs,a=parseFloat(n.width),s=parseFloat(n.height),c=parseFloat(n.maxWidth),f=parseFloat(n.maxHeight),l=parseFloat(n.frameRate),p=n.sar,h=n.startWithSAP,m=parseFloat(n.bandwidth)):"audio/mp4"===i&&(o=n.codecs,h=n.startWithSAP,m=parseFloat(n.bandwidth))),n.Representation.forEach((function(r,v){u.indexOf(r.id)>-1&&(r.id=(parseInt(u[u.length-1])+1).toString()),u.push(r.id);var y,b="",x=[],S=0,w=0,T=e.slice(0,e.lastIndexOf("/")+1)+d;r.mimeType&&(i=r.mimeType),r.mimeType&&(i=r.mimeType),"video/mp4"===i?(r.codecs&&(o=r.codecs),r.width&&(a=parseFloat(r.width)),r.height&&(s=parseFloat(r.height)),r.maxWidth&&(c=parseFloat(r.maxWidth)),r.maxHeight&&(f=parseFloat(r.maxHeight)),r.frameRate&&(l=parseFloat(r.frameRate)),r.sar&&(p=r.sar),r.startWithSAP&&(h=r.startWithSAP),r.bandwidth&&(m=parseFloat(r.bandwidth))):"audio/mp4"===i&&(r.codecs&&(o=r.codecs),r.startWithSAP&&(h=r.startWithSAP),r.bandwidth&&(m=parseFloat(r.bandwidth))),r.BaseURL&&r.BaseURL.length>0&&(T+=r.BaseURL[0]),n.SegmentTemplate&&n.SegmentTemplate.length>0&&(y=n.SegmentTemplate[0]),r.SegmentTemplate&&r.SegmentTemplate.length>0&&(y=r.SegmentTemplate[0]);var E=!1;if((n.ContentProtection||r.ContentProtection)&&(E=!0),y){b=y.initialization,S=parseFloat(y.timescale);for(var _=(w=parseFloat(y.duration))/S,O=parseInt(y.startNumber),k=O+Math.ceil(t.duration/_)-1,A=O;A<=k;A++){var C=_*(A-O),L=_*(A-O+1);A===k&&(_=t.duration-_*(k-O),L=t.duration),x.push({idx:A,start:C,end:L,url:T+y.media.replace("$RepresentationID$",r.id).replace("$Number%04d$",g.preFixInterge(A,4)),downloaded:!1,segmentDuration:_})}}"video/mp4"===i?t.mediaList.video.push({id:r.id,baseURL:T,initSegment:T+b.replace("$RepresentationID$",r.id),inited:!1,mediaSegments:x,mimeType:i,codecs:o,width:a,height:s,maxWidth:c,maxHeight:f,frameRate:l,sar:p,startWithSAP:h,bandwidth:m,timescale:S,duration:w,encrypted:E}):"audio/mp4"===i&&t.mediaList.audio.push({id:r.id,baseURL:T,initSegment:T+b.replace("$RepresentationID$",r.id),inited:!1,mediaSegments:x,mimeType:i,codecs:o,startWithSAP:h,bandwidth:m,timescale:S,duration:w,encrypted:E})}))})),["video","audio"].forEach((function(e){t.mediaList[e].selectedIdx=0,t.mediaList[e].sort((function(e,t){return e.bandwidth-t.bandwidth}))})),i({meta:n,segments:r})}else o(new Error("parse error"))})).catch((function(e){console.error(e),o(e)}))}))}},{key:"init",value:function(e){var t=this;this.fetch(e).then((function(e){t.type=e.meta.TYPE.toLocaleLowerCase(),t.emit("ready")}),(function(){console.log("mpd init reject"),["video","audio"].forEach((function(e){t.mediaList[e]=[]})),t.retry++,t.retry<t.retryMax&&t.init(e)}))}},{key:"seek",value:function(e){var t=this,n={};return"vod"!==this.type&&void 0===e||["video","audio"].forEach((function(r){var i=t.mediaList[r][t.mediaList[r].selectedIdx];i&&(n[r]=i.mediaSegments.filter((function(t){return(t.start<=e&&e<t.end||t.start<=e-t.segmentDuration&&e-t.segmentDuration<t.end||t.start<=e+t.segmentDuration&&e+t.segmentDuration<t.end)&&!t.downloaded})))})),n}}]),n}(y()),w=function(e){s(n,e);var t=l(n);function n(e,r,o){var a;if(i(this,n),(a=t.call(this)).url=e,a.on=!1,n.queue.some((function(t){return t.url===e})))return f(a);var s=new XMLHttpRequest;return s.target=d(a),s.responseType="arraybuffer",s.open("get",e),o&&(a.range=o,a.id=o.join("-"),s.setRequestHeader("Range","bytes=".concat(o.join("-")))),s.onload=function(){200===s.status||206===s.status?r&&r instanceof Function&&r(s.response):404===s.status&&r&&r instanceof Function&&r("Not Found"),s.target.remove()},s.onerror=function(){s.target.remove()},s.onabort=function(){s.target.remove()},a.xhr=s,n.queue.push(d(a)),a.update(),a}return a(n,[{key:"cancel",value:function(){this.xhr.abort()}},{key:"remove",value:function(){var e=this;n.queue.filter((function(t,r){return t.url===e.url&&(n.queue.splice(r,1),!0)})),this.update()}},{key:"update",value:function(){var e=n.queue,t=e.filter((function(e){return e.on})),r=e.filter((function(e){return!e.on})),i=n.limit-t.length;r.forEach((function(e,t){t<i&&e.run()}))}},{key:"run",value:function(){1===this.xhr.readyState?(this.on=!0,this.xhr.send()):this.remove()}}],[{key:"clear",value:function(){n.queue.forEach((function(e){e.on&&e.cancel()})),n.queue.length=0}}]),n}(y());w.queue=[],w.limit=2,window.Task=w;var T=n(5489),E=n(3592);const _="3.0.23";console.log("version",_);var O=function(e){s(n,e);var t=l(n);function n(e,r){var o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return i(this,n),a.version=_,(o=t.call(this,e,r,a)).url=s,o}return a(n)}(E.A),k=function(e){s(n,e);var t=l(n);function n(){var e;i(this,n);var r=d(e=t.call(this));return e.codecs=[],e.sourceBuffer={},e.mediaSource=new MediaSource,e.url=URL.createObjectURL(e.mediaSource),e.queue={},e.updating=!1,e.mediaSource.addEventListener("sourceopen",(function(){r.emit("sourceopen")})),e.mediaSource.addEventListener("sourceclose",(function(){r.emit("sourceclose")})),e}return a(n,[{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(e){this.mediaSource.duration=e}},{key:"addSourceBuffer",value:function(e){var t=this;this.codecs.push(e);var n=this.mediaSource.addSourceBuffer(e);this.sourceBuffer[e]=n,n.addEventListener("error",(function(e){t.emit("error",new O("mse","",{line:16,handle:"[MSE] constructor sourceopen",msg:e.message}))})),n.addEventListener("updateend",(function(r){if(t.emit(e+" updateend"),t.queue[e]&&"Array"===T.Ay.typeOf(t.queue[e])){var i=t.queue[e].shift();i&&(!1===n.updating&&"open"===t.state?n.appendBuffer(i):t.queue[e].unshift(i))}}))}},{key:"appendBuffer",value:function(e,t){var n=this.sourceBuffer[e];return!1===n.updating&&"open"===this.state?(n.appendBuffer(t),!0):(this.queue[e]||(this.queue[e]=[]),this.queue[e].push(t),!1)}},{key:"removeBuffer",value:function(e,t,n){!1===this.sourceBuffer[e].updating&&"open"===this.state&&this.sourceBuffer[e].remove(t,n)}},{key:"endOfStream",value:function(){"open"===this.state&&this.mediaSource.endOfStream()}}],[{key:"isSupported",value:function(e){return window.MediaSource&&window.MediaSource.isTypeSupported(e)}}]),n}(y()),A=function(e){s(n,e);var t=l(n);function n(e){var r;return i(this,n),(r=t.call(this)).drm=e,r.KEYSYSTEM_TYPE="",r.keys={},r.drm.clearKeys&&(r.KEYSYSTEM_TYPE="org.w3.clearkey",r.keys=r.drm.clearKeys),r.options=[],r.ensurePromise=void 0,r}return a(n,[{key:"setOptions",value:function(){var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],t={videoCapabilities:e},n={videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]};this.options=[n,t]}},{key:"bail",value:function(e){return function(t){console.log(e+(t?" "+t:""))}}},{key:"UpdateSessionFunc",value:function(e){var t=this;return function(n){var r=[],i=[];Object.keys(e).forEach((function(t){var n=e[t],o=g.fromHex(t),a=g.fromHex(n),s={kty:"oct",kid:g.toBase64(o,!1),k:g.toBase64(a,!1)};r.push(s),i.push(s.kid)}));var o={keys:r},a=JSON.stringify(o);n.target.update(g.StringToArrayBuffer(a)).then((function(){}),t.bail(" MediaKeySession update failed"))}}},{key:"KeysChange",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e.target.keyStatuses.entries());try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r[0];r[1],g.Base64ToHex(window.btoa(g.ArrayBufferToString(i)))}}catch(e){n.e(e)}finally{n.f()}}},{key:"EnsureMediaKeysCreated",value:function(e,t,n){return this.ensurePromise||(this.ensurePromise=navigator.requestMediaKeySystemAccess(t,n).then((function(e){return e.createMediaKeys()}),this.bail(" Failed to request key system access.")).then((function(t){return e.setMediaKeys(t)}),this.bail(" failed to create MediaKeys object"))),this.ensurePromise}},{key:"SetupEME",value:function(e,t){var n=this;e.sessions=[],this.on("encrypted",(function(){var t=JSON.stringify({kids:["0123456789abcdef0123456789abcdef"]}),r=new Uint8Array(g.toUTF8(t));n.EnsureMediaKeysCreated(e,n.KEYSYSTEM_TYPE,n.options).then((function(){var t=e.mediaKeys.createSession();return e.sessions.push(t),t.addEventListener("message",n.UpdateSessionFunc(n.keys)),t.addEventListener("keystatuseschange",n.KeysChange),t.generateRequest("keyids",r.buffer)}),n.bail(" failed to ensure MediaKeys on HTMLMediaElement")).then((function(){}),n.bail(" Failed to generate request."))}))}}]),n}(y()),C=function(e){s(n,e);var t=l(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return i(this,n),(r=t.call(this)).mse=void 0,r.url=e,r.inited=!1,a&&(r.video=a),o.dashOpts&&o.dashOpts.drm&&(r.eme=new A(o.dashOpts.drm)),r}return a(n,[{key:"getData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];return new Promise((function(r,i){new w(e,r,n).once("error",(function(e){t.emit("error",e)}))}))}},{key:"init",value:function(e){var t=this,n=new S(e);this.mpd=n;var r,i,o,a=this;return new Promise((function(e,s){n.once("ready",(function(){a.type=n.type,i=n.mediaList.video,o=n.mediaList.audio,a.eme&&(a.eme.setOptions("".concat(i[i.selectedIdx].mimeType,'; codecs="').concat(i[i.selectedIdx].codecs,'"'),"".concat(o[o.selectedIdx].mimeType,'; codecs="').concat(o[o.selectedIdx].codecs,'"')),a.eme.SetupEME(a.video)),(r=new k).on("sourceopen",(function(){["video","audio"].forEach((function(e){var t=n.mediaList[e];t[t.selectedIdx]&&(r.addSourceBuffer("".concat(t[t.selectedIdx].mimeType,';codecs="').concat(t[t.selectedIdx].codecs,'"')),a.getData(t[t.selectedIdx].initSegment,t[t.selectedIdx].initSegmentRange).then((function(e){r.appendBuffer("".concat(t[0].mimeType,';codecs="').concat(t[0].codecs,'"'),e),r.once("".concat(t[t.selectedIdx].mimeType,';codecs="').concat(t[t.selectedIdx].codecs,'" updateend'),(function(){t[t.selectedIdx].inited=!0,r.emit("updateend")}))})))}))})),r.on("updateend",(function(e){i[i.selectedIdx]&&i[i.selectedIdx].inited&&o[o.selectedIdx]&&o[o.selectedIdx].inited&&(a.inited=!0,(i[i.selectedIdx].encrypted||o[o.selectedIdx].encrypted)&&a.eme.emit("encrypted"),"vod"===a.type&&(a.seek(0),a.emit("startPlay")))})),r.on("error",(function(e){s(e),console.log("mse error")})),a.mse=r,e(r)})),n.once("end",(function(){"live"===t.type&&a.mse.endOfStream()}))}))}},{key:"seek",value:function(e){var t=this,n=this.mpd.seek(e);["video","audio"].forEach((function(e){n[e]&&n[e].length>0&&n[e].every((function(n){return n.downloaded||new w(n.url,(function(r){if("Not Found"===r){if(n.tryTimes||(n.tryTimes=0),n.tryTimes++,n.tryTimes<=2)return!0}else t.mse.appendBuffer("".concat(t.mpd.mediaList[e][0].mimeType,';codecs="').concat(t.mpd.mediaList[e][0].codecs,'"'),new Uint8Array(r));var i=n.idx,o=t.mpd.mediaList[e];o[o.selectedIdx].mediaSegments.every((function(e){return e.idx!==i||(e.downloaded=!0,!1)}))}),n.range),!0}))}))}}]),n}(y()),L=function(e){s(n,e);var t=l(n);function n(e){var r;return i(this,n),(r=t.call(this,e)).definitions=[],r.destroy=r.destroy.bind(d(r)),r.timeUpdate=r.timeUpdate.bind(d(r)),r.replay=r.replay.bind(d(r)),r.initEvents(),r}return a(n,[{key:"initEvents",value:function(){this.on(h.DESTROY,this.destroy),this.on(h.TIME_UPDATE,this.timeUpdate),this.on(h.REPLAY,this.replay)}},{key:"beforePlayerInit",value:function(){var e=this,t=this.player,n=this.playerConfig;if(!this.config.drm||navigator.requestMediaKeySystemAccess){var i=new C(n.url,n,t.video);return i.init(n.url).then((function(n){e.definitions.length||(i.mpd.mediaList.video.forEach((function(t){e.definitions.push({name:t.height+"P",url:t.id,selected:!1})})),e.definitions[0].selected=!0),t.emit("resourceReady",e.definitions);var o=n;e.dash=i,e.mse=o,i.on("error",(function(e){!function(e,t){t.vid=e.config.vid,t.url=e.src,t.errd&&"object"===r(t.errd)&&e.dash&&(t.errd.url=e.dash.url,t.url=e.dash.url),e.emit("DATA_REPORT",t),"network"===t.errt&&e.config._backupURL?e.src=e.config._backupURL:e.src=e.config._mainURL,e.switchURL=null,e._replay=null}(t,e)})),i.once("startPlay",(function(){e.progressTimer=setInterval((function(){e.timeUpdate()}),300)}));try{m.Ay.defineGetterOrSetter(e.player,{__url:{get:function(){return e.mse.url}}})}catch(e){}}))}console.log("EME API is not supported. Enable pref media.eme.enabled to true in about:config")}},{key:"loadData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.player.currentTime,t=this.dash,n=this.findRangeForPlaybackTime(e),r=n&&n.end||e;r>e+15||t.seek(r)}},{key:"download",value:function(){this.dash.download()}},{key:"findRangeForPlaybackTime",value:function(e){var t=this.player.buffered;if(t)for(var n=0;n<t.length;n++)if(t.start(n)<=e&&t.end(n)>=e)return{start:t.start(n),end:t.end(n)}}},{key:"switchURL",value:function(e){var t=this.player;t.config.url=e,t.hasStart=!1,t.paused?t.start(e):(t.pause(),t.once("pause",(function(){t.start(e)})),t.once("canplay",(function(){t.play()}))),t.once("canplay",(function(){t.currentTime=0}))}},{key:"timeUpdate",value:function(){var e=this.player,t=this.dash;this.loadData(e.currentTime+1),this.isEnded(e,t)}},{key:"switchBW",value:function(e){var t=this,n=this.dash;e=e.split("/")[e.split("/").length-1];var r=n.mpd.mediaList.video,i=r.selectedIdx;r.every((function(t,a){return t.id!==e||(i=a,n.getData(r[i].initSegment,r[i].initSegmentRange).then((function(e){o(e)})),!1)}));var o=function(e){var n=t.player,o=n.currentTime,a=r[r.selectedIdx].mediaSegments.find((function(e){return e.start-o>6})),s=a.start,u=n.getBufferedRange()[1];u-s>0&&"safari"!==m.Ay.Sniffer.browser&&n.mse.removeBuffer("".concat(r[0].mimeType,';codecs="').concat(r[0].codecs,'"'),s,u),r[r.selectedIdx].mediaSegments.every((function(e){return e.downloaded=!1,!0})),t.mse.appendBuffer("".concat(r[0].mimeType,';codecs="').concat(r[0].codecs,'"'),e),t.mse.once("".concat(r[0].mimeType,';codecs="').concat(r[0].codecs,'" updateend'),(function(){r[i].inited=!0,r.selectedIdx=i,t.loadData((a.start+a.end)/2)}))}}},{key:"replay",value:function(){var e=this.player;w.clear();var t=this.dash.mpd.mediaList.video.selectedIdx;this.definitions[t].selected=!0,e.hasStart=!1,e.start(),this.once(h.COMPLETE,(function(){e.play()}))}},{key:"isEnded",value:function(){var e=this.dash,t=this.player,n=this.mse;if("vod"===e.type&&t.duration-t.currentTime<2){var r=t.getBufferedRange();t.currentTime-r[1]<.1&&(n.endOfStream(),this.progressTimer&&(clearInterval(this.progressTimer),this.progressTimer=null))}}},{key:"destroy",value:function(){this.dash&&window.clearTimeout(this.dash.mpd.timer),this.progressTimer&&clearInterval(this.progressTimer)}}],[{key:"pluginName",get:function(){return"DashPlugin"}}]),n}(m.Ay)}}]);
|
package/dist/584.umd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkbpm2=self.webpackChunkbpm2||[]).push([[584],{1894:function(t,n,e){function r(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function o(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?r(Object(e),!0).forEach((function(n){l(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):r(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function c(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function u(t,n,e){return n&&c(t.prototype,n),e&&c(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,n,e){return(n=b(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function f(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&p(t,n)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,n){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function g(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,r=s(t);if(n){var o=s(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return h(this,e)}}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,n,e){var r=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=s(t)););return t}(t,n);if(r){var o=Object.getOwnPropertyDescriptor(r,n);return o.get?o.get.call(arguments.length<3?t:e):o.value}},d.apply(this,arguments)}function v(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return m(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function b(t){var n=function(t){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var e=n.call(t,"string");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof n?n:String(n)}e.d(n,{B:function(){return f},GM:function(){return h},Jt:function(){return d},Og:function(){return v},T1:function(){return o},U6:function(){return s},V5:function(){return y},j6:function(){return u},n8:function(){return l},uk:function(){return i},wf:function(){return g},xs:function(){return a}})},3237:function(t,n,e){e.d(n,{A_:function(){return i},Ay:function(){return s},Eu:function(){return y},Vj:function(){return p},j:function(){return u},oq:function(){return f},tC:function(){return l},uQ:function(){return c}});var r=e(1894);function o(t,n,e){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];var a=n.call.apply(n,[t].concat(o));e&&"function"==typeof e&&(a&&a.then?a.then((function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.call.apply(e,[t].concat(r))})):e.call.apply(e,[t].concat(o)))}function i(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[t]&&(this.__hooks[t]=null),function(){var i=arguments,a=this;if(e.pre)try{var c;(c=e.pre).call.apply(c,[this].concat(Array.prototype.slice.call(arguments)))}catch(n){throw n.message="[pluginName: ".concat(this.pluginName,":").concat(t,":pre error] >> ").concat(n.message),n}if(this.__hooks&&this.__hooks[t])try{var u=y.apply(void 0,[this,t,n].concat(Array.prototype.slice.call(arguments)));u?u.then?u.then((function(t){!1!==t&&o.apply(void 0,[a,n,e.next].concat((0,r.Og)(i)))})).catch((function(t){throw t})):o.apply(void 0,[this,n,e.next].concat(Array.prototype.slice.call(arguments))):void 0===u&&o.apply(void 0,[this,n,e.next].concat(Array.prototype.slice.call(arguments)))}catch(n){throw n.message="[pluginName: ".concat(this.pluginName,":").concat(t,"] >> ").concat(n.message),n}else o.apply(void 0,[this,n,e.next].concat(Array.prototype.slice.call(arguments)))}.bind(this)}function a(t,n){var e=this.__hooks;if(!e||!Array.isArray(e[t]))return-1;for(var r=e[t],o=0;o<r.length;o++)if(r[o]===n)return o;return-1}function c(t,n){var e=this.__hooks;if(e)return e.hasOwnProperty(t)?(Array.isArray(e[t])||(e[t]=[]),-1===a.call(this,t,n)&&e[t].push(n),!0):(console.warn("has no supported hook which name [".concat(t,"]")),!1)}function u(t,n){var e=this.__hooks;if(e)if(Array.isArray(e[t])){var r=e[t],o=a.call(this,t,n);-1!==o&&r.splice(o,1)}else e[t]&&(e[t]=null)}function l(t){if(this.plugins&&this.plugins[t.toLowerCase()]){for(var n=this.plugins[t.toLowerCase()],e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return n.useHooks&&n.useHooks.apply(n,r)}}function f(t){if(this.plugins&&this.plugins[t.toLowerCase()]){var n=this.plugins[t.toLowerCase()];if(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return n.removeHooks&&n.removeHooks.apply(n,r)}}}function s(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},n&&n.map((function(n){t.__hooks[n]=null})),Object.defineProperty(t,"hooks",{get:function(){return t.__hooks&&Object.keys(t.__hooks).map((function(n){if(t.__hooks[n])return n}))}})}function p(t){t.__hooks=null}function y(t,n,e){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];if(t.__hooks&&Array.isArray(t.__hooks[n])){var a=t.__hooks[n],c=-1;return function t(n,e,r){for(var o=arguments.length,i=new Array(o>3?o-3:0),u=3;u<o;u++)i[u-3]=arguments[u];if(c++,0===a.length||c===a.length)return r.call.apply(r,[n,n].concat(i));var l=a[c],f=l.call.apply(l,[n,n].concat(i));return f&&f.then?f.then((function(o){return!1===o?null:t.apply(void 0,[n,e,r].concat(i))})).catch((function(t){console.warn("[runHooks]".concat(e," reject"),t.message)})):!1!==f?t.apply(void 0,[n,e,r].concat(i)):!1!==f&&void 0}.apply(void 0,[t,n,e].concat(o))}return e.call.apply(e,[t,t].concat(o))}},4611:function(t,n,e){e.d(n,{A:function(){return a},P:function(){return c}});var r="undefined"!=typeof window&&window.location&&window.location.href.indexOf("xgplayerdebugger=1")>-1,o={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},i="%c[xgplayer]",a={config:{debug:r?3:0},logInfo:function(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),a=1;a<e;a++)r[a-1]=arguments[a];this.config.debug>=3&&(n=console).log.apply(n,[i,o.info,t].concat(r))},logWarn:function(t){for(var n,e=arguments.length,r=new Array(e>1?e-1:0),a=1;a<e;a++)r[a-1]=arguments[a];this.config.debug>=1&&(n=console).warn.apply(n,[i,o.warn,t].concat(r))},logError:function(t){var n;if(!(this.config.debug<1)){for(var e=this.config.debug>=2?"trace":"error",r=arguments.length,a=new Array(r>1?r-1:0),c=1;c<r;c++)a[c-1]=arguments[c];(n=console)[e].apply(n,[i,o.error,t].concat(a))}}};function c(t){t.logInfo=a.logInfo.bind(t),t.logWarn=a.logWarn.bind(t),t.logError=a.logError.bind(t)}},4680:function(t,n,e){e.d(n,{Ay:function(){return u}});var r=e(1894),o=e(5489),i=e(4611),a=e(3237);function c(t,n){i.A.logError("[".concat(t,"] event or callback cant be undefined or null when call ").concat(n))}var u=function(){function t(n){(0,r.xs)(this,t),o.Ay.checkIsFunction(this.beforeCreate)&&this.beforeCreate(n),(0,a.Ay)(this),this.__args=n,this.__events={},this.__onceEvents={},this.config=n.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(n)}return(0,r.j6)(t,[{key:"beforeCreate",value:function(t){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(t){this.player=t.player,this.playerConfig=t.player&&t.player.config,this.pluginName=t.pluginName?t.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=t.player&&t.player.logger}},{key:"updateLang",value:function(t){t||(t=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var t=o.Ay.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(t=this.playerConfig.domEventType),t}},{key:"on",value:function(t,n){var e=this;t&&n&&this.player?"string"==typeof t?(this.__events[t]=n,this.player.on(t,n)):Array.isArray(t)&&t.forEach((function(t){e.__events[t]=n,e.player.on(t,n)})):c(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(t,n){var e=this;t&&n&&this.player?"string"==typeof t?(this.__onceEvents[t]=n,this.player.once(t,n)):Array.isArray(t)&&t.forEach((function(r){e.__onceEvents[r]=n,e.player.once(t,n)})):c(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(t,n){var e=this;t&&n&&this.player?"string"==typeof t?(delete this.__events[t],this.player.off(t,n)):Array.isArray(t)&&t.forEach((function(r){delete e.__events[t],e.player.off(r,n)})):c(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var t=this;["__events","__onceEvents"].forEach((function(n){Object.keys(t[n]).forEach((function(e){t[n][e]&&t.off(e,t[n][e]),e&&delete t[n][e]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(t){var n;if(this.player){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];(n=this.player).emit.apply(n,[t].concat(r))}}},{key:"emitUserAction",value:function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var o=(0,r.T1)((0,r.T1)({},e),{},{pluginName:this.pluginName});this.player.emitUserAction(t,n,o)}}},{key:"hook",value:function(t,n){return a.A_.call.apply(a.A_,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return a.uQ.call.apply(a.uQ,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return a.j.call.apply(a.j,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"registerPlugin",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return e&&(n.pluginName=e),this.player.registerPlugin({plugin:t,options:n})}},{key:"getPlugin",value:function(t){return this.player?this.player.getPlugin(t):null}},{key:"__destroy",value:function(){var t=this,n=this.player,e=this.pluginName;this.offAll(),o.Ay.clearAllTimers(this),o.Ay.checkIsFunction(this.destroy)&&this.destroy(),["player","playerConfig","pluginName","logger","__args","__hooks"].map((function(n){t[n]=null})),n.unRegisterPlugin(e),(0,a.Vj)(this)}}],[{key:"defineGetterOrSetter",value:function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&Object.defineProperty(t,e,n[e])}},{key:"defineMethod",value:function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&"function"==typeof n[e]&&Object.defineProperty(t,e,{configurable:!0,value:n[e]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),t}()},5489:function(t,n,e){e.d(n,{Dq:function(){return f},Ay:function(){return a},Xo:function(){return l},nF:function(){return u}});var r=e(1894),o=e(4611),i=function(){function t(n){(0,r.xs)(this,t),this.bufferedList=n}return(0,r.j6)(t,[{key:"start",value:function(t){return this.bufferedList[t].start}},{key:"end",value:function(t){return this.bufferedList[t].end}},{key:"length",get:function(){return this.bufferedList.length}}]),t}(),a={};function c(t){var n=(0,r.uk)(t);return null!==t&&("object"===n||"function"===n)}function u(t,n,e){var r=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return c(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),function(t,n,e){var r,o,i,a,u,l,f=0,s=!1,p=!1,y=!0,h=!n&&0!==n&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof t)throw new TypeError("Expected a function");function g(n){var e=r,i=o;return r=o=void 0,f=n,a=t.apply(i,e)}function d(t,n){return h?(window.cancelAnimationFrame(u),window.requestAnimationFrame(t)):setTimeout(t,n)}function v(t){var e=t-l;return void 0===l||e>=n||e<0||p&&t-f>=i}function m(){var t=Date.now();if(v(t))return b(t);u=d(m,function(t){var e=t-f,r=n-(t-l);return p?Math.min(r,i-e):r}(t))}function b(t){return u=void 0,y&&r?g(t):(r=o=void 0,a)}function A(){for(var t=Date.now(),e=v(t),i=arguments.length,c=new Array(i),y=0;y<i;y++)c[y]=arguments[y];if(r=c,o=this,l=t,e){if(void 0===u)return function(t){return f=t,u=d(m,n),s?g(t):a}(l);if(p)return u=d(m,n),g(l)}return void 0===u&&(u=d(m,n)),a}return n=+n||0,c(e)&&(s=!!e.leading,i=(p="maxWait"in e)?Math.max(+e.maxWait||0,n):i,y="trailing"in e?!!e.trailing:y),A.cancel=function(){void 0!==u&&function(t){if(h)return window.cancelAnimationFrame(t);clearTimeout(t)}(u),f=0,r=l=o=u=void 0},A.flush=function(){return void 0===u?a:b(Date.now())},A.pending=function(){return void 0!==u},A}(t,n,{leading:r,trailing:o,maxWait:n})}function l(){var t=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===t&&(t="zh"),t}function f(t,n,e){if(t){var r=t.getAttribute(e);return!(!r||r!==n||"VIDEO"!==t.tagName&&"AUDIO"!==t.tagName)}}a.createDom=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=r,o.innerHTML=n,Object.keys(e).forEach((function(n){var r=n,i=e[n];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},a.createDomFromHtml=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=t;var i=r.children;return r=null,i.length>0?(i=i[0],e&&a.addClass(i,e),n&&Object.keys(n).forEach((function(t){i.setAttribute(t,n[t])})),i):null}catch(t){return o.A.logError("util.createDomFromHtml",t),null}},a.hasClass=function(t,n){if(!t||!n)return!1;try{return Array.prototype.some.call(t.classList,(function(t){return t===n}))}catch(o){var e=t.className&&"object"===(0,r.uk)(t.className)?t.getAttribute("class"):t.className;return e&&!!e.match(new RegExp("(\\s|^)"+n+"(\\s|$)"))}},a.addClass=function(t,n){if(t&&n)try{n.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(n){n&&t.classList.add(n)}))}catch(e){a.hasClass(t,n)||(t.className&&"object"===(0,r.uk)(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+n):t.className+=" "+n)}},a.removeClass=function(t,n){if(t&&n)try{n.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(n){n&&t.classList.remove(n)}))}catch(e){a.hasClass(t,n)&&n.split(/\s+/g).forEach((function(n){var e=new RegExp("(\\s|^)"+n+"(\\s|$)");t.className&&"object"===(0,r.uk)(t.className)?t.setAttribute("class",t.getAttribute("class").replace(e," ")):t.className=t.className.replace(e," ")}))}},a.toggleClass=function(t,n){t&&n.split(/\s+/g).forEach((function(n){a.hasClass(t,n)?a.removeClass(t,n):a.addClass(t,n)}))},a.classNames=function(){for(var t=arguments,n=[],e=function(e){"String"===a.typeOf(t[e])?n.push(t[e]):"Object"===a.typeOf(t[e])&&Object.keys(t[e]).map((function(r){t[e][r]&&n.push(r)}))},r=0;r<arguments.length;r++)e(r);return n.join(" ")},a.findDom=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;try{t=n.querySelector(e)}catch(r){o.A.logError("util.findDom",r),0===e.indexOf("#")&&(t=n.getElementById(e.slice(1)))}return t},a.getCss=function(t,n){return t.currentStyle?t.currentStyle[n]:document.defaultView.getComputedStyle(t,!1)[n]},a.padStart=function(t,n,e){for(var r=String(e),o=0|n,i=Math.ceil(o/r.length),a=[],c=String(t);i--;)a.push(r);return a.join("").substring(0,o-c.length)+c},a.format=function(t){if(window.isNaN(t))return"";t=Math.round(t);var n=a.padStart(Math.floor(t/3600),2,0),e=a.padStart(Math.floor((t-3600*n)/60),2,0),r=a.padStart(Math.floor(t-3600*n-60*e),2,0);return("00"===n?[e,r]:[n,e,r]).join(":")},a.event=function(t){if(t.touches){var n=t.touches[0]||t.changedTouches[0];t.clientX=n.clientX||0,t.clientY=n.clientY||0,t.offsetX=n.pageX-n.target.offsetLeft,t.offsetY=n.pageY-n.target.offsetTop}t._target=t.target||t.srcElement},a.typeOf=function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},a.deepCopy=function(t,n){if("Object"===a.typeOf(n)&&"Object"===a.typeOf(t))return Object.keys(n).forEach((function(e){"Object"!==a.typeOf(n[e])||n[e]instanceof Node?"Array"===a.typeOf(n[e])?t[e]="Array"===a.typeOf(t[e])?t[e].concat(n[e]):n[e]:t[e]=n[e]:void 0===t[e]||void 0===t[e]?t[e]=n[e]:a.deepCopy(t[e],n[e])})),t},a.deepMerge=function(t,n){return Object.keys(n).map((function(e){var o;"Array"===a.typeOf(n[e])&&"Array"===a.typeOf(t[e])?"Array"===a.typeOf(t[e])&&(o=t[e]).push.apply(o,(0,r.Og)(n[e])):a.typeOf(t[e])!==a.typeOf(n[e])||null===t[e]||"Object"!==a.typeOf(t[e])||n[e]instanceof window.Node?null!==n[e]&&(t[e]=n[e]):a.deepMerge(t[e],n[e])})),t},a.getBgImage=function(t){var n=(t.currentStyle||window.getComputedStyle(t,null)).backgroundImage;if(!n||"none"===n)return"";var e=document.createElement("a");return e.href=n.replace(/url\("|"\)/g,""),e.href},a.copyDom=function(t){if(t&&1===t.nodeType){var n=document.createElement(t.tagName);return Array.prototype.forEach.call(t.attributes,(function(t){n.setAttribute(t.name,t.value)})),t.innerHTML&&(n.innerHTML=t.innerHTML),n}return""},a.setInterval=function(t,n,e,r){t._interval[n]||(t._interval[n]=window.setInterval(e.bind(t),r))},a.clearInterval=function(t,n){clearInterval(t._interval[n]),t._interval[n]=null},a.setTimeout=function(t,n,e){t._timers||(t._timers=[]);var r=setTimeout((function(){n(),a.clearTimeout(t,r)}),e);return t._timers.push(r),r},a.clearTimeout=function(t,n){var e=t._timers;if("Array"===a.typeOf(e)){for(var r=0;r<e.length;r++)if(e[r]===n){e.splice(r,1),clearTimeout(n);break}}else clearTimeout(n)},a.clearAllTimers=function(t){var n=t._timers;"Array"===a.typeOf(n)&&(n.map((function(t){clearTimeout(t)})),t._timerIds=[])},a.createImgBtn=function(t,n,e,r){var o,i,c,u=a.createDom("xg-".concat(t),"",{},"xgplayer-".concat(t,"-img"));return u.style.backgroundImage='url("'.concat(n,'")'),e&&r&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(t){return!(e.indexOf(t)>-1&&r.indexOf(t)>-1&&(o=parseFloat(e.slice(0,e.indexOf(t)).trim()),i=parseFloat(r.slice(0,r.indexOf(t)).trim()),c=t,1))})),u.style.width="".concat(o).concat(c),u.style.height="".concat(i).concat(c),u.style.backgroundSize="".concat(o).concat(c," ").concat(i).concat(c),u.style.margin="start"===t?"-".concat(i/2).concat(c," auto auto -").concat(o/2).concat(c):"auto 5px auto 5px"),u},a.Hex2RGBA=function(t,n){var e=[];if(/^\#[0-9A-F]{3}$/i.test(t)){var r="#";t.replace(/[0-9A-F]/gi,(function(t){r+=t+t})),t=r}return/^#[0-9A-F]{6}$/i.test(t)?(t.replace(/[0-9A-F]{2}/gi,(function(t){e.push(parseInt(t,16))})),"rgba(".concat(e.join(","),", ").concat(n,")")):"rgba(255, 255, 255, 0.1)"},a.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},a.checkIsFunction=function(t){return t&&"function"==typeof t},a.checkIsObject=function(t){return null!==t&&"object"===(0,r.uk)(t)},a.hide=function(t){t.style.display="none"},a.show=function(t,n){t.style.display=n||"block"},a.isUndefined=function(t){if(null==t)return!0},a.isNotNull=function(t){return!(null==t)},a.setStyleFromCsstext=function(t,n){n&&("String"===a.typeOf(n)?n.replace(/\s+/g,"").split(";").map((function(n){if(n){var e=n.split(":");e.length>1&&(t.style[e[0]]=e[1])}})):Object.keys(n).map((function(e){t.style[e]=n[e]})))},a.filterStyleFromText=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],e=t.style.cssText;if(!e)return{};var r=e.replace(/\s+/g,"").split(";"),o={},i={};return r.map((function(t){if(t){var e=t.split(":");e.length>1&&(function(t,n){for(var e=0,r=n.length;e<r;e++)if(t.indexOf(n[e])>-1)return!0;return!1}(e[0],n)?o[e[0]]=e[1]:i[e[0]]=e[1])}})),t.setAttribute("style",""),Object.keys(i).map((function(n){t.style[n]=i[n]})),o},a.getStyleFromCsstext=function(t){var n=t.style.cssText;if(!n)return{};var e=n.replace(/\s+/g,"").split(";"),r={};return e.map((function(t){if(t){var n=t.split(":");n.length>1&&(r[n[0]]=n[1])}})),r},a.preloadImg=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t){var r=new window.Image;r.onload=function(t){r=null,n&&n(t)},r.onerror=function(t){r=null,e&&e(t)},r.src=t}},a.stopPropagation=function(t){t&&t.stopPropagation()},a.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},a.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},a.checkTouchSupport=function(){return"ontouchstart"in window},a.getBuffered2=function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,e=[],r=0;r<t.length;r++)e.push({start:t.start(r)<.5?0:t.start(r),end:t.end(r)});e.sort((function(t,n){return t.start-n.start||n.end-t.end}));var o=[];if(n)for(var a=0;a<e.length;a++){var c=o.length;if(c){var u=o[c-1].end;e[a].start-u<n?e[a].end>u&&(o[c-1].end=e[a].end):o.push(e[a])}else o.push(e[a])}else o=e;return new i(o)},a.getEventPos=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.touches&&t.touches.length>0&&(t=t.touches[0]),{x:t.x/n,y:t.y/n,clientX:t.clientX/n,clientY:t.clientY/n,offsetX:t.offsetX/n,offsetY:t.offsetY/n,pageX:t.pageX/n,pageY:t.pageY/n}},a.requestAnimationFrame=function(t){var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(n)return n(t)},a.getHostFromUrl=function(t){if("String"!==a.typeOf(t))return"";var n=t.split("/"),e="";return n.length>3&&n[2]&&(e=n[2]),e},a.cancelAnimationFrame=function(t){var n=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;n&&n(t)},a.isMSE=function(t){return t.media&&(t=t.media),!!(t&&t instanceof HTMLMediaElement)&&(/^blob/.test(t.currentSrc)||/^blob/.test(t.src))},a.isBlob=function(t){return"string"==typeof t&&/^blob/.test(t)},a.generateSessionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=(new Date).getTime();try{t=parseInt(t)}catch(n){t=0}return n+=t,window.performance&&"function"==typeof window.performance.now&&(n+=parseInt(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===t?e:3&e|8).toString(16)}))},a.createEvent=function(t){var n;return"function"==typeof window.Event?n=new Event(t):(n=document.createEvent("Event")).initEvent(t,!0,!0),n},a.adjustTimeByDuration=function(t,n,e){return n&&t&&(t>n||e&&t<n)?n:t},a.createPositionBar=function(t,n){var e=a.createDom("xg-bar","",{"data-index":-1},t);return n.appendChild(e),e},a.getTransformStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e={scale:"".concat(t.scale||1),translate:"".concat(t.x||0,"%, ").concat(t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return Object.keys(e).forEach((function(t){var r=new RegExp("".concat(t,"\\([^\\(]+\\)"),"g"),o="".concat(t,"(").concat(e[t],")");r.test(n)?(r.lastIndex=-1,n=n.replace(r,o)):n+="".concat(o," ")})),n},a.convertDeg=function(t){return Math.abs(t)<=1?360*t:t%360},a.getIndexByTime=function(t,n){var e=n.length,r=-1;if(e<1)return r;if(t<=n[0].end||e<2)r=0;else if(t>n[e-1].end)r=e-1;else for(var o=1;o<e;o++)if(t>n[o-1].end&&t<=n[o].end){r=o;break}return r},a.getOffsetCurrentTime=function(t,n){var e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if((e=r>=0&&r<n.length?r:a.getIndexByTime(t,n))<0)return-1;var o=n.length,i=n[e],c=i.start,u=i.end,l=i.cTime,f=i.offset;return t<c?l:t>=c&&t<=u?t-f:t>u&&e>=o-1?u:-1},a.getCurrentTimeByOffset=function(t,n){var e=-1;if(!n||n.length<0)return t;for(var r=0;r<n.length;r++)if(t<=n[r].duration){e=r;break}if(-1!==e){var o=n[e].start;return e-1<0?o+t:o+(t-n[e-1].duration)}return t}},6985:function(t,n,e){e.r(n),e.d(n,{ABORT:function(){return O},AFTER_DEFINITION_CHANGE:function(){return q},AUTOPLAY_PREVENTED:function(){return j},AUTOPLAY_STARTED:function(){return C},BEFORE_DEFINITION_CHANGE:function(){return X},BUFFER_CHANGE:function(){return k},CANPLAY:function(){return p},CANPLAY_THROUGH:function(){return y},COMPLETE:function(){return P},CSS_FULLSCREEN_CHANGE:function(){return Y},DEFINITION_CHANGE:function(){return B},DESTROY:function(){return I},DOWNLOAD_SPEED_CHANGE:function(){return D},DURATION_CHANGE:function(){return h},EMPTIED:function(){return _},ENDED:function(){return i},ENTER_PLAYER:function(){return H},ERROR:function(){return c},FPS_STUCK:function(){return ut},FULLSCREEN_CHANGE:function(){return M},LEAVE_PLAYER:function(){return F},LOADED_DATA:function(){return d},LOADED_METADATA:function(){return v},LOADING:function(){return U},LOAD_START:function(){return A},MINI_STATE_CHANGE:function(){return G},PAUSE:function(){return a},PIP_CHANGE:function(){return $},PLAY:function(){return r},PLAYER_BLUR:function(){return S},PLAYER_FOCUS:function(){return T},PLAYING:function(){return o},PLAYNEXT:function(){return J},PROGRESS:function(){return b},RATE_CHANGE:function(){return m},READY:function(){return x},REPLAY:function(){return R},RESET:function(){return et},RETRY:function(){return W},ROTATE:function(){return K},SCREEN_SHOT:function(){return Q},SEEKED:function(){return l},SEEKING:function(){return u},SEI_PARSED:function(){return V},SHORTCUT:function(){return Z},SOURCE_ERROR:function(){return rt},SOURCE_SUCCESS:function(){return ot},STALLED:function(){return E},STATS_EVENTS:function(){return ct},SUSPEND:function(){return w},SWITCH_SUBTITLE:function(){return it},TIME_UPDATE:function(){return f},URL_CHANGE:function(){return L},URL_NULL:function(){return N},USER_ACTION:function(){return nt},VIDEO_EVENTS:function(){return at},VIDEO_RESIZE:function(){return z},VOLUME_CHANGE:function(){return g},WAITING:function(){return s},XGLOG:function(){return tt}});var r="play",o="playing",i="ended",a="pause",c="error",u="seeking",l="seeked",f="timeupdate",s="waiting",p="canplay",y="canplaythrough",h="durationchange",g="volumechange",d="loadeddata",v="loadedmetadata",m="ratechange",b="progress",A="loadstart",_="emptied",E="stalled",w="suspend",O="abort",k="bufferedChange",T="focus",S="blur",x="ready",N="urlNull",C="autoplay_started",j="autoplay_was_prevented",P="complete",R="replay",I="destroy",L="urlchange",D="download_speed_change",F="leaveplayer",H="enterplayer",U="loading",M="fullscreen_change",Y="cssFullscreen_change",G="mini_state_change",B="definition_change",X="before_definition_change",q="after_definition_change",V="SEI_PARSED",W="retry",z="video_resize",$="pip_change",K="rotate",Q="screenShot",J="playnext",Z="shortcut",tt="xglog",nt="user_action",et="reset",rt="source_error",ot="source_success",it="switch_subtitle",at=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],ct={STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},ut="fps_stuck"}}]);
|