@byteplus/veplayer-plugin 2.10.3-rc.1 → 2.11.0-rc.0

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 (35) hide show
  1. package/esm/index.development.js +4675 -4739
  2. package/esm/index.production.js +7 -7
  3. package/esm/veplayer.plugin.abr.development.js +5020 -4805
  4. package/esm/veplayer.plugin.abr.production.js +1 -1
  5. package/esm/veplayer.plugin.drm.development.js +1 -1
  6. package/esm/veplayer.plugin.drm.production.js +1 -1
  7. package/esm/veplayer.plugin.flv.development.js +54 -74
  8. package/esm/veplayer.plugin.flv.production.js +1 -1
  9. package/esm/veplayer.plugin.hls.development.js +1 -1
  10. package/esm/veplayer.plugin.hls.production.js +1 -1
  11. package/esm/veplayer.plugin.hlsjs.development.js +218 -496
  12. package/esm/veplayer.plugin.hlsjs.production.js +1 -1
  13. package/esm/veplayer.plugin.rtm.development.js +1 -1
  14. package/esm/veplayer.plugin.rtm.production.js +1 -1
  15. package/esm/veplayer.plugin.time.shift.development.js +16 -13
  16. package/esm/veplayer.plugin.time.shift.production.js +1 -1
  17. package/esm/veplayer.plugin.xgvideo.development.js +1 -1
  18. package/esm/veplayer.plugin.xgvideo.production.js +1 -1
  19. package/esm/veplayer.strategy.base.development.js +1 -1
  20. package/esm/veplayer.strategy.base.production.js +1 -1
  21. package/esm/veplayer.strategy.rtm.adaptive.buffer.development.js +1 -1
  22. package/esm/veplayer.strategy.rtm.adaptive.buffer.production.js +1 -1
  23. package/package.json +2 -106
  24. package/umd/veplayer.plugin.abr.development.js +5019 -4804
  25. package/umd/veplayer.plugin.abr.production.js +1 -1
  26. package/umd/veplayer.plugin.flv.development.js +53 -73
  27. package/umd/veplayer.plugin.flv.production.js +1 -1
  28. package/umd/veplayer.plugin.hlsjs.development.js +217 -495
  29. package/umd/veplayer.plugin.hlsjs.production.js +1 -1
  30. package/esm/ad.d.ts +0 -3
  31. package/esm/hlsjs.d.ts +0 -3
  32. package/esm/time-shift.d.ts +0 -3
  33. package/umd/ad.d.ts +0 -3
  34. package/umd/hlsjs.d.ts +0 -3
  35. package/umd/time-shift.d.ts +0 -3
@@ -4,7 +4,6 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { Plugin, Sniffer, util, live } from "@byteplus/veplayer";
8
7
  const formatTime = function(time) {
9
8
  let hour = Math.floor(time / 3600);
10
9
  const remainTime = time % 3600;
@@ -38,6 +37,10 @@ const addUrlParam = (originUrl, params) => {
38
37
  }
39
38
  };
40
39
  var timeShift = "";
40
+ const live = window["VePlayer"].live;
41
+ const Plugin = window["VePlayer"].Plugin;
42
+ const Sniffer = window["VePlayer"].Sniffer;
43
+ const XGUtil = window["VePlayer"].util;
41
44
  const { POSITIONS } = Plugin;
42
45
  const { Events } = live;
43
46
  const MAX_SHIFT = 7 * 24 * 3600;
@@ -59,8 +62,8 @@ class TimeShift extends Plugin {
59
62
  __publicField(this, "_isProgressMoving", false);
60
63
  __publicField(this, "_liveUrl", "");
61
64
  __publicField(this, "_stopPropagation", (e) => {
62
- util.stopPropagation(e);
63
- util.event(e);
65
+ XGUtil.stopPropagation(e);
66
+ XGUtil.event(e);
64
67
  });
65
68
  }
66
69
  static get pluginName() {
@@ -133,11 +136,11 @@ class TimeShift extends Plugin {
133
136
  if (controls) {
134
137
  (_a = controls.root) == null ? void 0 : _a.removerEventListener(
135
138
  "touchmove",
136
- util.stopPropagation
139
+ XGUtil.stopPropagation
137
140
  );
138
141
  (_b = controls.center) == null ? void 0 : _b.removerEventListener(
139
142
  "touchend",
140
- util.stopPropagation
143
+ XGUtil.stopPropagation
141
144
  );
142
145
  }
143
146
  } else {
@@ -183,8 +186,8 @@ class TimeShift extends Plugin {
183
186
  this.bind("touchstart", this._handleMouseDown);
184
187
  const controls = this.player.controls;
185
188
  if (controls) {
186
- (_a = controls.root) == null ? void 0 : _a.addEventListener("touchmove", util.stopPropagation);
187
- (_b = controls.center) == null ? void 0 : _b.addEventListener("touchend", util.stopPropagation);
189
+ (_a = controls.root) == null ? void 0 : _a.addEventListener("touchmove", XGUtil.stopPropagation);
190
+ (_b = controls.center) == null ? void 0 : _b.addEventListener("touchend", XGUtil.stopPropagation);
188
191
  }
189
192
  } else {
190
193
  this.bind("mousedown", this._handleMouseDown);
@@ -203,7 +206,7 @@ class TimeShift extends Plugin {
203
206
  }
204
207
  this._stopPropagation(e);
205
208
  this._focus();
206
- this._progressBtn && util.addClass(this._progressBtn, "active");
209
+ this._progressBtn && XGUtil.addClass(this._progressBtn, "active");
207
210
  this._timeShiftOffset = this._getProgressOffset(e).progressOffset;
208
211
  this._progressUpdate();
209
212
  this._isProgressMoving = true;
@@ -223,7 +226,7 @@ class TimeShift extends Plugin {
223
226
  _handleMouseUp(e) {
224
227
  this._stopPropagation(e);
225
228
  this._isProgressMoving = false;
226
- this._progressBtn && util.removeClass(this._progressBtn, "active");
229
+ this._progressBtn && XGUtil.removeClass(this._progressBtn, "active");
227
230
  this._changeTimeUrl();
228
231
  if (this._isMobile) {
229
232
  this.unbind("touchmove", this._handleMouseMove);
@@ -246,16 +249,16 @@ class TimeShift extends Plugin {
246
249
  }
247
250
  _focus() {
248
251
  this.player.controls.pauseAutoHide();
249
- util.addClass(this.root, "active");
252
+ XGUtil.addClass(this.root, "active");
250
253
  }
251
254
  _blur() {
252
255
  this.player.controls.recoverAutoHide();
253
- util.removeClass(this.root, "active");
256
+ XGUtil.removeClass(this.root, "active");
254
257
  }
255
258
  _getProgressPercent(e) {
256
259
  const { player } = this;
257
260
  const { width, height, top, left } = this.root.getBoundingClientRect();
258
- const _ePos = util.getEventPos(e, player.zoom);
261
+ const _ePos = XGUtil.getEventPos(e, player.zoom);
259
262
  let rWidth, rLeft, clientX;
260
263
  if (player.rotateDeg === 90) {
261
264
  rWidth = height;
@@ -314,7 +317,7 @@ class TimeShift extends Plugin {
314
317
  if (this._backToLiveBtn) {
315
318
  return;
316
319
  }
317
- this._backToLiveBtn = util.createDom(
320
+ this._backToLiveBtn = XGUtil.createDom(
318
321
  "xg-back-live-bt",
319
322
  this.langText.backToLive,
320
323
  void 0,