@byteplus/veplayer 2.11.1 → 2.12.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 (35) hide show
  1. package/esm/veplayer.biz.live.development.js +37 -3
  2. package/esm/veplayer.biz.live.production.js +1 -1
  3. package/esm/veplayer.d.ts +6 -2
  4. package/esm/veplayer.development.css +21 -5
  5. package/esm/veplayer.development.js +407 -4
  6. package/esm/veplayer.live.d.ts +6 -2
  7. package/esm/veplayer.live.development.css +21 -5
  8. package/esm/veplayer.live.development.js +407 -4
  9. package/esm/veplayer.live.production.css +1 -1
  10. package/esm/veplayer.live.production.js +3 -3
  11. package/esm/veplayer.production.css +1 -1
  12. package/esm/veplayer.production.js +3 -3
  13. package/esm/veplayer.vod.development.css +21 -5
  14. package/esm/veplayer.vod.development.js +370 -1
  15. package/esm/veplayer.vod.production.css +1 -1
  16. package/esm/veplayer.vod.production.js +3 -3
  17. package/package.json +1 -1
  18. package/umd/veplayer.biz.live.development.js +37 -3
  19. package/umd/veplayer.biz.live.production.js +1 -1
  20. package/umd/veplayer.d.ts +6 -2
  21. package/umd/veplayer.development.css +21 -5
  22. package/umd/veplayer.development.js +407 -4
  23. package/umd/veplayer.live.d.ts +6 -2
  24. package/umd/veplayer.live.development.css +21 -5
  25. package/umd/veplayer.live.development.js +407 -4
  26. package/umd/veplayer.live.production.css +1 -1
  27. package/umd/veplayer.live.production.js +1 -1
  28. package/umd/veplayer.production.css +1 -1
  29. package/umd/veplayer.production.js +1 -1
  30. package/umd/veplayer.vod.development.css +21 -5
  31. package/umd/veplayer.vod.development.js +370 -1
  32. package/umd/veplayer.vod.production.css +1 -1
  33. package/umd/veplayer.vod.production.js +1 -1
  34. package/veplayer.d.ts +6 -2
  35. package/veplayer.live.d.ts +6 -2
package/esm/veplayer.d.ts CHANGED
@@ -5819,6 +5819,7 @@ declare enum LicenseFeature {
5819
5819
  H265 = "h265",
5820
5820
  PRELOAD = "preload",
5821
5821
  RTM = "rtm",
5822
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
5822
5823
  ABR = "abr",
5823
5824
  FLV_LOW_LATENCY = "flvLowLatency"
5824
5825
  }
@@ -6313,7 +6314,8 @@ type ErrorCode = ValueOf<typeof ErrorCode>;
6313
6314
  declare enum LiveLicenseFeature {
6314
6315
  RTM = "rtm",
6315
6316
  ABR = "abr",
6316
- FLV_LOW_LATENCY = "flvLowLatency"
6317
+ FLV_LOW_LATENCY = "flvLowLatency",
6318
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
6317
6319
  }
6318
6320
  /** {zh}
6319
6321
  * @list option
@@ -11034,6 +11036,7 @@ declare namespace live {
11034
11036
  H265 = "h265",
11035
11037
  PRELOAD = "preload",
11036
11038
  RTM = "rtm",
11039
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
11037
11040
  ABR = "abr",
11038
11041
  FLV_LOW_LATENCY = "flvLowLatency"
11039
11042
  }
@@ -11585,7 +11588,8 @@ declare namespace live {
11585
11588
  enum LiveLicenseFeature {
11586
11589
  RTM = "rtm",
11587
11590
  ABR = "abr",
11588
- FLV_LOW_LATENCY = "flvLowLatency"
11591
+ FLV_LOW_LATENCY = "flvLowLatency",
11592
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
11589
11593
  }
11590
11594
  /** {zh}
11591
11595
  * @list option
@@ -659,6 +659,22 @@
659
659
  .xgplayer-pc.xgplayer-is-error .xgplayer-start {
660
660
  display: none;
661
661
  }
662
+ .xgplayer-mobile.xgplayer-mobile-mini-window video,
663
+ .xgplayer-mobile.xgplayer-mobile-mini-window xg-video {
664
+ position: fixed;
665
+ top: 0;
666
+ left: 0;
667
+ z-index: 9999;
668
+ /* stylelint-disable-next-line declaration-no-important */
669
+ width: 100vw !important;
670
+ /* stylelint-disable-next-line declaration-no-important */
671
+ height: 100vh !important;
672
+ }
673
+ .xgplayer-mobile.xgplayer-mobile-mini-window .xgplayer-start {
674
+ position: fixed;
675
+ /* stylelint-disable-next-line declaration-no-important */
676
+ z-index: 10000 !important;
677
+ }
662
678
  .xgplayer-mobile .xgplayer-progress .xgplayer-progress-played {
663
679
  background: #3469ff;
664
680
  }
