@byteplus/veplayer-plugin 2.3.0-rc.3 → 2.3.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.
@@ -4,6 +4,7 @@ var __publicField = (obj, key2, value2) => {
4
4
  __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value2);
5
5
  return value2;
6
6
  };
7
+ import { DynamicModule, Plugin, Sniffer, util as util$2, live } from "@byteplus/veplayer";
7
8
  function ownKeys$e(object, enumerableOnly) {
8
9
  var keys9 = Object.keys(object);
9
10
  if (Object.getOwnPropertySymbols) {
@@ -12918,8 +12919,7 @@ var Adaptive = /* @__PURE__ */ function(_BasePlugin) {
12918
12919
  }]);
12919
12920
  return Adaptive2;
12920
12921
  }(BasePlugin);
12921
- const DynamicModule$4 = window["VePlayer"].DynamicModule;
12922
- const __PLUGIN_NAME__$4 = DynamicModule$4.PluginFlv;
12922
+ const __PLUGIN_NAME__$4 = DynamicModule.PluginFlv;
12923
12923
  var index$4 = /* @__PURE__ */ Object.freeze({
12924
12924
  __proto__: null,
12925
12925
  Adaptive,
@@ -17047,8 +17047,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
17047
17047
  }]);
17048
17048
  return RtsPlugin2;
17049
17049
  }(BasePlugin);
