@volcengine/veplayer 2.4.0 → 2.5.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.
@@ -1316,7 +1316,7 @@ var __publicField = (obj, key, value) => {
1316
1316
  android: /(Android)\s([\d.]+)/,
1317
1317
  ios: /(Version)\/([\d.]+)/
1318
1318
  };
1319
- var H264_MIMETYPES = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"];
1319
+ var H264_MIMETYPES = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"];
1320
1320
  var sniffer$1 = {
1321
1321
  get device() {
1322
1322
  var r2 = sniffer$1.os;
@@ -1461,7 +1461,7 @@ var __publicField = (obj, key, value) => {
1461
1461
  }
1462
1462
  }
1463
1463
  };
1464
- var version = "3.0.19-rc.0";
1464
+ var version = "3.0.20-alpha.4";
1465
1465
  var ERROR_TYPE_MAP = {
1466
1466
  1: "media",
1467
1467
  2: "media",
@@ -2431,8 +2431,7 @@ var __publicField = (obj, key, value) => {
2431
2431
  }
2432
2432
  if (this.__hooks && this.__hooks[hookName]) {
2433
2433
  try {
2434
- var _this$__hooks$hookNam;
2435
- var preRet = (_this$__hooks$hookNam = this.__hooks[hookName]).call.apply(_this$__hooks$hookNam, [this, this].concat(Array.prototype.slice.call(arguments)));
2434
+ var preRet = runHooks(this, hookName, handler);
2436
2435
  if (preRet) {
2437
2436
  if (preRet.then) {
2438
2437
  preRet.then(function(isContinue) {
@@ -2457,6 +2456,19 @@ var __publicField = (obj, key, value) => {
2457
2456
  }
2458
2457
  }.bind(this);
2459
2458
  }
2459
+ function findHookIndex(hookName, handler) {
2460
+ var __hooks = this.__hooks;
2461
+ if (!__hooks || !Array.isArray(__hooks[hookName])) {
2462
+ return -1;
2463
+ }
2464
+ var hookHandlers = __hooks[hookName];
2465
+ for (var i2 = 0; i2 < hookHandlers.length; i2++) {
2466
+ if (hookHandlers[i2] === handler) {
2467
+ return i2;
2468
+ }
2469
+ }
2470
+ return -1;
2471
+ }
2460
2472
  function useHooks(hookName, handler) {
2461
2473
  var __hooks = this.__hooks;
2462
2474
  if (!__hooks) {
@@ -2466,7 +2478,12 @@ var __publicField = (obj, key, value) => {
2466
2478
  console.warn("has no supported hook which name [".concat(hookName, "]"));
2467
2479
  return false;
2468
2480
  }
2469
- __hooks && (__hooks[hookName] = handler);
2481
+ if (!Array.isArray(__hooks[hookName])) {
2482
+ __hooks[hookName] = [];
2483
+ }
2484
+ if (findHookIndex.call(this, hookName, handler) === -1) {
2485
+ __hooks[hookName].push(handler);
2486
+ }
2470
2487
  return true;
2471
2488
  }
2472
2489
  function removeHooks(hookName, handler) {
@@ -2474,6 +2491,13 @@ var __publicField = (obj, key, value) => {
2474
2491
  if (!__hooks) {
2475
2492
  return;
2476
2493
  }
2494
+ if (Array.isArray(__hooks[hookName])) {
2495
+ var hooks = __hooks[hookName];
2496
+ var index = findHookIndex.call(this, hookName, handler);
2497
+ if (index !== -1) {
2498
+ hooks.splice(index, 1);
2499
+ }
2500
+ }
2477
2501
  delete __hooks[hookName];
2478
2502
  }
2479
2503
  function usePluginHooks(pluginName) {
@@ -2521,18 +2545,30 @@ var __publicField = (obj, key, value) => {
2521
2545
  for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
2522
2546
  args[_key5 - 3] = arguments[_key5];
2523
2547
  }
2524
- if (obj.__hooks && obj.__hooks[hookName]) {
2525
- var _obj$__hooks$hookName;
2526
- var ret = (_obj$__hooks$hookName = obj.__hooks[hookName]).call.apply(_obj$__hooks$hookName, [obj, obj].concat(args));
2527
- if (ret && ret.then) {
2528
- ret.then(function(data) {
2529
- return data === false ? null : handler.call.apply(handler, [obj, obj].concat(args));
2530
- }).catch(function(e2) {
2531
- console.warn("[runHooks]".concat(hookName, " reject"), e2.message);
2532
- });
2533
- } else if (ret !== false) {
2534
- return handler.call.apply(handler, [obj, obj].concat(args));
2535
- }
2548
+ if (obj.__hooks && Array.isArray(obj.__hooks[hookName])) {
2549
+ var hooks = obj.__hooks[hookName];
2550
+ var index = -1;
2551
+ var runHooksRecursive = function runHooksRecursive2(obj2, hookName2, handler2) {
2552
+ for (var _len6 = arguments.length, args2 = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
2553
+ args2[_key6 - 3] = arguments[_key6];
2554
+ }
2555
+ index++;
2556
+ if (hooks.length === 0 || index === hooks.length) {
2557
+ return handler2.call.apply(handler2, [obj2, obj2].concat(args2));
2558
+ }
2559
+ var hook2 = hooks[index];
2560
+ var ret = hook2.call.apply(hook2, [obj2, obj2].concat(args2));
2561
+ if (ret && ret.then) {
2562
+ return ret.then(function(data) {
2563
+ return data === false ? null : runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
2564
+ }).catch(function(e2) {
2565
+ console.warn("[runHooks]".concat(hookName2, " reject"), e2.message);
2566
+ });
2567
+ } else if (ret !== false) {
2568
+ return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
2569
+ }
2570
+ };
2571
+ return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
2536
2572
  } else {
2537
2573
  return handler.call.apply(handler, [obj, obj].concat(args));
2538
2574
  }
@@ -4489,10 +4525,7 @@ var __publicField = (obj, key, value) => {
4489
4525
  }
4490
4526
  var _this$config = _this.config, autoplay2 = _this$config.autoplay, defaultPlaybackRate = _this$config.defaultPlaybackRate;
4491
4527
  XG_DEBUG.logInfo("player", "canPlayFunc, startTime", _this.__startTime);
4492
- if (_this.__startTime > 0 && _this.duration > 0) {
4493
- _this.currentTime = _this.__startTime > _this.duration ? _this.duration : _this.__startTime;
4494
- _this.__startTime = -1;
4495
- }
4528
+ _this._seekToStartTime();
4496
4529
  _this.playbackRate = defaultPlaybackRate;
4497
4530
  (autoplay2 || _this._useAutoplay) && _this.mediaPlay();
4498
4531
  _this.off(CANPLAY, _this.canPlayFunc);
@@ -4582,6 +4615,7 @@ var __publicField = (obj, key, value) => {
4582
4615
  _this.waitTimer = null;
4583
4616
  _this.handleSource = true;
4584
4617
  _this._state = STATES.INITIAL;
4618
+ _this.isAd = false;
4585
4619
  _this.isError = false;
4586
4620
  _this._hasStart = false;
4587
4621
  _this.isSeeking = false;
@@ -4966,7 +5000,8 @@ var __publicField = (obj, key, value) => {
4966
5000
  _pConfig.position && (options.position = _pConfig.position);
4967
5001
  var position = options.position ? options.position : options.config && options.config.position || PLUFGIN.defaultConfig && PLUFGIN.defaultConfig.position;
4968
5002
  if (!options.root && typeof position === "string" && position.indexOf("controls") > -1) {
4969
- return this.controls && this.controls.registerPlugin(PLUFGIN, options, PLUFGIN.pluginName);
5003
+ var _this$controls;
5004
+ return (_this$controls = this.controls) === null || _this$controls === void 0 ? void 0 : _this$controls.registerPlugin(PLUFGIN, options, PLUFGIN.pluginName);
4970
5005
  }
4971
5006
  if (!options.root) {
4972
5007
  options.root = this._getRootByPosition(position);
@@ -5114,10 +5149,7 @@ var __publicField = (obj, key, value) => {
5114
5149
  reject(e2);
5115
5150
  };
5116
5151
  var _canplay = function _canplay2() {
5117
- if (_this9.duration > 0 && _this9.__startTime > 0) {
5118
- _this9.currentTime = _this9.__startTime;
5119
- _this9.__startTime = -1;
5120
- }
5152
+ _this9._seekToStartTime();
5121
5153
  if (isPaused) {
5122
5154
  _this9.pause();
5123
5155
  }
@@ -5738,11 +5770,17 @@ var __publicField = (obj, key, value) => {
5738
5770
  }, {
5739
5771
  key: "onLoadeddata",
5740
5772
  value: function onLoadeddata() {
5773
+ var _this22 = this;
5741
5774
  this.isError = false;
5742
5775
  this.isSeeking = false;
5743
- if (this.__startTime > 0 && this.duration > 0) {
5744
- this.currentTime = this.__startTime;
5745
- this.__startTime = -1;
5776
+ if (this.__startTime > 0) {
5777
+ if (this.duration > 0) {
5778
+ this._seekToStartTime();
5779
+ } else {
5780
+ this.once(DURATION_CHANGE, function() {
5781
+ _this22._seekToStartTime();
5782
+ });
5783
+ }
5746
5784
  }
5747
5785
  }
5748
5786
  }, {
@@ -5811,27 +5849,27 @@ var __publicField = (obj, key, value) => {
5811
5849
  }, {
5812
5850
  key: "onWaiting",
5813
5851
  value: function onWaiting() {
5814
- var _this22 = this;
5852
+ var _this23 = this;
5815
5853
  if (this.waitTimer) {
5816
5854
  util$1.clearTimeout(this, this.waitTimer);
5817
5855
  }
5818
5856
  this.updateAcc("waiting");
5819
5857
  this.waitTimer = util$1.setTimeout(this, function() {
5820
- _this22.addClass(STATE_CLASS.LOADING);
5821
- _this22.emit(LOADING);
5822
- util$1.clearTimeout(_this22, _this22.waitTimer);
5823
- _this22.waitTimer = null;
5858
+ _this23.addClass(STATE_CLASS.LOADING);
5859
+ _this23.emit(LOADING);
5860
+ util$1.clearTimeout(_this23, _this23.waitTimer);
5861
+ _this23.waitTimer = null;
5824
5862
  }, this.config.minWaitDelay);
5825
5863
  }
5826
5864
  }, {
5827
5865
  key: "onPlaying",
5828
5866
  value: function onPlaying() {
5829
- var _this23 = this;
5867
+ var _this24 = this;
5830
5868
  this.isError = false;
5831
5869
  var NO_START = STATE_CLASS.NO_START, PAUSED = STATE_CLASS.PAUSED, ENDED2 = STATE_CLASS.ENDED, ERROR2 = STATE_CLASS.ERROR, REPLAY2 = STATE_CLASS.REPLAY, LOADING2 = STATE_CLASS.LOADING;
5832
5870
  var clsList = [NO_START, PAUSED, ENDED2, ERROR2, REPLAY2, LOADING2];
5833
5871
  clsList.forEach(function(cls) {
5834
- _this23.removeClass(cls);
5872
+ _this24.removeClass(cls);
5835
5873
  });
5836
5874
  if (!this._accPlayed.t && !this.paused && !this.ended) {
5837
5875
  this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime();
@@ -5992,14 +6030,14 @@ var __publicField = (obj, key, value) => {
5992
6030
  }, {
5993
6031
  key: "setConfig",
5994
6032
  value: function setConfig(config) {
5995
- var _this24 = this;
6033
+ var _this25 = this;
5996
6034
  if (!config) {
5997
6035
  return;
5998
6036
  }
5999
6037
  Object.keys(config).map(function(key) {
6000
6038
  if (key !== "plugins") {
6001
- _this24.config[key] = config[key];
6002
- var plugin = _this24.plugins[key.toLowerCase()];
6039
+ _this25.config[key] = config[key];
6040
+ var plugin = _this25.plugins[key.toLowerCase()];
6003
6041
  if (plugin && util$1.typeOf(plugin.setConfig) === "Function") {
6004
6042
  plugin.setConfig(config[key]);
6005
6043
  }
@@ -6009,20 +6047,20 @@ var __publicField = (obj, key, value) => {
6009
6047
  }, {
6010
6048
  key: "playNext",
6011
6049
  value: function playNext(config) {
6012
- var _this25 = this;
6050
+ var _this26 = this;
6013
6051
  this.resetState();
6014
6052
  this.setConfig(config);
6015
6053
  this._currentTime = 0;
6016
6054
  this._duration = 0;
6017
6055
  runHooks(this, "playnext", function() {
6018
- _this25.start();
6019
- _this25.emit(PLAYNEXT, config);
6056
+ _this26.start();
6057
+ _this26.emit(PLAYNEXT, config);
6020
6058
  });
6021
6059
  }
6022
6060
  }, {
6023
6061
  key: "resize",
6024
6062
  value: function resize() {
6025
- var _this26 = this;
6063
+ var _this27 = this;
6026
6064
  if (!this.media) {
6027
6065
  return;
6028
6066
  }
@@ -6062,7 +6100,7 @@ var __publicField = (obj, key, value) => {
6062
6100
  }
6063
6101
  if (!this.fullscreen && !this.cssfullscreen) {
6064
6102
  Object.keys(_style).forEach(function(key) {
6065
- _this26.root.style[key] = _style[key];
6103
+ _this27.root.style[key] = _style[key];
6066
6104
  });
6067
6105
  }
6068
6106
  if (videoFillMode === "fillHeight" && fit < videoFit || videoFillMode === "fillWidth" && fit > videoFit) {
@@ -6104,6 +6142,14 @@ var __publicField = (obj, key, value) => {
6104
6142
  url
6105
6143
  };
6106
6144
  }
6145
+ }, {
6146
+ key: "_seekToStartTime",
6147
+ value: function _seekToStartTime() {
6148
+ if (this.__startTime > 0 && this.duration > 0) {
6149
+ this.currentTime = this.__startTime > this.duration ? this.duration : this.__startTime;
6150
+ this.__startTime = -1;
6151
+ }
6152
+ }
6107
6153
  }, {
6108
6154
  key: "state",
6109
6155
  get: function get() {
@@ -6154,15 +6200,15 @@ var __publicField = (obj, key, value) => {
6154
6200
  return this.config.definition.list || [];
6155
6201
  },
6156
6202
  set: function set(list) {
6157
- var _this27 = this;
6203
+ var _this28 = this;
6158
6204
  var definition = this.config.definition;
6159
6205
  var curDef = null;
6160
6206
  var targetDef = null;
6161
6207
  definition.list = list;
6162
6208
  this.emit("resourceReady", list);
6163
6209
  list.forEach(function(item) {
6164
- var _this27$curDefinition;
6165
- if (((_this27$curDefinition = _this27.curDefinition) === null || _this27$curDefinition === void 0 ? void 0 : _this27$curDefinition.definition) === item.definition) {
6210
+ var _this28$curDefinition;
6211
+ if (((_this28$curDefinition = _this28.curDefinition) === null || _this28$curDefinition === void 0 ? void 0 : _this28$curDefinition.definition) === item.definition) {
6166
6212
  curDef = item;
6167
6213
  }
6168
6214
  if (definition.defaultDefinition === item.definition) {
@@ -6926,7 +6972,7 @@ var __publicField = (obj, key, value) => {
6926
6972
  var className = _this.config.mode === "auto" ? "auto-hide" : "hide";
6927
6973
  util$1.addClass(_this.root, className);
6928
6974
  _this.autoPlayStart = true;
6929
- _this.onPlayPause("play");
6975
+ _this.toggleTo("play");
6930
6976
  });
6931
6977
  _this.autoPlayStart = false;
6932
6978
  return _this;
@@ -6934,9 +6980,19 @@ var __publicField = (obj, key, value) => {
6934
6980
  _createClass$1(Start2, [{
6935
6981
  key: "afterCreate",
6936
6982
  value: function afterCreate() {
6983
+ var playerConfig = this.playerConfig;
6984
+ this.initIcons();
6985
+ this.listenEvents();
6986
+ this.bindClickEvents();
6987
+ if (!playerConfig.autoplay) {
6988
+ this.show();
6989
+ }
6990
+ }
6991
+ }, {
6992
+ key: "listenEvents",
6993
+ value: function listenEvents() {
6937
6994
  var _this2 = this;
6938
6995
  var player = this.player, playerConfig = this.playerConfig;
6939
- this.initIcons();
6940
6996
  this.once(READY, function() {
6941
6997
  if (playerConfig) {
6942
6998
  if (playerConfig.lang && playerConfig.lang === "en") {
@@ -6947,9 +7003,6 @@ var __publicField = (obj, key, value) => {
6947
7003
  }
6948
7004
  });
6949
7005
  this.on(AUTOPLAY_STARTED, this.onAutoplayStart);
6950
- if (!playerConfig.autoplay) {
6951
- this.show();
6952
- }
6953
7006
  this.on(AUTOPLAY_PREVENTED, function() {
6954
7007
  var className = _this2.config.mode === "auto" ? "auto-hide" : "hide";
6955
7008
  _this2.setAttr("data-state", "play");
@@ -6957,20 +7010,25 @@ var __publicField = (obj, key, value) => {
6957
7010
  _this2.show();
6958
7011
  });
6959
7012
  this.on(PLAY, function() {
6960
- _this2.onPlayPause("play");
7013
+ _this2.toggleTo("play");
6961
7014
  });
6962
7015
  this.on(PAUSE, function() {
6963
- _this2.onPlayPause("pause");
7016
+ _this2.toggleTo("pause");
6964
7017
  });
6965
7018
  this.on(RESET, function() {
6966
7019
  _this2.onPlayerReset();
6967
7020
  });
7021
+ }
7022
+ }, {
7023
+ key: "bindClickEvents",
7024
+ value: function bindClickEvents() {
7025
+ var _this3 = this;
6968
7026
  this.clickHandler = this.hook("startClick", this.switchPausePlay, {
6969
7027
  pre: function pre(e2) {
6970
7028
  e2.cancelable && e2.preventDefault();
6971
7029
  e2.stopPropagation();
6972
- var paused = _this2.player.paused;
6973
- _this2.emitUserAction(e2, "switch_play_pause", {
7030
+ var paused = _this3.player.paused;
7031
+ _this3.emitUserAction(e2, "switch_play_pause", {
6974
7032
  props: "paused",
6975
7033
  from: paused,
6976
7034
  to: !paused
@@ -7032,17 +7090,17 @@ var __publicField = (obj, key, value) => {
7032
7090
  }, {
7033
7091
  key: "animate",
7034
7092
  value: function animate(endShow) {
7035
- var _this3 = this;
7093
+ var _this4 = this;
7036
7094
  this._animateId = addAnimate("pauseplay", 400, {
7037
7095
  start: function start() {
7038
- util$1.addClass(_this3.root, "interact");
7039
- _this3.show();
7040
- _this3.switchStatus(true);
7096
+ util$1.addClass(_this4.root, "interact");
7097
+ _this4.show();
7098
+ _this4.switchStatus(true);
7041
7099
  },
7042
7100
  end: function end() {
7043
- util$1.removeClass(_this3.root, "interact");
7044
- !endShow && _this3.hide();
7045
- _this3._animateId = null;
7101
+ util$1.removeClass(_this4.root, "interact");
7102
+ !endShow && _this4.hide();
7103
+ _this4._animateId = null;
7046
7104
  }
7047
7105
  });
7048
7106
  }
@@ -7072,6 +7130,11 @@ var __publicField = (obj, key, value) => {
7072
7130
  }, {
7073
7131
  key: "onPlayPause",
7074
7132
  value: function onPlayPause(status) {
7133
+ this.toggleTo(status);
7134
+ }
7135
+ }, {
7136
+ key: "toggleTo",
7137
+ value: function toggleTo(status) {
7075
7138
  var config = this.config, player = this.player;
7076
7139
  if (!player || player.state < STATES.RUNNING || !this.autoPlayStart) {
7077
7140
  return;
@@ -9402,29 +9465,56 @@ var __publicField = (obj, key, value) => {
9402
9465
  _inherits(Play2, _IconPlugin);
9403
9466
  var _super = _createSuper(Play2);
9404
9467
  function Play2() {
9468
+ var _this;
9405
9469
  _classCallCheck(this, Play2);
9406
- return _super.apply(this, arguments);
9470
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9471
+ args[_key] = arguments[_key];
9472
+ }
9473
+ _this = _super.call.apply(_super, [this].concat(args));
9474
+ _defineProperty$1(_assertThisInitialized(_this), "btnClick", function(e2) {
9475
+ e2.preventDefault();
9476
+ e2.stopPropagation();
9477
+ var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;
9478
+ _this.emitUserAction(e2, "switch_play_pause", {
9479
+ prop: "paused",
9480
+ from: player.paused,
9481
+ to: !player.paused
9482
+ });
9483
+ if (player.ended) {
9484
+ player.replay();
9485
+ } else if (player.paused) {
9486
+ player.play();
9487
+ _this.animate(false);
9488
+ } else {
9489
+ player.pause();
9490
+ _this.animate(true);
9491
+ }
9492
+ return false;
9493
+ });
9494
+ return _this;
9407
9495
  }
9408
9496
  _createClass$1(Play2, [{
9409
9497
  key: "afterCreate",
9410
9498
  value: function afterCreate() {
9411
- var _this = this;
9412
9499
  _get(_getPrototypeOf(Play2.prototype), "afterCreate", this).call(this);
9413
- var player = this.player, config = this.config;
9500
+ var config = this.config;
9414
9501
  if (config.disable) {
9415
9502
  return;
9416
9503
  }
9417
9504
  this.initIcons();
9418
- this.btnClick = this.btnClick.bind(this);
9419
9505
  this.bind(["touchend", "click"], this.btnClick);
9420
- this.on([PAUSE, ERROR, EMPTIED], function() {
9421
- _this.animate(player.paused);
9422
- });
9423
- this.on(PLAY, function() {
9424
- _this.animate(player.paused);
9425
- });
9506
+ this.listenEvents();
9426
9507
  this.animate(true);
9427
9508
  }
9509
+ }, {
9510
+ key: "listenEvents",
9511
+ value: function listenEvents() {
9512
+ var _this2 = this;
9513
+ var player = this.player;
9514
+ this.on([PLAY, PAUSE, ERROR, EMPTIED], function() {
9515
+ _this2.animate(player.paused);
9516
+ });
9517
+ }
9428
9518
  }, {
9429
9519
  key: "registerIcons",
9430
9520
  value: function registerIcons() {
@@ -9439,28 +9529,6 @@ var __publicField = (obj, key, value) => {
9439
9529
  }
9440
9530
  };
9441
9531
  }
9442
- }, {
9443
- key: "btnClick",
9444
- value: function btnClick(e2) {
9445
- e2.preventDefault();
9446
- e2.stopPropagation();
9447
- var player = this.player;
9448
- this.emitUserAction(e2, "switch_play_pause", {
9449
- prop: "paused",
9450
- from: player.paused,
9451
- to: !player.paused
9452
- });
9453
- if (player.ended) {
9454
- player.replay();
9455
- } else if (player.paused) {
9456
- player.play();
9457
- this.animate(false);
9458
- } else {
9459
- player.pause();
9460
- this.animate(true);
9461
- }
9462
- return false;
9463
- }
9464
9532
  }, {
9465
9533
  key: "initIcons",
9466
9534
  value: function initIcons() {
@@ -11579,10 +11647,10 @@ var __publicField = (obj, key, value) => {
11579
11647
  const { controls } = this.player;
11580
11648
  const { listType } = this.config;
11581
11649
  if (isActive) {
11582
- listType && MODAL_TYPES.includes(listType) ? controls.blur() : controls.focus();
11650
+ listType && MODAL_TYPES.includes(listType) ? controls == null ? void 0 : controls.blur() : controls == null ? void 0 : controls.focus();
11583
11651
  this.optionsList && this.optionsList.show();
11584
11652
  } else {
11585
- listType && MODAL_TYPES.includes(listType) ? controls.focus() : controls.focusAwhile();
11653
+ listType && MODAL_TYPES.includes(listType) ? controls == null ? void 0 : controls.focus() : controls == null ? void 0 : controls.focusAwhile();
11586
11654
  this.optionsList && this.optionsList.hide();
11587
11655
  }
11588
11656
  this._isActive = isActive;
@@ -13049,6 +13117,7 @@ var __publicField = (obj, key, value) => {
13049
13117
  }
13050
13118
  // 有音量修改,取消静音
13051
13119
  handleVolumechange() {
13120
+ this._state.mode = this.player.muted ? 1 : 0;
13052
13121
  if (!this._state.showUnmuteBt)
13053
13122
  return;
13054
13123
  this._state.showUnmuteBt = false;
@@ -13746,7 +13815,7 @@ var __publicField = (obj, key, value) => {
13746
13815
  * @returns
13747
13816
  */
13748
13817
  get playerVersion() {
13749
- return "2.4.0";
13818
+ return "2.5.0-rc.0";
13750
13819
  }
13751
13820
  /** {zh}
13752
13821
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -21998,9 +22067,9 @@ var __publicField = (obj, key, value) => {
21998
22067
  user_id: this._userId,
21999
22068
  device_id: this._deviceId,
22000
22069
  ext: {
22001
- veplayer_version: "2.4.0",
22070
+ veplayer_version: "2.5.0-rc.0",
22002
22071
  flv_version: "3.0.19-rc.0",
22003
- hls_version: "3.0.19-rc.0",
22072
+ hls_version: "3.0.20-alpha.2",
22004
22073
  rts_version: "0.2.1-alpha.0"
22005
22074
  }
22006
22075
  });