@@ -701,15 +717,15 @@
701
717
  display: none;
702
718
  }
703
719
  .veplayer-logo {
704
- display: none;
705
720
  position: absolute;
706
- visibility: visible;
721
+ top: 20px;
722
+ right: 20px;
723
+ z-index: 10;
724
+ display: none;
707
725
  width: 70px;
708
726
  height: 20px;
709
- right: 20px;
710
- top: 20px;
727
+ visibility: visible;
711
728
  opacity: 1;
712
- z-index: 10;
713
729
  }
714
730
  .veplayer-logo svg {
715
731
  width: 100%;
@@ -14337,6 +14337,373 @@ class CustomMedia {
14337
14337
  replaceAttributes(this._el, this._videoAttributes);
14338
14338
  }
14339
14339
  }
14340
+ var Web2NativeMessageEvent = /* @__PURE__ */ ((Web2NativeMessageEvent2) => {
14341
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["INIT_FINISH"] = 10001] = "INIT_FINISH";
14342
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["CREATE_PLAYER"] = 11e3] = "CREATE_PLAYER";
14343
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["DESTROY_PLAYER"] = 11001] = "DESTROY_PLAYER";
14344
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["OPEN_FULLSCREEN"] = 11002] = "OPEN_FULLSCREEN";
14345
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["EXIT_FULLSCREEN"] = 11003] = "EXIT_FULLSCREEN";
14346
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["LIVE_ROOM_STATE_CHANGE"] = 11004] = "LIVE_ROOM_STATE_CHANGE";
14347
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["PLAYER_STATE_CHANGE"] = 11005] = "PLAYER_STATE_CHANGE";
14348
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["MEDIA_LOAD_FINISH"] = 11006] = "MEDIA_LOAD_FINISH";
14349
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["OPEN_MINI_WINDOW"] = 11007] = "OPEN_MINI_WINDOW";
14350
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["CLOSE_MINI_WINDOW"] = 11008] = "CLOSE_MINI_WINDOW";
14351
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["OPEN_WAKE_LOCK"] = 11009] = "OPEN_WAKE_LOCK";
14352
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["EXIT_WAKE_LOCK"] = 110010] = "EXIT_WAKE_LOCK";
14353
+ Web2NativeMessageEvent2[Web2NativeMessageEvent2["PUSH_WEB_DATA_INFO"] = 110011] = "PUSH_WEB_DATA_INFO";
14354
+ return Web2NativeMessageEvent2;
14355
+ })(Web2NativeMessageEvent || {});
14356
+ var Native2WebMessageEvent = /* @__PURE__ */ ((Native2WebMessageEvent2) => {
14357
+ Native2WebMessageEvent2[Native2WebMessageEvent2["ENTER_MINI_WINDOW"] = 21e3] = "ENTER_MINI_WINDOW";
14358
+ Native2WebMessageEvent2[Native2WebMessageEvent2["EXIT_MINI_WINDOW"] = 21001] = "EXIT_MINI_WINDOW";
14359
+ Native2WebMessageEvent2[Native2WebMessageEvent2["PAUSE"] = 21002] = "PAUSE";
14360
+ Native2WebMessageEvent2[Native2WebMessageEvent2["START_PLAY"] = 21003] = "START_PLAY";
14361
+ Native2WebMessageEvent2[Native2WebMessageEvent2["PLAY"] = 21004] = "PLAY";
14362
+ Native2WebMessageEvent2[Native2WebMessageEvent2["WEBVIEW_CONFIG"] = 21005] = "WEBVIEW_CONFIG";
14363
+ Native2WebMessageEvent2[Native2WebMessageEvent2["GET_WEB_DATA_INFO"] = 21006] = "GET_WEB_DATA_INFO";
14364
+ Native2WebMessageEvent2[Native2WebMessageEvent2["ENTER_FULLSCREEN"] = 21007] = "ENTER_FULLSCREEN";
14365
+ Native2WebMessageEvent2[Native2WebMessageEvent2["EXIT_FULLSCREEN"] = 21008] = "EXIT_FULLSCREEN";
14366
+ return Native2WebMessageEvent2;
14367
+ })(Native2WebMessageEvent || {});
14368
+ class ByteLiveJsBridge {
14369
+ constructor(data2) {
14370
+ __publicField(this, "_emitter", new EventEmitter$1());
14371
+ __publicField(this, "isInIOS", false);
14372
+ __publicField(this, "jsBridgeName", "ByteLiveJsBridge");
14373
+ __publicField(this, "jsBridge", null);
14374
+ __publicField(this, "data", {
14375
+ room: {},
14376
+ player: {}
14377
+ });
14378
+ // eslint-disable-next-line @typescript-eslint/member-ordering
14379
+ __publicField(this, "nativeConfig", {});
14380
+ if (data2 == null ? void 0 : data2.name) {
14381
+ this.jsBridgeName = data2.name;
14382
+ }
14383
+ this.init();
14384
+ }
14385
+ init() {
14386
+ this.initVariables();
14387
+ if (!this.jsBridge) {
14388
+ this.mountGlobal();
14389
+ }
14390
+ this.callToNative(Web2NativeMessageEvent.INIT_FINISH, {});
14391
+ }
14392
+ getJsBridge() {
14393
+ const jsBridge = Reflect.get(window, this.jsBridgeName);
14394
+ if (jsBridge) {
14395
+ this.jsBridge = jsBridge;
14396
+ }
14397
+ return this.jsBridge;
14398
+ }
14399
+ setJsBridge(jsBridge) {
14400
+ Reflect.set(window, this.jsBridgeName, jsBridge);
14401
+ Reflect.set(window, "VeCloudJsBridge", jsBridge);
14402
+ console.log("设置到 window 上");
14403
+ this.jsBridge = jsBridge;
14404
+ }
14405
+ initVariables() {
14406
+ this.isInIOS = Boolean(sniffer$1.os.isIos);
14407
+ }
14408
+ mountGlobal() {
14409
+ const JsBridge = this.getJsBridge();
14410
+ console.log("从 window 上获取到的 jsBridge", JsBridge);
14411
+ if (JsBridge) {
14412
+ JsBridge.nativeCallBack = (data2) => {
14413
+ console.log("收到native发来消息", data2);
14414
+ this.handelEventCallBack(data2);
14415
+ };
14416
+ this.jsBridge = JsBridge;
14417
+ } else {
14418
+ const JsBridge2 = {
14419
+ nativeCallBack: (data2) => {
14420
+ console.log("收到native发来消息", data2);
14421
+ this.handelEventCallBack(data2);
14422
+ }
14423
+ // invokeNative: (data: IMessage) => {
14424
+ // console.log('发送给native', data);
14425
+ // },
14426
+ };
14427
+ this.setJsBridge(JsBridge2);
14428
+ }
14429
+ this.bindWebDataInfo();
14430
+ this.bindGetNativeConfig();
14431
+ }
14432
+ on(action, func) {
14433
+ this._emitter.on(action, func);
14434
+ }
14435
+ handelEventCallBack(data2) {
14436
+ const { eventKey, info } = data2 ?? {};
14437
+ if (!eventKey || !Native2WebMessageEvent[eventKey]) {
14438
+ console.log("Native2Web未匹配到对应事件", eventKey);
14439
+ return;
14440
+ }
14441
+ this._emitter.emit(Native2WebMessageEvent[eventKey], info);
14442
+ }
14443
+ invokeNative(data2) {
14444
+ var _a, _b, _c;
14445
+ console.log("发送给native", data2);
14446
+ if (this.isInIOS) {
14447
+ (_c = (_b = (_a = window == null ? void 0 : window.webkit) == null ? void 0 : _a.messageHandlers) == null ? void 0 : _b.invokeNative) == null ? void 0 : _c.postMessage(data2);
14448
+ }
14449
+ const JsBridge = this.jsBridge || Reflect.get(window, this.jsBridgeName);
14450
+ console.log(
14451
+ "JsBridge",
14452
+ this.jsBridge,
14453
+ Reflect.get(window, this.jsBridgeName)
14454
+ );
14455
+ if (JsBridge.invokeNative) {
14456
+ JsBridge.invokeNative(JSON.stringify(data2));
14457
+ } else {
14458
+ console.log("未找到对应invokeNative方法");
14459
+ }
14460
+ }
14461
+ bindWebDataInfo() {
14462
+ this.on("GET_WEB_DATA_INFO", () => {
14463
+ this.callToNative(Web2NativeMessageEvent.PUSH_WEB_DATA_INFO, {
14464
+ ...this.data
14465
+ });
14466
+ });
14467
+ }
14468
+ bindGetNativeConfig() {
14469
+ this.on("WEBVIEW_CONFIG", (data2) => {
14470
+ this.nativeConfig = {
14471
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14472
+ // @ts-ignore
14473
+ ...this.nativeConfig,
14474
+ ...data2
14475
+ };
14476
+ });
14477
+ }
14478
+ callToNative(eventKey, info) {
14479
+ if (!eventKey || !Web2NativeMessageEvent[eventKey]) {
14480
+ console.log("Web2Native未匹配到对应事件", eventKey);
14481
+ return;
14482
+ }
14483
+ this.invokeNative({ eventKey, info });
14484
+ }
14485
+ callToNativeCreatePlayer(data2) {
14486
+ this.data.room = {
14487
+ ...this.data.room,
14488
+ isPortrait: data2.isPortrait
14489
+ };
14490
+ this.callToNative(Web2NativeMessageEvent.CREATE_PLAYER, data2);
14491
+ }
14492
+ callToNativeDestroyPlayer() {
14493
+ this.callToNative(Web2NativeMessageEvent.DESTROY_PLAYER, {});
14494
+ }
14495
+ callToNativeOpenFullScreen() {
14496
+ this.data.player = {
14497
+ ...this.data.player,
14498
+ fullscreen: true
14499
+ };
14500
+ this.callToNative(Web2NativeMessageEvent.OPEN_FULLSCREEN, {});
14501
+ }
14502
+ callToNativeExitFullScreen() {
14503
+ this.data.player = {
14504
+ ...this.data.player,
14505
+ fullscreen: false
14506
+ };
14507
+ this.callToNative(Web2NativeMessageEvent.EXIT_FULLSCREEN, {});
14508
+ }
14509
+ callToNativeLiveRoomStateChange(data2) {
14510
+ this.data.room = {
14511
+ ...this.data.room,
14512
+ status: data2.status
14513
+ };
14514
+ this.callToNative(Web2NativeMessageEvent.LIVE_ROOM_STATE_CHANGE, data2);
14515
+ }
14516
+ callToNativePlayerStateChange(data2) {
14517
+ this.data.player = {
14518
+ ...this.data.player,
14519
+ created: data2.created,
14520
+ paused: data2.paused
14521
+ };
14522
+ this.callToNative(Web2NativeMessageEvent.PLAYER_STATE_CHANGE, data2);
14523
+ }
14524
+ callToNativeMediaLoadFinish(data2) {
14525
+ this.data.player = {
14526
+ ...this.data.player,
14527
+ videoWidth: data2.videoWidth,
14528
+ videoHeight: data2.videoHeight
14529
+ };
14530
+ this.callToNative(Web2NativeMessageEvent.MEDIA_LOAD_FINISH, data2);
14531
+ }
14532
+ callToNativeOpenMiniWindow() {
14533
+ this.data.player = {
14534
+ ...this.data.player,
14535
+ mini: true
14536
+ };
14537
+ this.callToNative(Web2NativeMessageEvent.OPEN_MINI_WINDOW, {});
14538
+ }
14539
+ callToNativeCloseMiniWindow() {
14540
+ this.data.player = {
14541
+ ...this.data.player,
14542
+ mini: false
14543
+ };
14544
+ console.log("通知Native关闭小窗", /* @__PURE__ */ new Date());
14545
+ this.callToNative(Web2NativeMessageEvent.CLOSE_MINI_WINDOW, {});
14546
+ }
14547
+ callToNativeOpenWakeLock() {
14548
+ this.callToNative(Web2NativeMessageEvent.OPEN_WAKE_LOCK, {});
14549
+ }
14550
+ callToNativeExitWakeLock() {
14551
+ this.callToNative(Web2NativeMessageEvent.EXIT_WAKE_LOCK, {});
14552
+ }
14553
+ }
14554
+ let InnerJsBridge;
14555
+ const getJsbInstance = () => {
14556
+ if (InnerJsBridge)
14557
+ return InnerJsBridge;
14558
+ InnerJsBridge = new ByteLiveJsBridge();
14559
+ return InnerJsBridge;
14560
+ };
14561
+ var InnerJsBridge$1 = getJsbInstance();
14562
+ const bindPlayerEventsCallJSB = (player) => {
14563
+ const isPortrait = true;
14564
+ const isLive = true;
14565
+ if (!InnerJsBridge$1) {
14566
+ return;
14567
+ }
14568
+ if (!sniffer$1.os.isPc) {
14569
+ bindMiniWindowEvents(player);
14570
+ }
14571
+ InnerJsBridge$1.callToNativeCreatePlayer({
14572
+ isLive,
14573
+ isPortrait
14574
+ });
14575
+ InnerJsBridge$1.callToNativePlayerStateChange({
14576
+ created: true,
14577
+ paused: false
14578
+ });
14579
+ player.on(Events$2.PLAY, () => {
14580
+ InnerJsBridge$1 == null ? void 0 : InnerJsBridge$1.callToNativePlayerStateChange({
14581
+ created: true,
14582
+ paused: false
14583
+ });
14584
+ });
14585
+ player.on(Events$2.PAUSE, () => {
14586
+ InnerJsBridge$1 == null ? void 0 : InnerJsBridge$1.callToNativePlayerStateChange({
14587
+ created: true,
14588
+ paused: true
14589
+ });
14590
+ });
14591
+ player.on(Events$2.ERROR, () => {
14592
+ existMiniWindow();
14593
+ });
14594
+ player.on(Events$2.LOADED_DATA, () => {
14595
+ getVideoSizeWithRetry(player, isPortrait).then(
14596
+ ({ videoWidth, videoHeight }) => {
14597
+ InnerJsBridge$1 == null ? void 0 : InnerJsBridge$1.callToNativeMediaLoadFinish({
14598
+ isPortrait: videoHeight > videoWidth,
14599
+ videoWidth,
14600
+ videoHeight
14601
+ });
14602
+ }
14603
+ );
14604
+ });
14605
+ };
14606
+ const destroyPlayerEventsCallJSB = () => {
14607
+ if (InnerJsBridge$1) {
14608
+ InnerJsBridge$1.callToNativeDestroyPlayer();
14609
+ InnerJsBridge$1.callToNativePlayerStateChange({
14610
+ created: false,
14611
+ paused: true
14612
+ });
14613
+ }
14614
+ existMiniWindow();
14615
+ };
14616
+ const bindMiniWindowEvents = (player) => {
14617
+ if (!InnerJsBridge$1) {
14618
+ return;
14619
+ }
14620
+ const handleMiniWindowChange = (state) => {
14621
+ if (!player || !player.root) {
14622
+ return;
14623
+ }
14624
+ if (state) {
14625
+ player.addClass("xgplayer-mobile-mini-window");
14626
+ } else {
14627
+ player.removeClass("xgplayer-mobile-mini-window");
14628
+ }
14629
+ };
14630
+ InnerJsBridge$1.on("WEBVIEW_CONFIG", (data2) => {
14631
+ console.log("WEBVIEW_CONFIG", data2);
14632
+ if (data2 == null ? void 0 : data2.keepPlayWhenPageHide) {
14633
+ player.unRegisterPlugin("PageChangePlugin");
14634
+ }
14635
+ });
14636
+ InnerJsBridge$1.on("ENTER_MINI_WINDOW", () => {
14637
+ handleMiniWindowChange(true);
14638
+ });
14639
+ InnerJsBridge$1.on("EXIT_MINI_WINDOW", () => {
14640
+ console.log("切回小窗播放器处于暂停: ", player.paused, /* @__PURE__ */ new Date());
14641
+ if (player.paused) {
14642
+ player.play();
14643
+ }
14644
+ handleMiniWindowChange(false);
14645
+ });
14646
+ InnerJsBridge$1.on("PAUSE", () => {
14647
+ if (!player) {
14648
+ return;
14649
+ }
14650
+ player.pause();
14651
+ });
14652
+ InnerJsBridge$1.on("START_PLAY", () => {
14653
+ handleMiniWindowChange(false);
14654
+ if (!player) {
14655
+ return;
14656
+ }
14657
+ player.play();
14658
+ });
14659
+ InnerJsBridge$1.on("PLAY", () => {
14660
+ if (!player) {
14661
+ return;
14662
+ }
14663
+ player.play();
14664
+ });
14665
+ InnerJsBridge$1.on("ENTER_FULLSCREEN", () => {
14666
+ var _a;
14667
+ if (!(player == null ? void 0 : player.fullscreen)) {
14668
+ (_a = player.getPlugin("fullscreen")) == null ? void 0 : _a.toggleFullScreen();
14669
+ }
14670
+ });
14671
+ InnerJsBridge$1.on("EXIT_FULLSCREEN", () => {
14672
+ var _a;
14673
+ if (player == null ? void 0 : player.fullscreen) {
14674
+ (_a = player.getPlugin("fullscreen")) == null ? void 0 : _a.toggleFullScreen();
14675
+ }
14676
+ });
14677
+ };
14678
+ const existMiniWindow = () => {
14679
+ InnerJsBridge$1 && (InnerJsBridge$1 == null ? void 0 : InnerJsBridge$1.callToNativeCloseMiniWindow());
14680
+ };
14681
+ const getVideoSizeWithRetry = (player, isPortrait) => {
14682
+ const retryGetVideoSize = (retryCount = 0) => {
14683
+ return new Promise((resolve) => {
14684
+ let { videoWidth, videoHeight } = player.video;
14685
+ if (videoWidth > 0 && videoHeight > 0) {
14686
+ resolve({ videoWidth, videoHeight });
14687
+ return;
14688
+ }
14689
+ if (retryCount < 15) {
14690
+ setTimeout(() => {
14691
+ retryGetVideoSize(retryCount + 1).then(resolve);
14692
+ }, 500);
14693
+ return;
14694
+ }
14695
+ if (isPortrait) {
14696
+ videoWidth = 1080;
14697
+ videoHeight = 1920;
14698
+ } else {
14699
+ videoWidth = 1920;
14700
+ videoHeight = 1080;
14701
+ }
14702
+ resolve({ videoWidth, videoHeight });
14703
+ });
14704
+ };
14705
+ return retryGetVideoSize();
14706
+ };
14340
14707
  const { POSITIONS: XGPosition } = Plugin;
