xgplayer 3.0.12-rc.0 → 3.0.13

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/index.min.js +1 -1
  3. package/dist/index.min.js.map +1 -1
  4. package/es/index.d.ts +2 -1
  5. package/es/index.js +1 -0
  6. package/es/index.umd.d.ts +2 -0
  7. package/es/index.umd.js +2 -0
  8. package/es/instManager.d.ts +58 -0
  9. package/es/instManager.js +151 -0
  10. package/es/lang/br.d.ts +91 -0
  11. package/es/lang/de.d.ts +91 -0
  12. package/es/lang/es.d.ts +91 -0
  13. package/es/lang/fr.d.ts +91 -0
  14. package/es/lang/id.d.ts +91 -0
  15. package/es/lang/it.d.ts +91 -0
  16. package/es/lang/kr.d.ts +91 -0
  17. package/es/lang/ms-my.d.ts +91 -0
  18. package/es/lang/ru.d.ts +91 -0
  19. package/es/lang/th.d.ts +91 -0
  20. package/es/lang/vn.d.ts +91 -0
  21. package/es/mediaProxy.d.ts +5 -0
  22. package/es/player.d.ts +28 -8
  23. package/es/player.js +45 -23
  24. package/es/plugin/basePlugin.d.ts +2 -2
  25. package/es/plugin/plugin.d.ts +6 -7
  26. package/es/plugin/plugin.js +1 -1
  27. package/es/plugin/pluginsManager.d.ts +0 -34
  28. package/es/plugin/pluginsManager.js +1 -49
  29. package/es/plugins/common/optionsIcon.d.ts +0 -1
  30. package/es/plugins/common/optionsIcon.js +1 -1
  31. package/es/plugins/controls/index.d.ts +0 -1
  32. package/es/plugins/controls/index.js +1 -1
  33. package/es/plugins/danmu/index.d.ts +1 -0
  34. package/es/plugins/definition/index.js +1 -1
  35. package/es/plugins/fpsDetect/index.d.ts +4 -1
  36. package/es/plugins/fullscreen/index.d.ts +11 -7
  37. package/es/plugins/fullscreen/index.js +0 -10
  38. package/es/plugins/heatmap/index.d.ts +4 -2
  39. package/es/plugins/heatmap/index.js +81 -28
  40. package/es/plugins/mobile/index.d.ts +6 -5
  41. package/es/plugins/mobile/touch.d.ts +8 -2
  42. package/es/plugins/netAdaption/index.d.ts +4 -1
  43. package/es/plugins/pip/index.d.ts +0 -1
  44. package/es/plugins/pip/index.js +9 -7
  45. package/es/plugins/playbackRate/index.js +1 -1
  46. package/es/plugins/poster/index.d.ts +0 -1
  47. package/es/plugins/poster/index.js +1 -1
  48. package/es/plugins/progress/index.d.ts +6 -7
  49. package/es/plugins/progress/index.js +2 -1
  50. package/es/plugins/progressPreview/index.d.ts +0 -1
  51. package/es/plugins/progressPreview/index.js +1 -1
  52. package/es/plugins/prompt/index.d.ts +5 -2
  53. package/es/plugins/prompt/index.js +3 -3
  54. package/es/plugins/replay/index.d.ts +0 -1
  55. package/es/plugins/replay/index.js +1 -1
  56. package/es/plugins/start/index.d.ts +0 -1
  57. package/es/plugins/start/index.js +1 -1
  58. package/es/plugins/testspeed/index.d.ts +4 -1
  59. package/es/plugins/time/index.d.ts +1 -2
  60. package/es/plugins/time/index.js +1 -1
  61. package/es/plugins/time/timesegments.d.ts +1 -1
  62. package/es/plugins/track/index.js +1 -1
  63. package/es/plugins/waitingTimeoutJump/index.d.ts +4 -1
  64. package/es/presets/default-en.d.ts +1 -2
  65. package/es/presets/default.d.ts +1 -2
  66. package/es/presets/mobile.d.ts +1 -2
  67. package/es/style/common/animation.scss +0 -0
  68. package/es/style/common/svg-url.scss +0 -0
  69. package/es/style/index.scss +0 -0
  70. package/es/style/variable.scss +0 -0
  71. package/es/utils/util.d.ts +3 -3
  72. package/es/version.js +1 -1
  73. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, objectSpread2 as _objectSpread2 } from "../../_virtual/_rollupPluginBabelHelpers.js";
