@volcengine/veplayer 2.2.1-rc.0 → 2.3.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 (43) hide show
  1. package/LICENSE +20 -0
  2. package/esm/index.d.ts +84 -88
  3. package/esm/veplayer.biz.live.development.js +104 -27
  4. package/esm/veplayer.biz.live.production.js +1 -1
  5. package/esm/veplayer.d.ts +327 -178
  6. package/esm/veplayer.development.css +1 -1
  7. package/esm/veplayer.development.js +457 -142
  8. package/esm/veplayer.live.d.ts +327 -178
  9. package/esm/veplayer.live.development.css +1 -1
  10. package/esm/veplayer.live.development.js +457 -142
  11. package/esm/veplayer.live.production.css +1 -1
  12. package/esm/veplayer.live.production.js +3 -3
  13. package/esm/veplayer.production.css +1 -1
  14. package/esm/veplayer.production.js +3 -3
  15. package/esm/veplayer.vod.d.ts +84 -88
  16. package/esm/veplayer.vod.development.css +1 -1
  17. package/esm/veplayer.vod.development.js +366 -125
  18. package/esm/veplayer.vod.production.css +1 -1
  19. package/esm/veplayer.vod.production.js +2 -2
  20. package/package.json +1 -1
  21. package/umd/index.d.ts +84 -88
  22. package/umd/veplayer.biz.live.development.js +107 -30
  23. package/umd/veplayer.biz.live.production.js +1 -1
  24. package/umd/veplayer.biz.vod.development.js +3 -2
  25. package/umd/veplayer.biz.vod.production.js +1 -1
  26. package/umd/veplayer.d.ts +327 -178
  27. package/umd/veplayer.development.css +1 -1
  28. package/umd/veplayer.development.js +456 -141
  29. package/umd/veplayer.live.d.ts +327 -178
  30. package/umd/veplayer.live.development.css +1 -1
  31. package/umd/veplayer.live.development.js +459 -144
  32. package/umd/veplayer.live.production.css +1 -1
  33. package/umd/veplayer.live.production.js +1 -1
  34. package/umd/veplayer.production.css +1 -1
  35. package/umd/veplayer.production.js +1 -1
  36. package/umd/veplayer.vod.d.ts +84 -88
  37. package/umd/veplayer.vod.development.css +1 -1
  38. package/umd/veplayer.vod.development.js +371 -130
  39. package/umd/veplayer.vod.production.css +1 -1
  40. package/umd/veplayer.vod.production.js +1 -1
  41. package/veplayer.d.ts +327 -178
  42. package/veplayer.live.d.ts +327 -178
  43. package/veplayer.vod.d.ts +84 -88
@@ -47,8 +47,8 @@ var __publicField = (obj, key, value) => {
47
47
  return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
48
48
  }, _typeof(obj);
49
49
  }
50
- function _classCallCheck(instance, Constructor) {
51
- if (!(instance instanceof Constructor)) {
50
+ function _classCallCheck(instance2, Constructor) {
51
+ if (!(instance2 instanceof Constructor)) {
52
52
  throw new TypeError("Cannot call a class as a function");
53
53
  }
54
54
  }
@@ -1453,7 +1453,7 @@ var __publicField = (obj, key, value) => {
1453
1453
  }
1454
1454
  }
1455
1455
  };