14341
14708
  const POSITIONS$1 = {
14342
14709
  ...XGPosition,
@@ -14451,6 +14818,7 @@ class VePlayerBase {
14451
14818
  this.emit(Events$2.PLAYER_CREATE_FINISH, this._player);
14452
14819
  this._errorCallback = (err) => this._handleFallback(err);
14453
14820
  this._player.on(ERROR, this._errorCallback);
14821
+ bindPlayerEventsCallJSB(this._player);
14454
14822
  }
14455
14823
  /** {zh}
14456
14824
  * @brief 获取视频的就绪状态,其状态枚举值、枚举名称和说明如下:
@@ -14616,7 +14984,7 @@ class VePlayerBase {
14616
14984
  * @brief Retrieve the player SDK version number.
14617
14985
  */
14618
14986
  get playerVersion() {
14619
- return "2.11.1";
14987
+ return "2.12.0-rc.0";
14620
14988
  }
14621
14989
  /** {zh}
14622
14990
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -15121,6 +15489,7 @@ class VePlayerBase {
15121
15489
  */
15122
15490
  destroy() {
15123
15491
  var _a;
15492
+ destroyPlayerEventsCallJSB();
15124
15493
  this._player.off(ERROR, this._errorCallback);
15125
15494
  this._player.destroy();
15126
15495
  (_a = this._customMedia) == null ? void 0 : _a.destroy();
@@ -31060,6 +31429,7 @@ var LicenseFeature = /* @__PURE__ */ ((LicenseFeature2) => {
31060
31429
  LicenseFeature2["H265"] = "h265";
31061
31430
  LicenseFeature2["PRELOAD"] = "preload";
31062
31431
  LicenseFeature2["RTM"] = "rtm";
31432
+ LicenseFeature2["RTM_ADAPTIVE_BUFFER"] = "rtmAdaptiveBuffer";
31063
31433
  LicenseFeature2["ABR"] = "abr";
31064
31434
  LicenseFeature2["FLV_LOW_LATENCY"] = "flvLowLatency";
31065
31435
  return LicenseFeature2;
@@ -56475,7 +56845,7 @@ let Logger$1 = class Logger2 extends Plugin {
56475
56845
  device_id: deviceId,
56476
56846
  error_report_stop: true,
56477
56847
  ext: {
56478
- veplayer_version: "2.11.1",
56848
+ veplayer_version: "2.12.0-rc.0",
56479
56849
  flv_version: "3.0.23-rc.6",
56480
56850
  hls_version: "3.0.21-rc.21",
56481
56851
  rts_version: "0.2.1-alpha.57"
@@ -62010,6 +62380,19 @@ const LicenseWarningMap = {
62010
62380
  code: ErrorCode.LICENSE_EXPIRED_RTM
62011
62381
  }
62012
62382
  },
62383
+ [
62384
+ "rtmAdaptiveBuffer"
62385
+ /* RTM_ADAPTIVE_BUFFER */
62386
+ ]: {
62387
+ BASE_LICENSE_NOT_SUPPORT: {
62388
+ type: "BASE_LICENSE_NOT_SUPPORT",
62389
+ feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
62390
+ },
62391
+ LICENSE_EXPIRED: {
62392
+ type: "LICENSE_EXPIRED",
62393
+ feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
62394
+ }
62395
+ },
62013
62396
  [LicenseFeature.PRELOAD]: {
62014
62397
  BASE_LICENSE_NOT_SUPPORT: {
62015
62398
  type: "BASE_LICENSE_NOT_SUPPORT",
@@ -62041,6 +62424,16 @@ const LicenseWarningMap = {
62041
62424
  }
62042
62425
  }
62043
62426
  };
62427
+ const premiumFeatureList = (
62428
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62429
+ // @ts-ignore
62430
+ [
62431
+ LicenseFeature.RTM,
62432
+ LicenseFeature.RTM_ADAPTIVE_BUFFER,
62433
+ LicenseFeature.ABR,
62434
+ LicenseFeature.FLV_LOW_LATENCY
62435
+ ]
62436
+ );
62044
62437
  class LicenseEventEmitter {
62045
62438
  constructor() {
62046
62439
  __publicField(this, "player");
@@ -62111,6 +62504,9 @@ class LiveLicenseManager {
62111
62504
  // 验证 License 是否支持该 feature
62112
62505
  checkLiveLicenseFeature(feature) {
62113
62506
  var _a, _b;
62507
+ if (!premiumFeatureList.includes(feature)) {
62508
+ return;
62509
+ }
62114
62510
  const result = licenseManager.licenseSupportModuleList.includes(feature);
62115
62511
  if (!result) {
62116
62512
  if (this.licenseCheckResult === LicenseEdition.EDITION_STANDARD) {
@@ -62638,7 +63034,7 @@ class RtmProtocol extends BaseProtocol {
62638
63034
  return LiveUrlType.Rtm;
62639
63035
  }
62640
63036
  get defaultFallbackStrategy() {
62641
- return { [FallbackKind.Error]: { shouldFallback: () => true } };
63037
+ return { [FallbackKind.Error]: { excludeList: [2104, 2103, 2101, 2100] } };
62642
63038
  }
62643
63039
  static canGenerateOtherProtocol(options) {
62644
63040
  var _a;
@@ -62681,10 +63077,17 @@ class RtmProtocol extends BaseProtocol {
62681
63077
  i18n,
62682
63078
  enableSelector
62683
63079
  }) {
63080
+ var _a;
62684
63081
  const licenseRtmNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(LicenseFeature.RTM);
62685
63082
  if (licenseRtmNotSupportedError == null ? void 0 : licenseRtmNotSupportedError.code) {
62686
63083
  throw create(licenseRtmNotSupportedError.code, i18n);
62687
63084
  }
63085
+ const licenseRtmAdaptiveBufferNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(
63086
+ LicenseFeature.RTM_ADAPTIVE_BUFFER
63087
+ );
63088
+ if (licenseRtmAdaptiveBufferNotSupportedError && ((_a = options.rtm) == null ? void 0 : _a.enableAdaptiveJitterBuffer)) {
63089
+ options.rtm.enableAdaptiveJitterBuffer = false;
63090
+ }
62688
63091
  this.protocolStrategy = await getRtmStrategy(
62689
63092
  enableSelector ? {
62690
63093
  options,
@@ -74147,7 +74550,7 @@ async function prepare(options) {
74147
74550
  }
74148
74551
  await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
74149
74552
  ...options,
74150
- playerVersion: "2.11.1",
74553
+ playerVersion: "2.12.0-rc.0",
74151
74554
  type: "LIVE"
74152
74555
  }));
74153
74556
  return liveVeStrategy.veStrategyManager;
@@ -5819,6 +5819,7 @@ declare enum LicenseFeature {
5819
5819
  H265 = "h265",
5820
5820
  PRELOAD = "preload",
5821
5821
  RTM = "rtm",
5822
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
5822
5823
  ABR = "abr",
5823
5824
  FLV_LOW_LATENCY = "flvLowLatency"
5824
5825
  }
@@ -6313,7 +6314,8 @@ type ErrorCode = ValueOf<typeof ErrorCode>;
6313
6314
  declare enum LiveLicenseFeature {
6314
6315
  RTM = "rtm",
6315
6316
  ABR = "abr",
6316
- FLV_LOW_LATENCY = "flvLowLatency"
6317
+ FLV_LOW_LATENCY = "flvLowLatency",
6318
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
6317
6319
  }
6318
6320
  /** {zh}
6319
6321
  * @list option
@@ -11034,6 +11036,7 @@ declare namespace live {
11034
11036
  H265 = "h265",
11035
11037
  PRELOAD = "preload",
11036
11038
  RTM = "rtm",
11039
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
11037
11040
  ABR = "abr",
11038
11041
  FLV_LOW_LATENCY = "flvLowLatency"
11039
11042
  }
@@ -11585,7 +11588,8 @@ declare namespace live {
11585
11588
  enum LiveLicenseFeature {
11586
11589
  RTM = "rtm",
11587
11590
  ABR = "abr",
11588
- FLV_LOW_LATENCY = "flvLowLatency"
11591
+ FLV_LOW_LATENCY = "flvLowLatency",
11592
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
11589
11593
  }
11590
11594
  /** {zh}
11591
11595
  * @list option
@@ -659,6 +659,22 @@
659
659
  .xgplayer-pc.xgplayer-is-error .xgplayer-start {
660
660
  display: none;
661
661
  }
662
+ .xgplayer-mobile.xgplayer-mobile-mini-window video,
663
+ .xgplayer-mobile.xgplayer-mobile-mini-window xg-video {
664
+ position: fixed;
665
+ top: 0;
666
+ left: 0;
667
+ z-index: 9999;
668
+ /* stylelint-disable-next-line declaration-no-important */
669
+ width: 100vw !important;
670
+ /* stylelint-disable-next-line declaration-no-important */
671
+ height: 100vh !important;
672
+ }
673
+ .xgplayer-mobile.xgplayer-mobile-mini-window .xgplayer-start {
674
+ position: fixed;
675
+ /* stylelint-disable-next-line declaration-no-important */
676
+ z-index: 10000 !important;
677
+ }
662
678
  .xgplayer-mobile .xgplayer-progress .xgplayer-progress-played {
663
679
  background: #3469ff;
664
680
  }
@@ -701,15 +717,15 @@
701
717
  display: none;
702
718
  }
703
719
  .veplayer-logo {
704
- display: none;
705
720
  position: absolute;
706
- visibility: visible;
721
+ top: 20px;
722
+ right: 20px;
723
+ z-index: 10;
724
+ display: none;
707
725
  width: 70px;
708
726
  height: 20px;
709
- right: 20px;
710
- top: 20px;
727
+ visibility: visible;
711
728
  opacity: 1;
712
- z-index: 10;
713
729
  }
714
730
  .veplayer-logo svg {
715
731
  width: 100%;