2
2
  import util from "../../utils/util.js";
3
- import { VIDEO_RESIZE } from "../../events.js";
3
+ import { VIDEO_RESIZE, DURATION_CHANGE } from "../../events.js";
4
4
  import "../../utils/debug.js";
5
5
  import Plugin from "../../plugin/plugin.js";
6
6
  var HeatMap = /* @__PURE__ */ function(_Plugin) {
@@ -18,23 +18,30 @@ var HeatMap = /* @__PURE__ */ function(_Plugin) {
18
18
  _this.xData = [];
19
19
  _this.yData = [];
20
20
  _this.yMax = 0;
21
+ _this._duration = 0;
21
22
  _this.curData = [];
22
23
  return _this;
23
24
  }
24
25
  _createClass(HeatMap2, [{
25
26
  key: "afterPlayerInit",
26
27
  value: function afterPlayerInit() {
27
- var _this2 = this;
28
28
  if (this.root) {
29
29
  return;
30
30
  }
31
31
  this.createRoot();
32
- var data = this.config.data;
33
- this.setData(data);
34
- this.resize();
32
+ this.reset();
33
+ }
34
+ }, {
35
+ key: "afterCreate",
36
+ value: function afterCreate() {
37
+ var _this2 = this;
35
38
  this.on(VIDEO_RESIZE, function() {
36
39
  _this2.resize();
37
40
  });
41
+ this.on(DURATION_CHANGE, function() {
42
+ _this2._duration = _this2.player.duration;
43
+ _this2.reset();
44
+ });
38
45
  }
39
46
  }, {
40
47
  key: "setConfig",
@@ -43,8 +50,14 @@ var HeatMap = /* @__PURE__ */ function(_Plugin) {
43
50
  Object.keys(config).forEach(function(key) {
44
51
  _this3.config[key] = config[key];
45
52
  });
46
- this.setData(this.config.data);
47
- this.drawLinePath();
53
+ this.reset();
54
+ }
55
+ }, {
56
+ key: "reset",
57
+ value: function reset() {
58
+ var data = this.config.data;
59
+ this.setData(data);
60
+ this.resize();
48
61
  }
49
62
  }, {
50
63
  key: "createRoot",
@@ -85,24 +98,57 @@ var HeatMap = /* @__PURE__ */ function(_Plugin) {
85
98
  }
86
99
  }, {
87
100
  key: "formatData",
88
- value: function formatData(data) {
101
+ value: function formatData(data, duration, minValue) {
89
102
  var nData = [];
90
103
  if (data.length < 1) {
91
104
  return nData;
92
105
  }
93
- var totalDur = parseInt(data[data.length - 1].time * 1e3, 10);
106
+ var totalDur = parseInt(duration * 1e3, 10);
94
107
  if (util.typeOf(data[0]) === "Object" && data[0].time !== void 0) {
108
+ if (!totalDur) {
109
+ return nData;
110
+ }
111
+ var step = 1;
112
+ var lastTime = 0;
95
113
  data.forEach(function(item) {
96
114
  var dur = parseInt(item.time * 1e3, 10);
115
+ if (lastTime && (step < 0 || item.time - lastTime < step)) {
116
+ step = item.time - lastTime;
117
+ }
118
+ lastTime = item.time;
97
119
  nData.push(_objectSpread2(_objectSpread2({}, item), {}, {
98
- dur,
99
120
  percent: dur / totalDur
100
121
  }));
101
122
  });
102
- return nData;
123
+ var fTime = nData[0].time;
124
+ if (fTime > 0) {
125
+ var arr = fTime - step > 0 ? [fTime - step, 0] : [0];
126
+ arr.forEach(function(time) {
127
+ var dur = parseInt(time * 1e3, 10);
128
+ nData.unshift({
129
+ time,
130
+ score: minValue,
131
+ percent: dur / totalDur
132
+ });
133
+ });
134
+ }
135
+ var last = nData[nData.length - 1];
136
+ if (duration - last.time > step) {
137
+ [last.time + step, duration].forEach(function(item) {
138
+ var dur = parseInt(item * 1e3, 10);
139
+ nData.push({
140
+ time: item,
141
+ score: minValue,
142
+ percent: dur / totalDur
143
+ });
144
+ });
145
+ }
103
146
  } else {
104
- return data;
147
+ data.forEach(function(item) {
148
+ nData.push(item);
149
+ });
105
150
  }
151
+ return nData;
106
152
  }
107
153
  }, {
108
154
  key: "_getX",
@@ -113,18 +159,33 @@ var HeatMap = /* @__PURE__ */ function(_Plugin) {
113
159
  return this.fixFloat((index - 1) * stepX, this.dataFloatLen);
114
160
  }
115
161
  }
162
+ }, {
163
+ key: "_getY",
164
+ value: function _getY(item, stepY, maxY) {
165
+ var _this$config = this.config, maxValue = _this$config.maxValue, minValue = _this$config.minValue;
166
+ var y = minValue;
167
+ y = item.score !== void 0 ? item.score : item;
168
+ y = Math.min(y, maxValue);
169
+ y = Math.max(y, minValue);
170
+ y = y / stepY;
171
+ y = 1 - y;
172
+ y = this.fixFloat(y * maxY, this.dataFloatLen);
173
+ return y;
174
+ }
116
175
  }, {
117
176
  key: "setData",
118
177
  value: function setData(data) {
178
+ var _this$config2 = this.config, maxValue = _this$config2.maxValue, minValue = _this$config2.minValue, maxLength = _this$config2.maxLength;
119
179
  if (data && data.length) {
120
- this.curData = this.formatData(data);
180
+ this.curData = this.formatData(data, this._duration, minValue);
121
181
  }
122
182
  data = this.curData;
183
+ if (data.length < 1) {
184
+ return;
185
+ }
123
186
  this.xData = [];
124
- this.xData2 = [];
125
187
  this.yData = [];
126
188
  this.yMax = 0;
127
- var _this$config = this.config, maxValue = _this$config.maxValue, minValue = _this$config.minValue, maxLength = _this$config.maxLength;
128
189
  var max = maxValue;
129
190
  var min = minValue;
130
191
  var step_V = max - min;
@@ -137,30 +198,22 @@ var HeatMap = /* @__PURE__ */ function(_Plugin) {
137
198
  if (Number.isNaN(step_X)) {
138
199
  return;
139
200
  }
140
- var y = min;
141
- var i = parseInt(this.fixFloat(step_D, 0));
142
- var j = 1;
201
+ var i = parseInt(this.fixFloat(step_D - 1, 0));
202
+ var j = 0;
143
203
  while (j < curDataLength) {
144
204
  var x = this._getX(j, step_X, data[i], this.canvasWidth);
145
205
  this.xData.push(x);
146
- y = data[i].score || data[i];
147
- y = Math.min(y, max);
148
- y = Math.max(y, min);
149
- y = y / step_V;
150
- y = 1 - y;
151
- y = this.fixFloat(y * step_Y, this.dataFloatLen);
206
+ var y = this._getY(data[i], step_V, step_Y);
152
207
  this.yMax = Math.max(this.yMax, step_Y - y);
153
208
  this.yData.push(y);
154
209
  j++;
155
210
  i = parseInt(this.fixFloat(j * step_D, 0));
156
211
  }
157
- this.xData.push(this.canvasWidth);
158
- this.yData.push(y);
159
212
  }
160
213
  }, {
161
214
  key: "_getFillStyle",
162
215
  value: function _getFillStyle(ctx) {
163
- var _this$config2 = this.config, gradient = _this$config2.gradient, gradientColors = _this$config2.gradientColors, fillStyle = _this$config2.fillStyle;
216
+ var _this$config3 = this.config, gradient = _this$config3.gradient, gradientColors = _this$config3.gradientColors, fillStyle = _this$config3.fillStyle;
164
217
  var fStyle = fillStyle;
165
218
  if (gradient && gradient.length === 4) {
166
219
  var gradientStyle = ctx.createLinearGradient(gradient[0], gradient[1], gradient[2], gradient[3]);
@@ -183,7 +236,7 @@ var HeatMap = /* @__PURE__ */ function(_Plugin) {
183
236
  var xData = this.xData, yData = this.yData;
184
237
  var x, y;
185
238
  var i = 0;
186
- var _this$config3 = this.config, lineWidth = _this$config3.lineWidth, alpha = _this$config3.alpha, strokeStyle = _this$config3.strokeStyle;
239
+ var _this$config4 = this.config, lineWidth = _this$config4.lineWidth, alpha = _this$config4.alpha, strokeStyle = _this$config4.strokeStyle;
187
240
  var fillStyle = this._getFillStyle(ctx);
188
241
  ctx.beginPath();
189
242
  ctx.lineWidth = lineWidth;
@@ -57,11 +57,12 @@ declare class MobilePlugin extends Plugin {
57
57
  private timer;
58
58
  get duration(): number;
59
59
  get timeOffset(): number;
60
- /**
61
- * @private
62
- * @returns {[propName: string]: any}
63
- */
64
- private registerIcons;
60
+ registerIcons(): {
61
+ seekTipIcon: {
62
+ icon: any;
63
+ class: string;
64
+ };
65
+ };
65
66
  xgMask: HTMLElement;
66
67
  touch: Touche;
67
68
  registerThumbnail(): void;
@@ -24,8 +24,14 @@ declare class Touche {
24
24
  move: string;
25
25
  cancel: string;
26
26
  };
27
- pressIntrvalId: NodeJS.Timeout;
28
- dbIntrvalId: NodeJS.Timeout;
27
+ /**
28
+ * @type { null | number}
29
+ */
30
+ pressIntrvalId: null | number;
31
+ /**
32
+ * @type { null | number}
33
+ */
34
+ dbIntrvalId: null | number;
29
35
  __handlers: {};
30
36
  _initEvent(): void;
31
37
  __setPress(e: any): void;
@@ -1,5 +1,8 @@
1
1
  export default class NetAdaption extends BasePlugin {
2
- _timer: NodeJS.Timer;
2
+ /**
3
+ * @type {null | number}
4
+ */
5
+ _timer: null | number;
3
6
  _checkStatus(): void;
4
7
  }
5
8
  import BasePlugin from "../../plugin/basePlugin";
@@ -27,7 +27,6 @@ declare class PIP extends IconPlugin {
27
27
  initPipEvents(): void;
28
28
  leavePIPCallback: () => void;
29
29
  pipWindow: any;
30
- docPiPWindow: any;
31
30
  enterPIPCallback: (e: any) => void;
32
31
  onWebkitpresentationmodechanged: (e: any) => void;
33
32
  switchPIP: (e: any) => boolean;
@@ -108,7 +108,6 @@ var PIP = /* @__PURE__ */ function(_IconPlugin) {
108
108
  !paused && player.mediaPlay();
109
109
  _this3.setAttr("data-state", "normal");
110
110
  _this3.pipWindow = null;
111
- _this3.docPiPWindow = null;
112
111
  player.emit(PIP_CHANGE, false);
113
112
  };
114
113
  this.enterPIPCallback = function(e) {
@@ -183,7 +182,6 @@ var PIP = /* @__PURE__ */ function(_IconPlugin) {
183
182
  }
184
183
  documentPictureInPicture.requestWindow(pipOptions).then(function(pipWin) {
185
184
  var docPiPNode = config.docPiPNode, docPiPStyle = config.docPiPStyle;
186
- _this4.docPiPWindow = pipWin;
187
185
  _this4.enterPIPCallback();
188
186
  var pipRoot = docPiPNode || player.root;
189
187
  var parentNode = pipRoot.parentElement;
@@ -240,10 +238,13 @@ var PIP = /* @__PURE__ */ function(_IconPlugin) {
240
238
  var player = this.player;
241
239
  try {
242
240
  if (this.isPIPAvailable() && this.isPip) {
243
- if (this.docPiPWindow) {
244
- this.docPiPWindow.close();
241
+ var _documentPictureInPic;
242
+ if (this.isDocPIPAvailable() && (_documentPictureInPic = documentPictureInPicture) !== null && _documentPictureInPic !== void 0 && _documentPictureInPic.window) {
243
+ documentPictureInPicture.window.close();
244
+ } else if (PIP2.checkWebkitSetPresentationMode(player.media)) {
245
+ player.media.webkitSetPresentationMode("inline");
245
246
  } else {
246
- PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode("inline") : document.exitPictureInPicture();
247
+ document.exitPictureInPicture();
247
248
  }
248
249
  }
249
250
  return true;
@@ -255,8 +256,9 @@ var PIP = /* @__PURE__ */ function(_IconPlugin) {
255
256
  }, {
256
257
  key: "isPip",
257
258
  get: function get() {
258
- var player = this.player, docPiPWindow = this.docPiPWindow;
259
- return !!docPiPWindow || document.pictureInPictureElement && document.pictureInPictureElement === player.media || player.media.webkitPresentationMode === PresentationMode.PIP;
259
+ var _documentPictureInPic2;
260
+ var player = this.player;
261
+ return !!(this.isDocPIPAvailable() && (_documentPictureInPic2 = documentPictureInPicture) !== null && _documentPictureInPic2 !== void 0 && _documentPictureInPic2.window) || document.pictureInPictureElement && document.pictureInPictureElement === player.media || player.media.webkitPresentationMode === PresentationMode.PIP;
260
262
  }
261
263
  }, {
262
264
  key: "isPIPAvailable",
@@ -48,7 +48,7 @@ var PlaybackRate = /* @__PURE__ */ function(_OptionsIcon) {
48
48
  }
49
49
  }, {
50
50
  key: "show",
51
- value: function show() {
51
+ value: function show(value) {
52
52
  if (!this.config.list || this.config.list.length === 0) {
53
53
  return;
54
54
  }
@@ -18,7 +18,6 @@ declare class Poster extends Plugin {
18
18
  static get defaultConfig(): IPosterConfig;
19
19
  set isEndedShow(arg: any);
20
20
  get isEndedShow(): any;
21
- show(): void;
22
21
  beforeCreate(args: any): void;
23
22
  onTimeUpdate(): void;
24
23
  update(poster: any): void;
@@ -25,7 +25,7 @@ var Poster = /* @__PURE__ */ function(_Plugin) {
25
25
  }
26
26
  }, {
27
27
  key: "show",
28
- value: function show() {
28
+ value: function show(value) {
29
29
  util.removeClass(this.root, "hide");
30
30
  }
31
31
  }, {
@@ -48,9 +48,8 @@ declare class Progress extends Plugin {
48
48
  get offsetDuration(): number;
49
49
  get duration(): number;
50
50
  get timeOffset(): number;
51
- get currentTime(): any;
51
+ get currentTime(): number;
52
52
  changeState(useable?: boolean): void;
53
- show(): void;
54
53
  /**
55
54
  * @description 创建内部进度条,并挂载到xg-outer上,
56
55
  * 并把一些对外API绑定在progress上供外部调用
@@ -127,12 +126,12 @@ declare class Progress extends Plugin {
127
126
  onVideoResize: () => void;
128
127
  /**
129
128
  * @description 根据currenTime和占用百分比更新进度条
130
- * @param {Number} currentTime 需要更新到的时间
131
- * @param {Number} seekTime 实际seek的时间
132
- * @param {Number} percent 更新时间占比
133
- * @param {Int} type 触发类型 0-down 1-move 2-up
129
+ * @param {number} currentTime 需要更新到的时间
130
+ * @param {number} seekTime 实际seek的时间
131
+ * @param {number} percent 更新时间占比
132
+ * @param {number} type 触发类型 0-down 1-move 2-up
134
133
  */
135
- updateWidth(currentTime: number, seekTime: number, percent: number, type: Int): void;
134
+ updateWidth(currentTime: number, seekTime: number, percent: number, type: number): void;
136
135
  computeTime(e: any, x: any): {
137
136
  percent: number;
138
137
  currentTime: number;
@@ -242,7 +242,7 @@ var Progress = /* @__PURE__ */ function(_Plugin) {
242
242
  }
243
243
  }, {
244
244
  key: "show",
245
- value: function show() {
245
+ value: function show(value) {
246
246
  this.root && (this.root.style.display = "flex");
247
247
  }
248
248
  }, {
@@ -408,6 +408,7 @@ var Progress = /* @__PURE__ */ function(_Plugin) {
408
408
  value: function unlock() {
409
409
  var player = this.player, pos = this.pos;
410
410
  pos.isEnter = false;
411
+ pos.isLocked = false;
411
412
  if (player.isMini) {
412
413
  return;
413
414
  }
@@ -58,7 +58,6 @@ export default class ProgressPreview extends Plugin {
58
58
  blurDot(target: any): void;
59
59
  showTips(text: any, isDefault: any, timeStr?: string): void;
60
60
  hideTips(): void;
61
- show(): void;
62
61
  enable(): void;
63
62
  disable(): void;
64
63
  render(): string;
@@ -403,7 +403,7 @@ var ProgressPreview = /* @__PURE__ */ function(_Plugin) {
403
403
  }
404
404
  }, {
405
405
  key: "show",
406
- value: function show() {
406
+ value: function show(value) {
407
407
  util.removeClass(this.root, "hide");
408
408
  }
409
409
  }, {
@@ -14,10 +14,13 @@ declare class Prompt extends Plugin {
14
14
  };
15
15
  onClick: () => void;
16
16
  };
17
- intervalId: number | NodeJS.Timeout;
17
+ /**
18
+ * @type {number}
19
+ */
20
+ intervalId: number;
18
21
  customConfig: any;
19
22
  setStyle(style: any): void;
20
- show(detail: any, config?: {}, onClick?: () => void): void;
23
+ showPrompt(detail: any, config?: {}, onClick?: () => void): void;
21
24
  customOnClick: () => void;
22
25
  render(): string;
23
26
  }
@@ -24,7 +24,7 @@ var Prompt = /* @__PURE__ */ function(_Plugin) {
24
24
  }
25
25
  });
26
26
  this.player.showPrompt = function() {
27
- _this.show.apply(_this, arguments);
27
+ _this.showPrompt.apply(_this, arguments);
28
28
  };
29
29
  this.player.hidePrompt = function() {
30
30
  _this.hide();
@@ -39,8 +39,8 @@ var Prompt = /* @__PURE__ */ function(_Plugin) {
39
39
  });
40
40
  }
41
41
  }, {
42
- key: "show",
43
- value: function show(detail) {
42
+ key: "showPrompt",
43
+ value: function showPrompt(detail) {
44
44
  var _this3 = this;
45
45
  var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
46
46
  var onClick = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
@@ -8,7 +8,6 @@ declare class Replay extends Plugin {
8
8
  };
9
9
  __handleReplay: any;
10
10
  handleReplay(e: any): void;
11
- show(): void;
12
11
  enable(): void;
13
12
  disable(): void;
14
13
  render(): string;
@@ -64,7 +64,7 @@ var Replay = /* @__PURE__ */ function(_Plugin) {
64
64
  }
65
65
  }, {
66
66
  key: "show",
67
- value: function show() {
67
+ value: function show(value) {
68
68
  if (this.config.disable) {
69
69
  return;
70
70
  }
@@ -27,7 +27,6 @@ declare class Start extends Plugin {
27
27
  };
28
28
  };
29
29
  initIcons(): void;
30
- show(): void;
31
30
  focusHide(): void;
32
31
  recover(): void;
33
32
  switchStatus(isAnimate: any): void;
@@ -136,7 +136,7 @@ var Start = /* @__PURE__ */ function(_Plugin) {
136
136
  }
137
137
  }, {
138
138
  key: "show",
139
- value: function show() {
139
+ value: function show(value) {
140
140
  util.removeClass(this.root, "hide");
141
141
  }
142
142
  }, {
@@ -9,7 +9,10 @@ export default class TestSpeed extends BasePlugin {
9
9
  addSpeedTypeList: any[];
10
10
  };
11
11
  getSpeed: (type?: string) => number;
12
- timer: NodeJS.Timeout;
12
+ /**
13
+ * @type {null || number }
14
+ */
15
+ timer: any;
13
16
  cnt: number;
14
17
  xhr: XMLHttpRequest;
15
18
  startTimer: () => void;
@@ -8,12 +8,11 @@ declare class Time extends Plugin {
8
8
  constructor(args: any);
9
9
  isActiving: boolean;
10
10
  get duration(): number;
11
- get currentTime(): any;
11
+ get currentTime(): number;
12
12
  get timeOffset(): number;
13
13
  mode: string;
14
14
  durationDom: HTMLElement;
15
15
  timeDom: HTMLElement;
16
- show(): void;
17
16
  onTimeUpdate(isEnded: any): void;
18
17
  onReset(): void;
19
18
  createCenterTime(): void;
@@ -60,7 +60,7 @@ var Time = /* @__PURE__ */ function(_Plugin) {
60
60
  }
61
61
  }, {
62
62
  key: "show",
63
- value: function show() {
63
+ value: function show(value) {
64
64
  if (this.mode === "flex") {
65
65
  this.centerCurDom && (this.centerCurDom.style.display = "block");
66
66
  this.centerDurDom && (this.centerDurDom.style.display = "block");
@@ -8,7 +8,7 @@ export default class TimeSegmentsControls extends BasePlugin {
8
8
  };
9
9
  curIndex: any;
10
10
  curPos: any;
11
- lastCurrentTime: any;
11
+ lastCurrentTime: number;
12
12
  setConfig(newConfig: any): void;
13
13
  updateSegments(): void;
14
14
  formatTimeSegments(timeSegments: any, duration: any): any[];
@@ -206,7 +206,7 @@ var TextTrack = /* @__PURE__ */ function(_OptionsIcon) {
206
206
  }
207
207
  }, {
208
208
  key: "show",
209
- value: function show() {
209
+ value: function show(value) {
210
210
  if (!this.config.list || this.config.list.length < 1) {
211
211
  return;
212
212
  }
@@ -7,7 +7,10 @@ export default class WaitingTimeoutJump extends BasePlugin {
7
7
  };
8
8
  hasPlayed: boolean;
9
9
  jumpCnt: number;
10
- timer: NodeJS.Timeout;
10
+ /**
11
+ * @type {null | number}
12
+ */
13
+ timer: null | number;
11
14
  jumpSize: any;
12
15
  onWaiting: () => void;
13
16
  onJump: () => void;
@@ -1,12 +1,11 @@
1
1
  export default class DefaultPreset {
2
2
  constructor(options: any, playerConfig: any);
3
- plugins: (typeof Xglogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof Miniscreen | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
3
+ plugins: (typeof Xglogger | typeof Replay | typeof Start | typeof Enter | typeof Miniscreen | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
4
4
  ignores: any[];
5
5
  i18n: any[];
6
6
  }
7
7
  import Xglogger from "../plugins/logger";
8
8
  import Replay from "../plugins/replay";
9
- import Poster from "../plugins/poster";
10
9
  import Start from "../plugins/start";
11
10
  import Enter from "../plugins/enter";
12
11
  import Miniscreen from "../plugins/miniScreen";
@@ -1,12 +1,11 @@
1
1
  export default class DefaultPreset {
2
2
  constructor(options: any, playerConfig: any);
3
- plugins: (typeof Xglogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof Miniscreen | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof TimeSegments | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
3
+ plugins: (typeof Xglogger | typeof Replay | typeof Start | typeof Enter | typeof Miniscreen | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof TimeSegments | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
4
4
  ignores: any[];
5
5
  i18n: any[];
6
6
  }
7
7
  import Xglogger from "../plugins/logger";
8
8
  import Replay from "../plugins/replay";
9
- import Poster from "../plugins/poster";
10
9
  import Start from "../plugins/start";
11
10
  import Enter from "../plugins/enter";
12
11
  import Miniscreen from "../plugins/miniScreen";
@@ -1,5 +1,5 @@
1
1
  export default class DefaultPreset {
2
- plugins: (typeof Xglogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof Mobile | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof Thumbnail | typeof MiniProgress)[];
2
+ plugins: (typeof Xglogger | typeof Replay | typeof Start | typeof Enter | typeof Mobile | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof Thumbnail | typeof MiniProgress)[];
3
3
  ignores: any[];
4
4
  i18n: {
5
5
  LANG: string;
@@ -80,7 +80,6 @@ export default class DefaultPreset {
80
80
  }
81
81
  import Xglogger from "../plugins/logger";
82
82
  import Replay from "../plugins/replay";
83
- import Poster from "../plugins/poster";
84
83
  import Start from "../plugins/start";
85
84
  import Enter from "../plugins/enter";
86
85
  import Mobile from "../plugins/mobile";
File without changes
File without changes
File without changes
File without changes
@@ -223,11 +223,11 @@ declare namespace util {
223
223
  /**
224
224
  * @description css中有zoom的时候,位移会等比缩放,但是元素的宽高不会等比缩放,所以通过该api做统一
225
225
  * https://bugs.chromium.org/p/chromium/issues/detail?id=429140#c8
226
- * @param {Events} e
226
+ * @param {Event} e
227
227
  * @param {number} zoom
228
228
  * @returns
229
229
  */
230
- function getEventPos(e: Events, zoom?: number): {
230
+ function getEventPos(e: Event, zoom?: number): {
231
231
  x: number;
232
232
  y: number;
233
233
  clientX: number;
@@ -243,7 +243,7 @@ declare namespace util {
243
243
  /**
244
244
  * @desc Check whether it is MediaSource start
245
245
  * @param { HTMLVideoElement | HTMLAudioElement | HTMLElement } video
246
- * @returns { Boolean }
246
+ * @returns { boolean }
247
247
  */
248
248
  function isMSE(video: HTMLElement | HTMLVideoElement | HTMLAudioElement): boolean;
249
249
  function isBlob(url: any): boolean;
package/es/version.js CHANGED
@@ -1,2 +1,2 @@
1
- var version = "3.0.12-rc.0";
1
+ var version = "3.0.13";
2
2
  export { version as default };