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

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