1456
- var version = "3.0.11-alpha.2";
1456
+ var version = "3.0.12";
1457
1457
  var ERROR_TYPE_MAP = {
1458
1458
  1: "media",
1459
1459
  2: "media",
@@ -2315,10 +2315,10 @@ var __publicField = (obj, key, value) => {
2315
2315
  }, {
2316
2316
  key: "addData",
2317
2317
  value: function addData(storename, data) {
2318
- var store = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2318
+ var store2 = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2319
2319
  var request;
2320
2320
  for (var i = 0; i < data.length; i++) {
2321
- request = store.add(data[i]);
2321
+ request = store2.add(data[i]);
2322
2322
  request.onerror = function() {
2323
2323
  };
2324
2324
  request.onsuccess = function() {
@@ -2328,10 +2328,10 @@ var __publicField = (obj, key, value) => {
2328
2328
  }, {
2329
2329
  key: "putData",
2330
2330
  value: function putData(storename, data) {
2331
- var store = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2331
+ var store2 = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2332
2332
  var request;
2333
2333
  for (var i = 0; i < data.length; i++) {
2334
- request = store.put(data[i]);
2334
+ request = store2.put(data[i]);
2335
2335
  request.onerror = function() {
2336
2336
  };
2337
2337
  request.onsuccess = function() {
@@ -2342,8 +2342,8 @@ var __publicField = (obj, key, value) => {
2342
2342
  key: "getDataByKey",
2343
2343
  value: function getDataByKey(storename, key, callback) {
2344
2344
  var self2 = this;
2345
- var store = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2346
- var request = store.get(key);
2345
+ var store2 = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2346
+ var request = store2.get(key);
2347
2347
  request.onerror = function() {
2348
2348
  callback.call(self2, null);
2349
2349
  };
@@ -2355,14 +2355,14 @@ var __publicField = (obj, key, value) => {
2355
2355
  }, {
2356
2356
  key: "deleteData",
2357
2357
  value: function deleteData(storename, key) {
2358
- var store = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2359
- store.delete(key);
2358
+ var store2 = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2359
+ store2.delete(key);
2360
2360
  }
2361
2361
  }, {
2362
2362
  key: "clearData",
2363
2363
  value: function clearData(storename) {
2364
- var store = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2365
- store.clear();
2364
+ var store2 = this.myDB.db.transaction(storename, "readwrite").objectStore(storename);
2365
+ store2.clear();
2366
2366
  }
2367
2367
  }]);
2368
2368
  return INDEXDB2;
@@ -2479,24 +2479,24 @@ var __publicField = (obj, key, value) => {
2479
2479
  return plugin.removeHooks && plugin.removeHooks.apply(plugin, args);
2480
2480
  }
2481
2481
  }
2482
- function hooksDescriptor(instance) {
2482
+ function hooksDescriptor(instance2) {
2483
2483
  var presetHooks = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
2484
- instance.__hooks = {};
2484
+ instance2.__hooks = {};
2485
2485
  presetHooks && presetHooks.map(function(item) {
2486
- instance.__hooks[item] = null;
2486
+ instance2.__hooks[item] = null;
2487
2487
  });
2488
- Object.defineProperty(instance, "hooks", {
2488
+ Object.defineProperty(instance2, "hooks", {
2489
2489
  get: function get() {
2490
- return instance.__hooks && Object.keys(instance.__hooks).map(function(key) {
2491
- if (instance.__hooks[key]) {
2490
+ return instance2.__hooks && Object.keys(instance2.__hooks).map(function(key) {
2491
+ if (instance2.__hooks[key]) {
2492
2492
  return key;
2493
2493
  }
2494
2494
  });
2495
2495
  }
2496
2496
  });
2497
2497
  }
2498
- function delHooksDescriptor(instance) {
2499
- instance.__hooks = null;
2498
+ function delHooksDescriptor(instance2) {
2499
+ instance2.__hooks = null;
2500
2500
  }
2501
2501
  function runHooks(obj, hookName, handler) {
2502
2502
  for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
@@ -2714,7 +2714,7 @@ var __publicField = (obj, key, value) => {
2714
2714
  }
2715
2715
  }, {
2716
2716
  key: "registerPlugin",
2717
- value: function registerPlugin(plugin) {
2717
+ value: function registerPlugin2(plugin) {
2718
2718
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2719
2719
  var name = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
2720
2720
  if (!this.player) {
@@ -3073,7 +3073,7 @@ var __publicField = (obj, key, value) => {
3073
3073
  }
3074
3074
  }, {
3075
3075
  key: "registerPlugin",
3076
- value: function registerPlugin(plugin) {
3076
+ value: function registerPlugin2(plugin) {
3077
3077
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3078
3078
  var name = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
3079
3079
  options.root = options.root || this.root;
@@ -3212,7 +3212,7 @@ var __publicField = (obj, key, value) => {
3212
3212
  var cs = window.getComputedStyle(this.root, null);
3213
3213
  var cssDisplayValue = cs.getPropertyValue("display");
3214
3214
  if (cssDisplayValue === "none") {
3215
- return this.root.style.display = "block";
3215
+ this.root.style.display = "block";
3216
3216
  }
3217
3217
  }
3218
3218
  }, {
@@ -3469,28 +3469,11 @@ var __publicField = (obj, key, value) => {
3469
3469
  !player.config.closeResizeObserver && addObserver(player.root, function() {
3470
3470
  player.resize();
3471
3471
  });
3472
- if (Object.keys(this.pluginGroup).length === 0) {
3473
- player.isUserActive = true;
3474
- }
3475
3472
  this.pluginGroup[cgid] = {
3476
- _player: player,
3477
3473
  _originalOptions: player.config || {},
3478
3474
  _plugins: {}
3479
3475
  };
3480
3476
  },
3481
- checkPlayerRoot: function checkPlayerRoot(root) {
3482
- if (this.pluginGroup) {
3483
- var _keys = Object.keys(this.pluginGroup);
3484
- for (var i = 0; i < _keys.length; i++) {
3485
- var _p = this.pluginGroup[_keys[i]]._player;
3486
- if (_p.root === root) {
3487
- return _p;
3488
- }
3489
- }
3490
- return null;
3491
- }
3492
- return null;
3493
- },
3494
3477
  formatPluginInfo: function formatPluginInfo(plugin, config) {
3495
3478
  var PLUFGIN = null;
3496
3479
  var options = null;
@@ -3565,7 +3548,7 @@ var __publicField = (obj, key, value) => {
3565
3548
  }
3566
3549
  var plugins = this.pluginGroup[cgid]._plugins;
3567
3550
  var originalOptions = this.pluginGroup[cgid]._originalOptions;
3568
- options.player = this.pluginGroup[cgid]._player;
3551
+ options.player = player;
3569
3552
  var pluginName = options.pluginName || plugin.pluginName;
3570
3553
  if (!pluginName) {
3571
3554
  throw new Error("The property pluginName is necessary");
@@ -3764,37 +3747,6 @@ var __publicField = (obj, key, value) => {
3764
3747
  }
3765
3748
  });
3766
3749
  },
3767
- setCurrentUserActive: function setCurrentUserActive(playerId, isActive) {
3768
- if (!this.pluginGroup[playerId]) {
3769
- return;
3770
- }
3771
- if (!isActive) {
3772
- this.pluginGroup[playerId]._player.isUserActive = isActive;
3773
- return playerId;
3774
- }
3775
- var keys = Object.keys(this.pluginGroup);
3776
- for (var i = 0; i < keys.length; i++) {
3777
- var c = this.pluginGroup[keys[i]];
3778
- if (c && c._player) {
3779
- this.pluginGroup[keys[i]]._player.isUserActive = false;
3780
- }
3781
- }
3782
- this.pluginGroup[playerId]._player.isUserActive = isActive;
3783
- return playerId;
3784
- },
3785
- getCurrentUseActiveId: function getCurrentUseActiveId() {
3786
- if (!this.pluginGroup) {
3787
- return;
3788
- }
3789
- var keys = Object.keys(this.pluginGroup);
3790
- for (var i = 0; i < keys.length; i++) {
3791
- var c = this.pluginGroup[keys[i]];
3792
- if (c && c._player && c._player.isUserActive) {
3793
- return keys[i];
3794
- }
3795
- }
3796
- return null;
3797
- },
3798
3750
  destroy: function destroy(player) {
3799
3751
  var cgid = player._pluginInfoId;
3800
3752
  if (!this.pluginGroup[cgid]) {
@@ -4050,7 +4002,7 @@ var __publicField = (obj, key, value) => {
4050
4002
  }
4051
4003
  }, {
4052
4004
  key: "show",
4053
- value: function show() {
4005
+ value: function show(value) {
4054
4006
  this.root.style.display = "";
4055
4007
  this.player.focus();
4056
4008
  }
@@ -4066,7 +4018,7 @@ var __publicField = (obj, key, value) => {
4066
4018
  }
4067
4019
  }, {
4068
4020
  key: "registerPlugin",
4069
- value: function registerPlugin(plugin) {
4021
+ value: function registerPlugin2(plugin) {
4070
4022
  var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
4071
4023
  var name = arguments.length > 2 ? arguments[2] : void 0;
4072
4024
  if (!this.root) {
@@ -4343,9 +4295,158 @@ var __publicField = (obj, key, value) => {
4343
4295
  DESTROYED: 8
4344
4296
  };
4345
4297
  var STATE_ARRAY = ["ERROR", "INITIAL", "READY", "ATTACHING", "ATTACHED", "NOTALLOW", "RUNNING", "ENDED", "DESTROYED"];
4298
+ var store = {};
4299
+ var instance = null;
4300
+ var InstManager = /* @__PURE__ */ function(_EventEmitter) {
4301
+ _inherits(InstManager2, _EventEmitter);
4302
+ var _super = _createSuper(InstManager2);
4303
+ function InstManager2() {
4304
+ _classCallCheck(this, InstManager2);
4305
+ return _super.apply(this, arguments);
4306
+ }
4307
+ _createClass(InstManager2, [{
4308
+ key: "add",
4309
+ value: function add(player) {
4310
+ if (!player) {
4311
+ return;
4312
+ }
4313
+ store[player.playerId] = player;
4314
+ if (Object.keys(store).length === 1) {
4315
+ this.setActive(player.playerId, true);
4316
+ }
4317
+ }
4318
+ }, {
4319
+ key: "remove",
4320
+ value: function remove(player) {
4321
+ if (!player) {
4322
+ return;
4323
+ }
4324
+ player.isUserActive;
4325
+ delete store[player.playerId];
4326
+ }
4327
+ }, {
4328
+ key: "_iterate",
4329
+ value: function _iterate(fn) {
4330
+ var endEarly = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
4331
+ for (var key in store) {
4332
+ if (Object.prototype.hasOwnProperty.call(store, key)) {
4333
+ var player = store[key];
4334
+ if (endEarly) {
4335
+ if (fn(player)) {
4336
+ break;
4337
+ }
4338
+ } else {
4339
+ fn(player);
4340
+ }
4341
+ }
4342
+ }
4343
+ }
4344
+ }, {
4345
+ key: "forEach",
4346
+ value: function forEach(fn) {
4347
+ this._iterate(fn);
4348
+ }
4349
+ }, {
4350
+ key: "find",
4351
+ value: function find(fn) {
4352
+ var result = null;
4353
+ this._iterate(function(player) {
4354
+ var flag = fn(player);
4355
+ if (flag) {
4356
+ result = player;
4357
+ }
4358
+ return flag;
4359
+ }, true);
4360
+ return result;
4361
+ }
4362
+ }, {
4363
+ key: "findAll",
4364
+ value: function findAll(fn) {
4365
+ var results = [];
4366
+ this._iterate(function(player) {
4367
+ if (fn(player)) {
4368
+ results.push(player);
4369
+ }
4370
+ });
4371
+ return results;
4372
+ }
4373
+ }, {
4374
+ key: "setActive",
4375
+ value: function setActive(playerId) {
4376
+ var isActive = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
4377
+ if (!store[playerId]) {
4378
+ return;
4379
+ }
4380
+ if (isActive) {
4381
+ this.forEach(function(inst) {
4382
+ if (playerId === inst.playerId) {
4383
+ inst.isUserActive = true;
4384
+ inst.isInstNext = false;
4385
+ } else {
4386
+ inst.isUserActive = false;
4387
+ }
4388
+ });
4389
+ } else {
4390
+ store[playerId].isUserActive = isActive;
4391
+ }
4392
+ return playerId;
4393
+ }
4394
+ }, {
4395
+ key: "getActiveId",
4396
+ value: function getActiveId() {
4397
+ var keys = Object.keys(store);
4398
+ for (var i = 0; i < keys.length; i++) {
4399
+ var c = store[keys[i]];
4400
+ if (c && c.isUserActive) {
4401
+ return keys[i];
4402
+ }
4403
+ }
4404
+ return null;
4405
+ }
4406
+ }, {
4407
+ key: "setNext",
4408
+ value: function setNext(playerId) {
4409
+ var isNext = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
4410
+ if (!store[playerId]) {
4411
+ return;
4412
+ }
4413
+ if (isNext) {
4414
+ this.forEach(function(inst) {
4415
+ if (playerId === inst.playerId) {
4416
+ inst.isUserActive = false;
4417
+ inst.isInstNext = true;
4418
+ } else {
4419
+ inst.isInstNext = false;
4420
+ }
4421
+ });
4422
+ } else {
4423
+ store[playerId].isInstNext = isNext;
4424
+ }
4425
+ return playerId;
4426
+ }
4427
+ }], [{
4428
+ key: "getInstance",
4429
+ value: function getInstance() {
4430
+ instance || (instance = new InstManager2());
4431
+ return instance;
4432
+ }
4433
+ }]);
4434
+ return InstManager2;
4435
+ }(eventemitter3Exports.EventEmitter);
4436
+ function checkPlayerRoot(root) {
4437
+ var keys = Object.keys(store);
4438
+ for (var i = 0; i < keys.length; i++) {
4439
+ var p = store[keys[i]];
4440
+ if (p.root === root) {
4441
+ return p;
4442
+ }
4443
+ }
4444
+ return null;
4445
+ }
4346
4446
  var PlAYER_HOOKS = ["play", "pause", "replay", "retry"];
4347
4447
  var REAL_TIME_SPEED = 0;
4348
4448
  var AVG_SPEED = 0;
4449
+ var instManager = null;
4349
4450
  var Player = /* @__PURE__ */ function(_MediaProxy) {
4350
4451
  _inherits(Player2, _MediaProxy);
4351
4452
  var _super = _createSuper(Player2);
@@ -4358,11 +4459,11 @@ var __publicField = (obj, key, value) => {
4358
4459
  if (!_this.config) {
4359
4460
  return;
4360
4461
  }
4361
- var _this$config = _this.config, autoplay2 = _this$config.autoplay, startTime = _this$config.startTime, defaultPlaybackRate = _this$config.defaultPlaybackRate;
4362
- XG_DEBUG.logInfo("player", "canPlayFunc, startTime", startTime);
4363
- if (startTime) {
4364
- _this.currentTime = startTime > _this.duration ? _this.duration : startTime;
4365
- _this.config.startTime = 0;
4462
+ var _this$config = _this.config, autoplay2 = _this$config.autoplay, defaultPlaybackRate = _this$config.defaultPlaybackRate;
4463
+ XG_DEBUG.logInfo("player", "canPlayFunc, startTime", _this.__startTime);
4464
+ if (_this.__startTime > 0 && _this.duration > 0) {
4465
+ _this.currentTime = _this.__startTime > _this.duration ? _this.duration : _this.__startTime;
4466
+ _this.__startTime = -1;
4366
4467
  }
4367
4468
  _this.playbackRate = defaultPlaybackRate;
4368
4469
  (autoplay2 || _this._useAutoplay) && _this.mediaPlay();
@@ -4453,6 +4554,7 @@ var __publicField = (obj, key, value) => {
4453
4554
  _this.isSeeking = false;
4454
4555
  _this.isCanplay = false;
4455
4556
  _this._useAutoplay = false;
4557
+ _this.__startTime = -1;
4456
4558
  _this.rotateDeg = 0;
4457
4559
  _this.isActive = false;
4458
4560
  _this.fullscreen = false;
@@ -4507,6 +4609,7 @@ var __publicField = (obj, key, value) => {
4507
4609
  _this.innerStates = {
4508
4610
  isActiveLocked: false
4509
4611
  };
4612
+ _this.instManager = instManager;
4510
4613
  var rootInit = _this._initDOM();
4511
4614
  if (!rootInit) {
4512
4615
  console.error(new Error("can't find the dom which id is ".concat(_this.config.id, " or this.config.el does not exist")));
@@ -4544,7 +4647,7 @@ var __publicField = (obj, key, value) => {
4544
4647
  _createClass(Player2, [{
4545
4648
  key: "_initDOM",
4546
4649
  value: function _initDOM() {
4547
- var _this2 = this;
4650
+ var _instManager, _this2 = this;
4548
4651
  this.root = this.config.id ? document.getElementById(this.config.id) : null;
4549
4652
  if (!this.root) {
4550
4653
  var el = this.config.el;
@@ -4560,12 +4663,13 @@ var __publicField = (obj, key, value) => {
4560
4663
  return false;
4561
4664
  }
4562
4665
  }
4563
- var ret = pluginsManager.checkPlayerRoot(this.root);
4666
+ var ret = checkPlayerRoot(this.root);
4564
4667
  if (ret) {
4565
4668
  XG_DEBUG.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize");
4566
4669
  ret.destroy();
4567
4670
  }
4568
4671
  this.root.setAttribute(PLATER_ID, this.playerId);
4672
+ (_instManager = instManager) === null || _instManager === void 0 ? void 0 : _instManager.add(this);
4569
4673
  pluginsManager.init(this);
4570
4674
  this._initBaseDoms();
4571
4675
  var XgVideoProxy = this.constructor.XgVideoProxy;
@@ -4708,10 +4812,13 @@ var __publicField = (obj, key, value) => {
4708
4812
  !util.isMSE(this.media) && this.load();
4709
4813
  (sniffer.os.isIpad || sniffer.os.isPhone) && this.mediaPlay();
4710
4814
  }
4711
- if (readyState >= 2) {
4815
+ var startTime = this.config.startTime;
4816
+ this.__startTime = startTime > 0 ? startTime : -1;
4817
+ this.config.startTime = 0;
4818
+ if (readyState >= 2 && this.duration > 0) {
4712
4819
  this.canPlayFunc();
4713
4820
  } else {
4714
- this.once(CANPLAY, this.canPlayFunc);
4821
+ this.on(CANPLAY, this.canPlayFunc);
4715
4822
  }
4716
4823
  if (!this.hasStart || this.state < STATES.ATTACHED) {
4717
4824
  pluginsManager.afterInit(this);
@@ -4804,7 +4911,7 @@ var __publicField = (obj, key, value) => {
4804
4911
  }
4805
4912
  }, {
4806
4913
  key: "registerPlugin",
4807
- value: function registerPlugin(plugin, config) {
4914
+ value: function registerPlugin2(plugin, config) {
4808
4915
  var _retPlugin = pluginsManager.formatPluginInfo(plugin, config);
4809
4916
  var PLUFGIN = _retPlugin.PLUFGIN, options = _retPlugin.options;
4810
4917
  var plugins = this.config.plugins;
@@ -4953,6 +5060,7 @@ var __publicField = (obj, key, value) => {
4953
5060
  }
4954
5061
  _src = this.preProcessUrl(_src).url;
4955
5062
  var curTime = this.currentTime;
5063
+ this.__startTime = curTime;
4956
5064
  var isPaused = this.paused && !this.isError;
4957
5065
  this.src = _src;
4958
5066
  return new Promise(function(resolve, reject) {
@@ -4962,7 +5070,10 @@ var __publicField = (obj, key, value) => {
4962
5070
  reject(e);
4963
5071
  };
4964
5072
  var _canplay = function _canplay2() {
4965
- _this9.currentTime = curTime;
5073
+ if (_this9.duration > 0 && _this9.__startTime > 0) {
5074
+ _this9.currentTime = _this9.__startTime;
5075
+ _this9.__startTime = -1;
5076
+ }
4966
5077
  if (isPaused) {
4967
5078
  _this9.pause();
4968
5079
  }
@@ -5189,7 +5300,7 @@ var __publicField = (obj, key, value) => {
5189
5300
  clsList.forEach(function(cls) {
5190
5301
  _this16.removeClass(cls);
5191
5302
  });
5192
- this.addClass(STATE_CLASS.ENTER);
5303
+ this.addClass(STATE_CLASS.NO_START);
5193
5304
  this.emit(RESET);
5194
5305
  }
5195
5306
  }, {
@@ -5218,7 +5329,7 @@ var __publicField = (obj, key, value) => {
5218
5329
  }, {
5219
5330
  key: "destroy",
5220
5331
  value: function destroy() {
5221
- var _this18 = this;
5332
+ var _instManager2, _this18 = this;
5222
5333
  var innerContainer = this.innerContainer, root = this.root, media = this.media;
5223
5334
  if (!root || !media) {
5224
5335
  return;
@@ -5231,6 +5342,7 @@ var __publicField = (obj, key, value) => {
5231
5342
  this._detachSourceEvents(this.media);
5232
5343
  util.clearAllTimers(this);
5233
5344
  this.emit(DESTROY);
5345
+ (_instManager2 = instManager) === null || _instManager2 === void 0 ? void 0 : _instManager2.remove(this);
5234
5346
  pluginsManager.destroy(this);
5235
5347
  delHooksDescriptor(this);
5236
5348
  _get(_getPrototypeOf(Player2.prototype), "destroy", this).call(this);
@@ -5582,6 +5694,14 @@ var __publicField = (obj, key, value) => {
5582
5694
  this.isCanplay = true;
5583
5695
  this.waitTimer && util.clearTimeout(this, this.waitTimer);
5584
5696
  }
5697
+ }, {
5698
+ key: "onDurationchange",
5699
+ value: function onDurationchange() {
5700
+ if (this.__startTime > 0 && this.duration > 0) {
5701
+ this.currentTime = this.__startTime;
5702
+ this.__startTime = -1;
5703
+ }
5704
+ }
5585
5705
  }, {
5586
5706
  key: "onLoadeddata",
5587
5707
  value: function onLoadeddata() {
@@ -5759,8 +5879,9 @@ var __publicField = (obj, key, value) => {
5759
5879
  }, {
5760
5880
  key: "resizePosition",
5761
5881
  value: function resizePosition() {
5762
- var _this$videoPos = this.videoPos, rotate = _this$videoPos.rotate, vy = _this$videoPos.vy, vx = _this$videoPos.vx, h = _this$videoPos.h, w = _this$videoPos.w;
5763
- if (rotate < 0 && !vy && !vx) {
5882
+ var _this$videoPos = this.videoPos, vy = _this$videoPos.vy, vx = _this$videoPos.vx, h = _this$videoPos.h, w = _this$videoPos.w;
5883
+ var rotate = this.videoPos.rotate;
5884
+ if (rotate < 0 && h < 0 && w < 0) {
5764
5885
  return;
5765
5886
  }
5766
5887
  var _pi = this.videoPos._pi;
@@ -5771,6 +5892,7 @@ var __publicField = (obj, key, value) => {
5771
5892
  return;
5772
5893
  }
5773
5894
  this.videoPos.pi = _pi;
5895
+ rotate = rotate < 0 ? 0 : rotate;
5774
5896
  var _pos = {
5775
5897
  rotate
5776
5898
  };
@@ -6203,7 +6325,8 @@ var __publicField = (obj, key, value) => {
6203
6325
  }
6204
6326
  }, {
6205
6327
  key: "setUserActive",
6206
- value: function setUserActive(isActive, isMuted) {
6328
+ value: function setUserActive(isActive) {
6329
+ var isMuted = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
6207
6330
  if (typeof isMuted === "boolean" && isMuted !== this.muted) {
6208
6331
  this.addInnerOP("volumechange");
6209
6332
  this.muted = isMuted;
@@ -6218,15 +6341,25 @@ var __publicField = (obj, key, value) => {
6218
6341
  set: function set(value) {
6219
6342
  XG_DEBUG.config.debug = value;
6220
6343
  }
6344
+ }, {
6345
+ key: "instManager",
6346
+ get: function get() {
6347
+ return instManager;
6348
+ },
6349
+ set: function set(value) {
6350
+ instManager = value;
6351
+ }
6221
6352
  }, {
6222
6353
  key: "getCurrentUserActivePlayerId",
6223
6354
  value: function getCurrentUserActivePlayerId() {
6224
- return pluginsManager.getCurrentUseActiveId();
6355
+ var _instManager3;
6356
+ return (_instManager3 = instManager) === null || _instManager3 === void 0 ? void 0 : _instManager3.getActiveId();
6225
6357
  }
6226
6358
  }, {
6227
6359
  key: "setCurrentUserActive",
6228
6360
  value: function setCurrentUserActive(playerId, isActive) {
6229
- pluginsManager.setCurrentUserActive(playerId, isActive);
6361
+ var _instManager4;
6362
+ (_instManager4 = instManager) === null || _instManager4 === void 0 ? void 0 : _instManager4.setActive(playerId, isActive);
6230
6363
  }
6231
6364
  }, {
6232
6365
  key: "isHevcSupported",
@@ -6261,6 +6394,7 @@ var __publicField = (obj, key, value) => {
6261
6394
  }(MediaProxy);
6262
6395
  _defineProperty(Player, "defaultPreset", null);
6263
6396
  _defineProperty(Player, "XgVideoProxy", null);
6397
+ Player.instManager = InstManager.getInstance();
6264
6398
  var index_min = "";
6265
6399
  var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
6266
6400
  ErrorCode2[ErrorCode2["MANIFEST_HLS_ERROR"] = 1100] = "MANIFEST_HLS_ERROR";
@@ -6387,6 +6521,14 @@ var __publicField = (obj, key, value) => {
6387
6521
  messageTextKey: "MODULE_LOAD_ERROR",
6388
6522
  level: "Fatal"
6389
6523
  /* Fatal */
6524
+ },
6525
+ [
6526
+ 7100
6527
+ /* DRM_LICENSE */
6528
+ ]: {
6529
+ messageTextKey: "DRM_LICENSE",
6530
+ level: "Fatal"
6531
+ /* Fatal */
6390
6532
  }
6391
6533
  };
6392
6534
  const ERROR_TYPE_INFO = {
@@ -6469,7 +6611,7 @@ var __publicField = (obj, key, value) => {
6469
6611
  const message = (i18n == null ? void 0 : i18n.getText(errorInfo == null ? void 0 : errorInfo.messageTextKey)) ?? (errorInfo == null ? void 0 : errorInfo.message) ?? ((_a = errorInfo == null ? void 0 : errorInfo.error) == null ? void 0 : _a.message) ?? (i18n == null ? void 0 : i18n.getText("UNKNOWN"));
6470
6612
  super(message);
6471
6613
  /**
6472
- * @brief 错误码,对应[错误码字典](#错误码)。
6614
+ * @brief 错误码,对应[错误码字典](#ErrorCode)。
6473
6615
  */
6474
6616
  __publicField(this, "errorCode");
6475
6617
  /**
@@ -6531,7 +6673,7 @@ var __publicField = (obj, key, value) => {
6531
6673
  }
6532
6674
  }, {
6533
6675
  key: "show",
6534
- value: function show() {
6676
+ value: function show(value) {
6535
6677
  util.removeClass(this.root, "hide");
6536
6678
  }
6537
6679
  }, {
@@ -6610,10 +6752,11 @@ var __publicField = (obj, key, value) => {
6610
6752
  }, {
6611
6753
  key: "render",
6612
6754
  value: function render() {
6613
- var _this$config = this.config, poster = _this$config.poster, hideCanplay = _this$config.hideCanplay, fillMode = _this$config.fillMode;
6755
+ var _this$config = this.config, poster = _this$config.poster, hideCanplay = _this$config.hideCanplay, fillMode = _this$config.fillMode, notHidden = _this$config.notHidden;
6614
6756
  var _bg = this.getBgSize(fillMode);
6615
6757
  var style = poster ? "background-image:url(".concat(poster, ");").concat(_bg) : _bg;
6616
- return '<xg-poster class="xgplayer-poster '.concat(hideCanplay ? "xg-showplay" : "", '" style="').concat(style, '">\n </xg-poster>');
6758
+ var className = notHidden ? "xg-not-hidden" : hideCanplay ? "xg-showplay" : "";
6759
+ return '<xg-poster class="xgplayer-poster '.concat(className, '" style="').concat(style, '">\n </xg-poster>');
6617
6760
  }
6618
6761
  }], [{
6619
6762
  key: "pluginName",
@@ -6626,6 +6769,7 @@ var __publicField = (obj, key, value) => {
6626
6769
  return {
6627
6770
  isEndedShow: true,
6628
6771
  hideCanplay: false,
6772
+ notHidden: false,
6629
6773
  poster: "",
6630
6774
  fillMode: "fixWidth"
6631
6775
  };
@@ -6769,7 +6913,7 @@ var __publicField = (obj, key, value) => {
6769
6913
  }
6770
6914
  }, {
6771
6915
  key: "show",
6772
- value: function show() {
6916
+ value: function show(value) {
6773
6917
  util.removeClass(this.root, "hide");
6774
6918
  }
6775
6919
  }, {
@@ -7731,14 +7875,14 @@ var __publicField = (obj, key, value) => {
7731
7875
  key: "initEvents",
7732
7876
  value: function initEvents() {
7733
7877
  var _this3 = this;
7734
- var _this$player = this.player, video = _this$player.video, root = _this$player.root;
7878
+ var _this$player = this.player, media = _this$player.media, root = _this$player.root;
7735
7879
  var enableContextmenu = this.playerConfig.enableContextmenu;
7736
7880
  root && root.addEventListener("click", this.onVideoClick, false);
7737
7881
  root && root.addEventListener("dblclick", this.onVideoDblClick, false);
7738
7882
  Object.keys(MOUSE_EVENTS).map(function(item) {
7739
7883
  root.addEventListener(item, _this3[MOUSE_EVENTS[item]], false);
7740
7884
  });
7741
- enableContextmenu && video && video.addEventListener("contextmenu", this.onContextmenu, false);
7885
+ !enableContextmenu && media && media.addEventListener("contextmenu", this.onContextmenu, false);
7742
7886
  }
7743
7887
  }, {
7744
7888
  key: "switchPlayPause",
@@ -9462,16 +9606,6 @@ var __publicField = (obj, key, value) => {
9462
9606
  }
9463
9607
  }
9464
9608
  }
9465
- }, {
9466
- key: "show",
9467
- value: function show() {
9468
- _get(_getPrototypeOf(Fullscreen2.prototype), "show", this).call(this);
9469
- }
9470
- }, {
9471
- key: "hide",
9472
- value: function hide() {
9473
- _get(_getPrototypeOf(Fullscreen2.prototype), "hide", this).call(this);
9474
- }
9475
9609
  }, {
9476
9610
  key: "render",
9477
9611
  value: function render() {
@@ -9927,11 +10061,14 @@ var __publicField = (obj, key, value) => {
9927
10061
  }, 0);
9928
10062
  !paused && player.mediaPlay();
9929
10063
  _this3.setAttr("data-state", "normal");
10064
+ _this3.pipWindow = null;
9930
10065
  player.emit(PIP_CHANGE, false);
9931
10066
  };
9932
10067
  this.enterPIPCallback = function(e) {
9933
10068
  player.emit(PIP_CHANGE, true);
9934
- _this3.pipWindow = e.pictureInPictureWindow;
10069
+ if (e !== null && e !== void 0 && e.pictureInPictureWindow) {
10070
+ _this3.pipWindow = e.pictureInPictureWindow;
10071
+ }
9935
10072
  _this3.setAttr("data-state", "pip");
9936
10073
  };
9937
10074
  this.onWebkitpresentationmodechanged = function(e) {
@@ -9952,10 +10089,33 @@ var __publicField = (obj, key, value) => {
9952
10089
  PIP2.checkWebkitSetPresentationMode(player.media) && player.media.addEventListener("webkitpresentationmodechanged", this.onWebkitpresentationmodechanged);
9953
10090
  }
9954
10091
  }
10092
+ }, {
10093
+ key: "copyStyleIntoPiPWindow",
10094
+ value: function copyStyleIntoPiPWindow(pipWin) {
10095
+ var textContent = _toConsumableArray(document.styleSheets).map(function(style2) {
10096
+ try {
10097
+ return _toConsumableArray(style2.cssRules).map(function(rule) {
10098
+ return rule.cssText;
10099
+ }).join("");
10100
+ } catch (e) {
10101
+ var link = document.createElement("link");
10102
+ link.rel = "stylesheet";
10103
+ link.type = style2.type;
10104
+ link.media = style2.media;
10105
+ link.href = style2.href;
10106
+ pipWin.document.head.appendChild(link);
10107
+ }
10108
+ return "";
10109
+ }).filter(Boolean).join("\n");
10110
+ var style = document.createElement("style");
10111
+ style.textContent = textContent;
10112
+ pipWin.document.head.appendChild(style);
10113
+ }
9955
10114
  }, {
9956
10115
  key: "requestPIP",
9957
10116
  value: function requestPIP() {
9958
- var player = this.player, playerConfig = this.playerConfig;
10117
+ var _this4 = this;
10118
+ var player = this.player, playerConfig = this.playerConfig, config = this.config;
9959
10119
  if (!this.isPIPAvailable() || this.isPip) {
9960
10120
  return;
9961
10121
  }
@@ -9964,7 +10124,62 @@ var __publicField = (obj, key, value) => {
9964
10124
  if (poster) {
9965
10125
  player.media.poster = util.typeOf(poster) === "String" ? poster : poster.poster;
9966
10126
  }
9967
- PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode("picture-in-picture") : player.media.requestPictureInPicture();
10127
+ if (config.preferDocument && this.isDocPIPAvailable()) {
10128
+ var pipOptions = {};
10129
+ if (config.width && config.height) {
10130
+ pipOptions.width = config.width;
10131
+ pipOptions.height = config.height;
10132
+ } else {
10133
+ var playerRect = player.root.getBoundingClientRect();
10134
+ pipOptions.width = playerRect.width;
10135
+ pipOptions.height = playerRect.height;
10136
+ }
10137
+ documentPictureInPicture.requestWindow(pipOptions).then(function(pipWin) {
10138
+ var docPiPNode = config.docPiPNode, docPiPStyle = config.docPiPStyle;
10139
+ _this4.enterPIPCallback();
10140
+ var pipRoot = docPiPNode || player.root;
10141
+ var parentNode = pipRoot.parentElement;
10142
+ var previousSibling = pipRoot.previousSibling;
10143
+ var nextSibling = pipRoot.nextSibling;
10144
+ _this4.copyStyleIntoPiPWindow(pipWin);
10145
+ var styles = document.createElement("style");
10146
+ styles.append("body{padding:0; margin:0;}");
10147
+ if (docPiPStyle) {
10148
+ var cssContent = "";
10149
+ if (typeof docPiPStyle === "string") {
10150
+ cssContent = docPiPStyle;
10151
+ } else if (typeof docPiPStyle === "function") {
10152
+ cssContent = docPiPStyle.call(config);
10153
+ }
10154
+ if (cssContent) {
10155
+ styles.append(cssContent);
10156
+ }
10157
+ } else if (pipRoot === player.root) {
10158
+ styles.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");
10159
+ }
10160
+ pipWin.document.head.append(styles);
10161
+ pipWin.document.body.append(pipRoot);
10162
+ pipWin.addEventListener("pagehide", function(event) {
10163
+ if (parentNode) {
10164
+ if (nextSibling) {
10165
+ parentNode.insertBefore(pipRoot, nextSibling);
10166
+ } else if (previousSibling) {
10167
+ parentNode.insertBefore(pipRoot, previousSibling.nextSibling);
10168
+ } else {
10169
+ parentNode.appendChild(pipRoot);
10170
+ }
10171
+ } else {
10172
+ }
10173
+ _this4.leavePIPCallback();
10174
+ }, {
10175
+ once: true
10176
+ });
10177
+ });
10178
+ } else if (PIP2.checkWebkitSetPresentationMode(player.media)) {
10179
+ player.media.webkitSetPresentationMode("picture-in-picture");
10180
+ } else {
10181
+ player.media.requestPictureInPicture();
10182
+ }
9968
10183
  return true;
9969
10184
  } catch (reason) {
9970
10185
  console.error("requestPiP", reason);
@@ -9977,7 +10192,14 @@ var __publicField = (obj, key, value) => {
9977
10192
  var player = this.player;
9978
10193
  try {
9979
10194
  if (this.isPIPAvailable() && this.isPip) {
9980
- PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode("inline") : document.exitPictureInPicture();
10195
+ var _documentPictureInPic;
10196
+ if (this.isDocPIPAvailable() && (_documentPictureInPic = documentPictureInPicture) !== null && _documentPictureInPic !== void 0 && _documentPictureInPic.window) {
10197
+ documentPictureInPicture.window.close();
10198
+ } else if (PIP2.checkWebkitSetPresentationMode(player.media)) {
10199
+ player.media.webkitSetPresentationMode("inline");
10200
+ } else {
10201
+ document.exitPictureInPicture();
10202
+ }
9981
10203
  }
9982
10204
  return true;
9983
10205
  } catch (reason) {
@@ -9988,15 +10210,21 @@ var __publicField = (obj, key, value) => {
9988
10210
  }, {
9989
10211
  key: "isPip",
9990
10212
  get: function get() {
10213
+ var _documentPictureInPic2;
9991
10214
  var player = this.player;
9992
- return document.pictureInPictureElement && document.pictureInPictureElement === player.media || player.media.webkitPresentationMode === PresentationMode.PIP;
10215
+ return !!(this.isDocPIPAvailable() && (_documentPictureInPic2 = documentPictureInPicture) !== null && _documentPictureInPic2 !== void 0 && _documentPictureInPic2.window) || document.pictureInPictureElement && document.pictureInPictureElement === player.media || player.media.webkitPresentationMode === PresentationMode.PIP;
9993
10216
  }
9994
10217
  }, {
9995
10218
  key: "isPIPAvailable",
9996
10219
  value: function isPIPAvailable() {
9997
10220
  var video = this.player.media;
9998
10221
  var _isEnabled = util.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : true;
9999
- return _isEnabled && (util.typeOf(video.disablePictureInPicture) === "Boolean" && !video.disablePictureInPicture || video.webkitSupportsPresentationMode && util.typeOf(video.webkitSetPresentationMode) === "Function");
10222
+ return _isEnabled && (util.typeOf(video.disablePictureInPicture) === "Boolean" && !video.disablePictureInPicture || video.webkitSupportsPresentationMode && util.typeOf(video.webkitSetPresentationMode) === "Function") || this.isDocPIPAvailable();
10223
+ }
10224
+ }, {
10225
+ key: "isDocPIPAvailable",
10226
+ value: function isDocPIPAvailable() {
10227
+ return "documentPictureInPicture" in window && /^(https|file)/.test(location.protocol);
10000
10228
  }
10001
10229
  }, {
10002
10230
  key: "destroy",
@@ -10028,7 +10256,12 @@ var __publicField = (obj, key, value) => {
10028
10256
  return {
10029
10257
  position: POSITIONS$1.CONTROLS_RIGHT,
10030
10258
  index: 6,
10031
- showIcon: false
10259
+ showIcon: false,
10260
+ preferDocument: false,
10261
+ width: void 0,
10262
+ height: void 0,
10263
+ docPiPNode: void 0,
10264
+ docPiPStyle: void 0
10032
10265
  };
10033
10266
  }
10034
10267
  }, {
@@ -12020,7 +12253,7 @@ var __publicField = (obj, key, value) => {
12020
12253
  }
12021
12254
  this._waitingStartTime = Date.now();
12022
12255
  const currentTime = this.player.currentTime;
12023
- this._timer = setTimeout(() => {
12256
+ this._timer = window.setTimeout(() => {
12024
12257
  if (this.player && this.player.currentTime <= currentTime + 0.1) {
12025
12258
  this.player.emit(Events.LONG_WAITING);
12026
12259
  if (this.config.needFallback) {
@@ -12125,7 +12358,8 @@ var __publicField = (obj, key, value) => {
12125
12358
  "plugin:hls": "veplayer.plugin.hls.[env].[ext]",
12126
12359
  "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
12127
12360
  "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
12128
- "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]"
12361
+ "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
12362
+ "plugin:drm": "veplayer.plugin.drm.[env].[ext]"
12129
12363
  };
12130
12364
  var DynamicModule = /* @__PURE__ */ ((DynamicModule2) => {
12131
12365
  DynamicModule2["BizVod"] = "biz:vod";
@@ -12136,6 +12370,7 @@ var __publicField = (obj, key, value) => {
12136
12370
  DynamicModule2["PluginShaka"] = "plugin:shaka";
12137
12371
  DynamicModule2["PluginRtm"] = "plugin:rtm";
12138
12372
  DynamicModule2["PluginXgvideo"] = "plugin:xgvideo";
12373
+ DynamicModule2["PluginDrm"] = "plugin:drm";
12139
12374
  return DynamicModule2;
12140
12375
  })(DynamicModule || {});
12141
12376
  class Loader {
@@ -12179,13 +12414,13 @@ var __publicField = (obj, key, value) => {
12179
12414
  src: src2 ?? moduleSrc,
12180
12415
  name,
12181
12416
  state: 0,
12182
- exports: {}
12417
+ exports: { __PLUGIN_NAME__: name }
12183
12418
  };
12184
12419
  this.modules[name] = module2;
12185
12420
  this.mountPromiseMap[name] = this._mount(module2);
12186
12421
  return this.mountPromiseMap[name];
12187
12422
  });
12188
- __publicField(this, "register", (name, exports3) => {
12423
+ __publicField(this, "registerPlugin", (name, exports3) => {
12189
12424
  if (!this._moduleSystem) {
12190
12425
  throw new Error(
12191
12426
  `You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system`
@@ -12212,6 +12447,11 @@ var __publicField = (obj, key, value) => {
12212
12447
  }
12213
12448
  return this.modules[name].exports;
12214
12449
  });
12450
+ __publicField(this, "register", (exports3) => {
12451
+ return exports3.map((exportModule) => {
12452
+ return this.registerPlugin(exportModule.__PLUGIN_NAME__, exportModule);
12453
+ });
12454
+ });
12215
12455
  this._baseUrl = options.baseUrl;
12216
12456
  }
12217
12457
  get baseUrl() {
@@ -12251,6 +12491,7 @@ var __publicField = (obj, key, value) => {
12251
12491
  const loader = new Loader({
12252
12492
  baseUrl
12253
12493
  });
12494
+ const registerPlugin = loader.registerPlugin;
12254
12495
  const register = loader.register;
12255
12496
  function setModuleSystem(moduleSystem) {
12256
12497
  loader.setModuleSystem(moduleSystem);
@@ -12440,7 +12681,7 @@ var __publicField = (obj, key, value) => {
12440
12681
  }
12441
12682
  wxCanPlayFn() {
12442
12683
  window.WeixinJSBridge && window.WeixinJSBridge.invoke("getNetworkType", {}, () => {
12443
- this._wxTimer = setTimeout(() => {
12684
+ this._wxTimer = window.setTimeout(() => {
12444
12685
  this._wxTimer && clearTimeout(this._wxTimer);
12445
12686
  const ret = this.player.play();
12446
12687
  if (ret && ret.then) {
@@ -12514,8 +12755,8 @@ var __publicField = (obj, key, value) => {
12514
12755
  this._state.showUnmuteBt = true;
12515
12756
  this._state.mode = 1;
12516
12757
  this.renderUnmuteBt();
12517
- this._timer = setTimeout(() => {
12518
- this._timer && clearTimeout(this._timer);
12758
+ this._timer = window.setTimeout(() => {
12759
+ this._timer && window.clearTimeout(this._timer);
12519
12760
  const ret = this.player.play();
12520
12761
  if (ret && ret.then) {
12521
12762
  ret.then(() => {
@@ -13281,7 +13522,7 @@ var __publicField = (obj, key, value) => {
13281
13522
  /**
13282
13523
  * @brief 调用此方法监听指定事件,事件处理函数只执行一次。
13283
13524
  * @param event 表示事件的名称。
13284
- * @param callback 表示事件的名称。
13525
+ * @param callback 表示事件的回调函数。
13285
13526
  */
13286
13527
  once(event, callback) {
13287
13528
  var _a;
@@ -13297,7 +13538,7 @@ var __publicField = (obj, key, value) => {
13297
13538
  /**
13298
13539
  * @brief 调用此方法解绑或移除指定事件的事件监听。
13299
13540
  * @param event 表示事件的名称。
13300
- * @param callback 表示事件的名称。
13541
+ * @param callback 表示事件的回调函数。
13301
13542
  */
13302
13543
  off(event, callback) {
13303
13544
  var _a;
@@ -13326,8 +13567,8 @@ var __publicField = (obj, key, value) => {
13326
13567
  }
13327
13568
  /**
13328
13569
  * @brief 调用此方法监听指定事件。
13329
- * @param event 事件。
13330
- * @param callback 事件回调。
13570
+ * @param event 表示事件名称。
13571
+ * @param callback 表示事件的回调函数。
13331
13572
  */
13332
13573
  on(event, callback) {
13333
13574
  var _a;
@@ -13621,11 +13862,11 @@ var __publicField = (obj, key, value) => {
13621
13862
  });
13622
13863
  }
13623
13864
  if (typeof VePlayer.register !== "undefined") {
13624
- VePlayer.register(DynamicModule.BizVod, {
13865
+ VePlayer.registerPlugin(DynamicModule.BizVod, {
13625
13866
  createVodPlayer
13626
13867
  });
13627
13868
  } else {
13628
- register(DynamicModule.BizVod, {
13869
+ registerPlugin(DynamicModule.BizVod, {
13629
13870
  createVodPlayer
13630
13871
  });
13631
13872
  }