@volcengine/veplayer 2.4.1-rc.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.
@@ -1311,7 +1311,7 @@ var __publicField = (obj, key, value) => {
1311
1311
  android: /(Android)\s([\d.]+)/,
1312
1312
  ios: /(Version)\/([\d.]+)/
1313
1313
  };
1314
- 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"];
1314
+ 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"];
1315
1315
  var sniffer = {
1316
1316
  get device() {
1317
1317
  var r = sniffer.os;
@@ -1456,7 +1456,7 @@ var __publicField = (obj, key, value) => {
1456
1456
  }
1457
1457
  }
1458
1458
  };
1459
- var version = "3.0.19-rc.0";
1459
+ var version = "3.0.20-alpha.4";
1460
1460
  var ERROR_TYPE_MAP = {
1461
1461
  1: "media",
1462
1462
  2: "media",
@@ -2426,8 +2426,7 @@ var __publicField = (obj, key, value) => {
2426
2426
  }
2427
2427
  if (this.__hooks && this.__hooks[hookName]) {
2428
2428
  try {
2429
- var _this$__hooks$hookNam;
2430
- var preRet = (_this$__hooks$hookNam = this.__hooks[hookName]).call.apply(_this$__hooks$hookNam, [this, this].concat(Array.prototype.slice.call(arguments)));
2429
+ var preRet = runHooks(this, hookName, handler);
2431
2430
  if (preRet) {
2432
2431
  if (preRet.then) {
2433
2432
  preRet.then(function(isContinue) {
@@ -2452,6 +2451,19 @@ var __publicField = (obj, key, value) => {
2452
2451
  }
2453
2452
  }.bind(this);
2454
2453
  }
2454
+ function findHookIndex(hookName, handler) {
2455
+ var __hooks = this.__hooks;
2456
+ if (!__hooks || !Array.isArray(__hooks[hookName])) {
2457
+ return -1;
2458
+ }
2459
+ var hookHandlers = __hooks[hookName];
2460
+ for (var i = 0; i < hookHandlers.length; i++) {
2461
+ if (hookHandlers[i] === handler) {
2462
+ return i;
2463
+ }
2464
+ }
2465
+ return -1;
2466
+ }
2455
2467
  function useHooks(hookName, handler) {
2456
2468
  var __hooks = this.__hooks;
2457
2469
  if (!__hooks) {
@@ -2461,7 +2473,12 @@ var __publicField = (obj, key, value) => {
2461
2473
  console.warn("has no supported hook which name [".concat(hookName, "]"));
2462
2474
  return false;
2463
2475
  }
2464
- __hooks && (__hooks[hookName] = handler);
2476
+ if (!Array.isArray(__hooks[hookName])) {
2477
+ __hooks[hookName] = [];
2478
+ }
2479
+ if (findHookIndex.call(this, hookName, handler) === -1) {
2480
+ __hooks[hookName].push(handler);
2481
+ }
2465
2482
  return true;
2466
2483
  }
2467
2484
  function removeHooks(hookName, handler) {
@@ -2469,6 +2486,13 @@ var __publicField = (obj, key, value) => {
2469
2486
  if (!__hooks) {
2470
2487
  return;
2471
2488
  }
2489
+ if (Array.isArray(__hooks[hookName])) {
2490
+ var hooks = __hooks[hookName];
2491
+ var index = findHookIndex.call(this, hookName, handler);
2492
+ if (index !== -1) {
2493
+ hooks.splice(index, 1);
2494
+ }
2495
+ }
2472
2496
  delete __hooks[hookName];
2473
2497
  }
2474
2498
  function usePluginHooks(pluginName) {
@@ -2516,18 +2540,30 @@ var __publicField = (obj, key, value) => {
2516
2540
  for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
2517
2541
  args[_key5 - 3] = arguments[_key5];
2518
2542
  }
2519
- if (obj.__hooks && obj.__hooks[hookName]) {
2520
- var _obj$__hooks$hookName;
2521
- var ret = (_obj$__hooks$hookName = obj.__hooks[hookName]).call.apply(_obj$__hooks$hookName, [obj, obj].concat(args));
2522
- if (ret && ret.then) {
2523
- ret.then(function(data) {
2524
- return data === false ? null : handler.call.apply(handler, [obj, obj].concat(args));
2525
- }).catch(function(e) {
2526
- console.warn("[runHooks]".concat(hookName, " reject"), e.message);
2527
- });
2528
- } else if (ret !== false) {
2529
- return handler.call.apply(handler, [obj, obj].concat(args));
2530
- }
2543
+ if (obj.__hooks && Array.isArray(obj.__hooks[hookName])) {
2544
+ var hooks = obj.__hooks[hookName];
2545
+ var index = -1;
2546
+ var runHooksRecursive = function runHooksRecursive2(obj2, hookName2, handler2) {
2547
+ for (var _len6 = arguments.length, args2 = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
2548
+ args2[_key6 - 3] = arguments[_key6];
2549
+ }
2550
+ index++;
2551
+ if (hooks.length === 0 || index === hooks.length) {
2552
+ return handler2.call.apply(handler2, [obj2, obj2].concat(args2));
2553
+ }
2554
+ var hook2 = hooks[index];
2555
+ var ret = hook2.call.apply(hook2, [obj2, obj2].concat(args2));
2556
+ if (ret && ret.then) {
2557
+ return ret.then(function(data) {
2558
+ return data === false ? null : runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
2559
+ }).catch(function(e) {
2560
+ console.warn("[runHooks]".concat(hookName2, " reject"), e.message);
2561
+ });
2562
+ } else if (ret !== false) {
2563
+ return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
2564
+ }
2565
+ };
2566
+ return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
2531
2567
  } else {
2532
2568
  return handler.call.apply(handler, [obj, obj].concat(args));
2533
2569
  }
@@ -4484,10 +4520,7 @@ var __publicField = (obj, key, value) => {
4484
4520
  }
4485
4521
  var _this$config = _this.config, autoplay2 = _this$config.autoplay, defaultPlaybackRate = _this$config.defaultPlaybackRate;
4486
4522
  XG_DEBUG.logInfo("player", "canPlayFunc, startTime", _this.__startTime);
4487
- if (_this.__startTime > 0 && _this.duration > 0) {
4488
- _this.currentTime = _this.__startTime > _this.duration ? _this.duration : _this.__startTime;
4489
- _this.__startTime = -1;
4490
- }
4523
+ _this._seekToStartTime();
4491
4524
  _this.playbackRate = defaultPlaybackRate;
4492
4525
  (autoplay2 || _this._useAutoplay) && _this.mediaPlay();
4493
4526
  _this.off(CANPLAY, _this.canPlayFunc);
@@ -4577,6 +4610,7 @@ var __publicField = (obj, key, value) => {
4577
4610
  _this.waitTimer = null;
4578
4611
  _this.handleSource = true;
4579
4612
  _this._state = STATES.INITIAL;
4613
+ _this.isAd = false;
4580
4614
  _this.isError = false;
4581
4615
  _this._hasStart = false;
4582
4616
  _this.isSeeking = false;
@@ -4961,7 +4995,8 @@ var __publicField = (obj, key, value) => {
4961
4995
  _pConfig.position && (options.position = _pConfig.position);
4962
4996
  var position = options.position ? options.position : options.config && options.config.position || PLUFGIN.defaultConfig && PLUFGIN.defaultConfig.position;
4963
4997
  if (!options.root && typeof position === "string" && position.indexOf("controls") > -1) {
4964
- return this.controls && this.controls.registerPlugin(PLUFGIN, options, PLUFGIN.pluginName);
4998
+ var _this$controls;
4999
+ return (_this$controls = this.controls) === null || _this$controls === void 0 ? void 0 : _this$controls.registerPlugin(PLUFGIN, options, PLUFGIN.pluginName);
4965
5000
  }
4966
5001
  if (!options.root) {
4967
5002
  options.root = this._getRootByPosition(position);
@@ -5109,10 +5144,7 @@ var __publicField = (obj, key, value) => {
5109
5144
  reject(e);
5110
5145
  };
5111
5146
  var _canplay = function _canplay2() {
5112
- if (_this9.duration > 0 && _this9.__startTime > 0) {
5113
- _this9.currentTime = _this9.__startTime;
5114
- _this9.__startTime = -1;
5115
- }
5147
+ _this9._seekToStartTime();
5116
5148
  if (isPaused) {
5117
5149
  _this9.pause();
5118
5150
  }
@@ -5733,11 +5765,17 @@ var __publicField = (obj, key, value) => {
5733
5765
  }, {
5734
5766
  key: "onLoadeddata",
5735
5767
  value: function onLoadeddata() {
5768
+ var _this22 = this;
5736
5769
  this.isError = false;
5737
5770
  this.isSeeking = false;
5738
- if (this.__startTime > 0 && this.duration > 0) {
5739
- this.currentTime = this.__startTime;
5740
- this.__startTime = -1;
5771
+ if (this.__startTime > 0) {
5772
+ if (this.duration > 0) {
5773
+ this._seekToStartTime();
5774
+ } else {
5775
+ this.once(DURATION_CHANGE, function() {
5776
+ _this22._seekToStartTime();
5777
+ });
5778
+ }
5741
5779
  }
5742
5780
  }
5743
5781
  }, {
@@ -5806,27 +5844,27 @@ var __publicField = (obj, key, value) => {
5806
5844
  }, {
5807
5845
  key: "onWaiting",
5808
5846
  value: function onWaiting() {
5809
- var _this22 = this;
5847
+ var _this23 = this;
5810
5848
  if (this.waitTimer) {
5811
5849
  util.clearTimeout(this, this.waitTimer);
5812
5850
  }
5813
5851
  this.updateAcc("waiting");
5814
5852
  this.waitTimer = util.setTimeout(this, function() {
5815
- _this22.addClass(STATE_CLASS.LOADING);
5816
- _this22.emit(LOADING);
5817
- util.clearTimeout(_this22, _this22.waitTimer);
5818
- _this22.waitTimer = null;
5853
+ _this23.addClass(STATE_CLASS.LOADING);
5854
+ _this23.emit(LOADING);
5855
+ util.clearTimeout(_this23, _this23.waitTimer);
5856
+ _this23.waitTimer = null;
5819
5857
  }, this.config.minWaitDelay);
5820
5858
  }
5821
5859
  }, {
5822
5860
  key: "onPlaying",
5823
5861
  value: function onPlaying() {
5824
- var _this23 = this;
5862
+ var _this24 = this;
5825
5863
  this.isError = false;
5826
5864
  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;
5827
5865
  var clsList = [NO_START, PAUSED, ENDED2, ERROR2, REPLAY2, LOADING2];
5828
5866
  clsList.forEach(function(cls) {
5829
- _this23.removeClass(cls);
5867
+ _this24.removeClass(cls);
5830
5868
  });
5831
5869
  if (!this._accPlayed.t && !this.paused && !this.ended) {
5832
5870
  this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime();
@@ -5987,14 +6025,14 @@ var __publicField = (obj, key, value) => {
5987
6025
  }, {
5988
6026
  key: "setConfig",
5989
6027
  value: function setConfig(config) {
5990
- var _this24 = this;
6028
+ var _this25 = this;
5991
6029
  if (!config) {
5992
6030
  return;
5993
6031
  }
5994
6032
  Object.keys(config).map(function(key) {
5995
6033
  if (key !== "plugins") {
5996
- _this24.config[key] = config[key];
5997
- var plugin = _this24.plugins[key.toLowerCase()];
6034
+ _this25.config[key] = config[key];
6035
+ var plugin = _this25.plugins[key.toLowerCase()];
5998
6036
  if (plugin && util.typeOf(plugin.setConfig) === "Function") {
5999
6037
  plugin.setConfig(config[key]);
6000
6038
  }
@@ -6004,20 +6042,20 @@ var __publicField = (obj, key, value) => {
6004
6042
  }, {
6005
6043
  key: "playNext",
6006
6044
  value: function playNext(config) {
6007
- var _this25 = this;
6045
+ var _this26 = this;
6008
6046
  this.resetState();
6009
6047
  this.setConfig(config);
6010
6048
  this._currentTime = 0;
6011
6049
  this._duration = 0;
6012
6050
  runHooks(this, "playnext", function() {
6013
- _this25.start();
6014
- _this25.emit(PLAYNEXT, config);
6051
+ _this26.start();
6052
+ _this26.emit(PLAYNEXT, config);
6015
6053
  });
6016
6054
  }
6017
6055
  }, {
6018
6056
  key: "resize",
6019
6057
  value: function resize() {
6020
- var _this26 = this;
6058
+ var _this27 = this;
6021
6059
  if (!this.media) {
6022
6060
  return;
6023
6061
  }
@@ -6057,7 +6095,7 @@ var __publicField = (obj, key, value) => {
6057
6095
  }
6058
6096
  if (!this.fullscreen && !this.cssfullscreen) {
6059
6097
  Object.keys(_style).forEach(function(key) {
6060
- _this26.root.style[key] = _style[key];
6098
+ _this27.root.style[key] = _style[key];
6061
6099
  });
6062
6100
  }
6063
6101
  if (videoFillMode === "fillHeight" && fit < videoFit || videoFillMode === "fillWidth" && fit > videoFit) {
@@ -6099,6 +6137,14 @@ var __publicField = (obj, key, value) => {
6099
6137
  url
6100
6138
  };
6101
6139
  }
6140
+ }, {
6141
+ key: "_seekToStartTime",
6142
+ value: function _seekToStartTime() {
6143
+ if (this.__startTime > 0 && this.duration > 0) {
6144
+ this.currentTime = this.__startTime > this.duration ? this.duration : this.__startTime;
6145
+ this.__startTime = -1;
6146
+ }
6147
+ }
6102
6148
  }, {
6103
6149
  key: "state",
6104
6150
  get: function get() {
@@ -6149,15 +6195,15 @@ var __publicField = (obj, key, value) => {
6149
6195
  return this.config.definition.list || [];
6150
6196
  },
6151
6197
  set: function set(list) {
6152
- var _this27 = this;
6198
+ var _this28 = this;
6153
6199
  var definition = this.config.definition;
6154
6200
  var curDef = null;
6155
6201
  var targetDef = null;
6156
6202
  definition.list = list;
6157
6203
  this.emit("resourceReady", list);
6158
6204
  list.forEach(function(item) {
6159
- var _this27$curDefinition;
6160
- if (((_this27$curDefinition = _this27.curDefinition) === null || _this27$curDefinition === void 0 ? void 0 : _this27$curDefinition.definition) === item.definition) {
6205
+ var _this28$curDefinition;
6206
+ if (((_this28$curDefinition = _this28.curDefinition) === null || _this28$curDefinition === void 0 ? void 0 : _this28$curDefinition.definition) === item.definition) {
6161
6207
  curDef = item;
6162
6208
  }
6163
6209
  if (definition.defaultDefinition === item.definition) {
@@ -6894,7 +6940,7 @@ var __publicField = (obj, key, value) => {
6894
6940
  var className = _this.config.mode === "auto" ? "auto-hide" : "hide";
6895
6941
  util.addClass(_this.root, className);
6896
6942
  _this.autoPlayStart = true;
6897
- _this.onPlayPause("play");
6943
+ _this.toggleTo("play");
6898
6944
  });
6899
6945
  _this.autoPlayStart = false;
6900
6946
  return _this;
@@ -6902,9 +6948,19 @@ var __publicField = (obj, key, value) => {
6902
6948
  _createClass(Start2, [{
6903
6949
  key: "afterCreate",
6904
6950
  value: function afterCreate() {
6951
+ var playerConfig = this.playerConfig;
6952
+ this.initIcons();
6953
+ this.listenEvents();
6954
+ this.bindClickEvents();
6955
+ if (!playerConfig.autoplay) {
6956
+ this.show();
6957
+ }
6958
+ }
6959
+ }, {
6960
+ key: "listenEvents",
6961
+ value: function listenEvents() {
6905
6962
  var _this2 = this;
6906
6963
  var player = this.player, playerConfig = this.playerConfig;
6907
- this.initIcons();
6908
6964
  this.once(READY, function() {
6909
6965
  if (playerConfig) {
6910
6966
  if (playerConfig.lang && playerConfig.lang === "en") {
@@ -6915,9 +6971,6 @@ var __publicField = (obj, key, value) => {
6915
6971
  }
6916
6972
  });
6917
6973
  this.on(AUTOPLAY_STARTED, this.onAutoplayStart);
6918
- if (!playerConfig.autoplay) {
6919
- this.show();
6920
- }
6921
6974
  this.on(AUTOPLAY_PREVENTED, function() {
6922
6975
  var className = _this2.config.mode === "auto" ? "auto-hide" : "hide";
6923
6976
  _this2.setAttr("data-state", "play");
@@ -6925,20 +6978,25 @@ var __publicField = (obj, key, value) => {
6925
6978
  _this2.show();
6926
6979
  });
6927
6980
  this.on(PLAY, function() {
6928
- _this2.onPlayPause("play");
6981
+ _this2.toggleTo("play");
6929
6982
  });
6930
6983
  this.on(PAUSE, function() {
6931
- _this2.onPlayPause("pause");
6984
+ _this2.toggleTo("pause");
6932
6985
  });
6933
6986
  this.on(RESET, function() {
6934
6987
  _this2.onPlayerReset();
6935
6988
  });
6989
+ }
6990
+ }, {
6991
+ key: "bindClickEvents",
6992
+ value: function bindClickEvents() {
6993
+ var _this3 = this;
6936
6994
  this.clickHandler = this.hook("startClick", this.switchPausePlay, {
6937
6995
  pre: function pre(e) {
6938
6996
  e.cancelable && e.preventDefault();
6939
6997
  e.stopPropagation();
6940
- var paused = _this2.player.paused;
6941
- _this2.emitUserAction(e, "switch_play_pause", {
6998
+ var paused = _this3.player.paused;
6999
+ _this3.emitUserAction(e, "switch_play_pause", {
6942
7000
  props: "paused",
6943
7001
  from: paused,
6944
7002
  to: !paused
@@ -7000,17 +7058,17 @@ var __publicField = (obj, key, value) => {
7000
7058
  }, {
7001
7059
  key: "animate",
7002
7060
  value: function animate(endShow) {
7003
- var _this3 = this;
7061
+ var _this4 = this;
7004
7062
  this._animateId = addAnimate("pauseplay", 400, {
7005
7063
  start: function start() {
7006
- util.addClass(_this3.root, "interact");
7007
- _this3.show();
7008
- _this3.switchStatus(true);
7064
+ util.addClass(_this4.root, "interact");
7065
+ _this4.show();
7066
+ _this4.switchStatus(true);
7009
7067
  },
7010
7068
  end: function end() {
7011
- util.removeClass(_this3.root, "interact");
7012
- !endShow && _this3.hide();
7013
- _this3._animateId = null;
7069
+ util.removeClass(_this4.root, "interact");
7070
+ !endShow && _this4.hide();
7071
+ _this4._animateId = null;
7014
7072
  }
7015
7073
  });
7016
7074
  }
@@ -7040,6 +7098,11 @@ var __publicField = (obj, key, value) => {
7040
7098
  }, {
7041
7099
  key: "onPlayPause",
7042
7100
  value: function onPlayPause(status) {
7101
+ this.toggleTo(status);
7102
+ }
7103
+ }, {
7104
+ key: "toggleTo",
7105
+ value: function toggleTo(status) {
7043
7106
  var config = this.config, player = this.player;
7044
7107
  if (!player || player.state < STATES.RUNNING || !this.autoPlayStart) {
7045
7108
  return;
@@ -9370,29 +9433,56 @@ var __publicField = (obj, key, value) => {
9370
9433
  _inherits(Play2, _IconPlugin);
9371
9434
  var _super = _createSuper(Play2);
9372
9435
  function Play2() {
9436
+ var _this;
9373
9437
  _classCallCheck(this, Play2);
9374
- return _super.apply(this, arguments);
9438
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9439
+ args[_key] = arguments[_key];
9440
+ }
9441
+ _this = _super.call.apply(_super, [this].concat(args));
9442
+ _defineProperty(_assertThisInitialized(_this), "btnClick", function(e) {
9443
+ e.preventDefault();
9444
+ e.stopPropagation();
9445
+ var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;
9446
+ _this.emitUserAction(e, "switch_play_pause", {
9447
+ prop: "paused",
9448
+ from: player.paused,
9449
+ to: !player.paused
9450
+ });
9451
+ if (player.ended) {
9452
+ player.replay();
9453
+ } else if (player.paused) {
9454
+ player.play();
9455
+ _this.animate(false);
9456
+ } else {
9457
+ player.pause();
9458
+ _this.animate(true);
9459
+ }
9460
+ return false;
9461
+ });
9462
+ return _this;
9375
9463
  }
9376
9464
  _createClass(Play2, [{
9377
9465
  key: "afterCreate",
9378
9466
  value: function afterCreate() {
9379
- var _this = this;
9380
9467
  _get(_getPrototypeOf(Play2.prototype), "afterCreate", this).call(this);
9381
- var player = this.player, config = this.config;
9468
+ var config = this.config;
9382
9469
  if (config.disable) {
9383
9470
  return;
9384
9471
  }
9385
9472
  this.initIcons();
9386
- this.btnClick = this.btnClick.bind(this);
9387
9473
  this.bind(["touchend", "click"], this.btnClick);
9388
- this.on([PAUSE, ERROR, EMPTIED], function() {
9389
- _this.animate(player.paused);
9390
- });
9391
- this.on(PLAY, function() {
9392
- _this.animate(player.paused);
9393
- });
9474
+ this.listenEvents();
9394
9475
  this.animate(true);
9395
9476
  }
9477
+ }, {
9478
+ key: "listenEvents",
9479
+ value: function listenEvents() {
9480
+ var _this2 = this;
9481
+ var player = this.player;
9482
+ this.on([PLAY, PAUSE, ERROR, EMPTIED], function() {
9483
+ _this2.animate(player.paused);
9484
+ });
9485
+ }
9396
9486
  }, {
9397
9487
  key: "registerIcons",
9398
9488
  value: function registerIcons() {
@@ -9407,28 +9497,6 @@ var __publicField = (obj, key, value) => {
9407
9497
  }
9408
9498
  };
9409
9499
  }
9410
- }, {
9411
- key: "btnClick",
9412
- value: function btnClick(e) {
9413
- e.preventDefault();
9414
- e.stopPropagation();
9415
- var player = this.player;
9416
- this.emitUserAction(e, "switch_play_pause", {
9417
- prop: "paused",
9418
- from: player.paused,
9419
- to: !player.paused
9420
- });
9421
- if (player.ended) {
9422
- player.replay();
9423
- } else if (player.paused) {
9424
- player.play();
9425
- this.animate(false);
9426
- } else {
9427
- player.pause();
9428
- this.animate(true);
9429
- }
9430
- return false;
9431
- }
9432
9500
  }, {
9433
9501
  key: "initIcons",
9434
9502
  value: function initIcons() {
@@ -11471,10 +11539,10 @@ var __publicField = (obj, key, value) => {
11471
11539
  const { controls } = this.player;
11472
11540
  const { listType } = this.config;
11473
11541
  if (isActive) {
11474
- listType && MODAL_TYPES.includes(listType) ? controls.blur() : controls.focus();
11542
+ listType && MODAL_TYPES.includes(listType) ? controls == null ? void 0 : controls.blur() : controls == null ? void 0 : controls.focus();
11475
11543
  this.optionsList && this.optionsList.show();
11476
11544
  } else {
11477
- listType && MODAL_TYPES.includes(listType) ? controls.focus() : controls.focusAwhile();
11545
+ listType && MODAL_TYPES.includes(listType) ? controls == null ? void 0 : controls.focus() : controls == null ? void 0 : controls.focusAwhile();
11478
11546
  this.optionsList && this.optionsList.hide();
11479
11547
  }
11480
11548
  this._isActive = isActive;
@@ -12941,6 +13009,7 @@ var __publicField = (obj, key, value) => {
12941
13009
  }
12942
13010
  // 有音量修改,取消静音
12943
13011
  handleVolumechange() {
13012
+ this._state.mode = this.player.muted ? 1 : 0;
12944
13013
  if (!this._state.showUnmuteBt)
12945
13014
  return;
12946
13015
  this._state.showUnmuteBt = false;
@@ -13584,7 +13653,7 @@ var __publicField = (obj, key, value) => {
13584
13653
  * @returns
13585
13654
  */
13586
13655
  get playerVersion() {
13587
- return "2.4.1-rc.0";
13656
+ return "2.5.0-rc.0";
13588
13657
  }
13589
13658
  /** {zh}
13590
13659
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。