17050
- const DynamicModule$3 = window["VePlayer"].DynamicModule;
17051
- const __PLUGIN_NAME__$3 = DynamicModule$3.PluginRtm;
17050
+ const __PLUGIN_NAME__$3 = DynamicModule.PluginRtm;
17052
17051
  var index$3 = /* @__PURE__ */ Object.freeze({
17053
17052
  __proto__: null,
17054
17053
  RtmPlugin: RtsPlugin,
@@ -30048,8 +30047,7 @@ var HlsPlugin = /* @__PURE__ */ function(_BasePlugin) {
30048
30047
  }(BasePlugin);
30049
30048
  _defineProperty$a(HlsPlugin, "Hls", Hls);
30050
30049
  _defineProperty$a(HlsPlugin, "EVENT", Event$1);
30051
- const DynamicModule$2 = window["VePlayer"].DynamicModule;
30052
- const __PLUGIN_NAME__$2 = DynamicModule$2.PluginHls;
30050
+ const __PLUGIN_NAME__$2 = DynamicModule.PluginHls;
30053
30051
  var index$2 = /* @__PURE__ */ Object.freeze({
30054
30052
  __proto__: null,
30055
30053
  HlsPlugin,
@@ -49569,8 +49567,7 @@ try {
49569
49567
  customElements.get(getEleName()) || customElements.define(getEleName(), XGVideo);
49570
49568
  } catch (e) {
49571
49569
  }
49572
- const DynamicModule$1 = window["VePlayer"].DynamicModule;
49573
- const __PLUGIN_NAME__$1 = DynamicModule$1.PluginXgvideo;
49570
+ const __PLUGIN_NAME__$1 = DynamicModule.PluginXgvideo;
49574
49571
  var index$1 = /* @__PURE__ */ Object.freeze({
49575
49572
  __proto__: null,
49576
49573
  XGVideoPlugin: XGVideo,
@@ -49936,7 +49933,6 @@ class DrmPlugin extends Mobile {
49936
49933
  data2.serverCertificatePath && (this.serverCertificatePath = data2.serverCertificatePath);
49937
49934
  }
49938
49935
  }
49939
- const DynamicModule = window["VePlayer"].DynamicModule;
49940
49936
  const __PLUGIN_NAME__ = DynamicModule.PluginDrm;
49941
49937
  var index = /* @__PURE__ */ Object.freeze({
49942
49938
  __proto__: null,
@@ -49976,10 +49972,6 @@ const addUrlParam = (originUrl, params) => {
49976
49972
  }
49977
49973
  };
49978
49974
  var timeShift = "";
49979
- const live = window["VePlayer"].live;
49980
- const Plugin = window["VePlayer"].Plugin;
49981
- const Sniffer = window["VePlayer"].Sniffer;
49982
- const XGUtil = window["VePlayer"].util;
49983
49975
  const { POSITIONS } = Plugin;
49984
49976
  const { Events } = live;
49985
49977
  const MAX_SHIFT = 7 * 24 * 3600;
@@ -50001,8 +49993,8 @@ class TimeShift extends Plugin {
50001
49993
  __publicField(this, "_isProgressMoving", false);
50002
49994
  __publicField(this, "_liveUrl", "");
50003
49995
  __publicField(this, "_stopPropagation", (e) => {
50004
- XGUtil.stopPropagation(e);
50005
- XGUtil.event(e);
49996
+ util$2.stopPropagation(e);
49997
+ util$2.event(e);
50006
49998
  });
50007
49999
  }
50008
50000
  static get pluginName() {
@@ -50075,11 +50067,11 @@ class TimeShift extends Plugin {
50075
50067
  if (controls) {
50076
50068
  (_a = controls.root) == null ? void 0 : _a.removerEventListener(
50077
50069
  "touchmove",
50078
- XGUtil.stopPropagation
50070
+ util$2.stopPropagation
50079
50071
  );
50080
50072
  (_b = controls.center) == null ? void 0 : _b.removerEventListener(
50081
50073
  "touchend",
50082
- XGUtil.stopPropagation
50074
+ util$2.stopPropagation
50083
50075
  );
50084
50076
  }
50085
50077
  } else {
@@ -50125,8 +50117,8 @@ class TimeShift extends Plugin {
50125
50117
  this.bind("touchstart", this._handleMouseDown);
50126
50118
  const controls = this.player.controls;
50127
50119
  if (controls) {
50128
- (_a = controls.root) == null ? void 0 : _a.addEventListener("touchmove", XGUtil.stopPropagation);
50129
- (_b = controls.center) == null ? void 0 : _b.addEventListener("touchend", XGUtil.stopPropagation);
50120
+ (_a = controls.root) == null ? void 0 : _a.addEventListener("touchmove", util$2.stopPropagation);
50121
+ (_b = controls.center) == null ? void 0 : _b.addEventListener("touchend", util$2.stopPropagation);
50130
50122
  }
50131
50123
  } else {
50132
50124
  this.bind("mousedown", this._handleMouseDown);
@@ -50145,7 +50137,7 @@ class TimeShift extends Plugin {
50145
50137
  }
50146
50138
  this._stopPropagation(e);
50147
50139
  this._focus();
50148
- this._progressBtn && XGUtil.addClass(this._progressBtn, "active");
50140
+ this._progressBtn && util$2.addClass(this._progressBtn, "active");
50149
50141
  this._timeShiftOffset = this._getProgressOffset(e).progressOffset;
50150
50142
  this._progressUpdate();
50151
50143
  this._isProgressMoving = true;
@@ -50165,7 +50157,7 @@ class TimeShift extends Plugin {
50165
50157
  _handleMouseUp(e) {
50166
50158
  this._stopPropagation(e);
50167
50159
  this._isProgressMoving = false;
50168
- this._progressBtn && XGUtil.removeClass(this._progressBtn, "active");
50160
+ this._progressBtn && util$2.removeClass(this._progressBtn, "active");
50169
50161
  this._changeTimeUrl();
50170
50162
  if (this._isMobile) {
50171
50163
  this.unbind("touchmove", this._handleMouseMove);
@@ -50188,16 +50180,16 @@ class TimeShift extends Plugin {
50188
50180
  }
50189
50181
  _focus() {
50190
50182
  this.player.controls.pauseAutoHide();
50191
- XGUtil.addClass(this.root, "active");
50183
+ util$2.addClass(this.root, "active");
50192
50184
  }
50193
50185
  _blur() {
50194
50186
  this.player.controls.recoverAutoHide();
50195
- XGUtil.removeClass(this.root, "active");
50187
+ util$2.removeClass(this.root, "active");
50196
50188
  }
50197
50189
  _getProgressPercent(e) {
50198
50190
  const { player } = this;
50199
50191
  const { width, height, top, left } = this.root.getBoundingClientRect();
50200
- const _ePos = XGUtil.getEventPos(e, player.zoom);
50192
+ const _ePos = util$2.getEventPos(e, player.zoom);
50201
50193
  let rWidth, rLeft, clientX;
50202
50194
  if (player.rotateDeg === 90) {
50203
50195
  rWidth = height;
@@ -50256,7 +50248,7 @@ class TimeShift extends Plugin {
50256
50248
  if (this._backToLiveBtn) {
50257
50249
  return;
50258
50250
  }
50259
- this._backToLiveBtn = XGUtil.createDom(
50251
+ this._backToLiveBtn = util$2.createDom(
50260
50252
  "xg-back-live-bt",
50261
50253
  this.langText.backToLive,
50262
50254
  void 0,