@byteplus/react-native-live-pull 1.1.2-rc.0 → 1.1.2-rc.2

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.
@@ -4565,6 +4565,7 @@ var TVLManager = function () {
4565
4565
  var _enableAudioFrameObserver_decorators;
4566
4566
  var _setEnableSuperResolution_decorators;
4567
4567
  var _setVolume_decorators;
4568
+ var _setEnableIgnoreAudioInterruption_decorators;
4568
4569
  _classThis = /** @class */ (function () {
4569
4570
  function TVLManager_1() {
4570
4571
  /** {zh}
@@ -4872,6 +4873,9 @@ var TVLManager = function () {
4872
4873
  TVLManager_1.prototype.setVolume = function (volume) {
4873
4874
  throw new Error('not implement');
4874
4875
  };
4876
+ TVLManager_1.prototype.setEnableIgnoreAudioInterruption = function (enable) {
4877
+ throw new Error('not implement');
4878
+ };
4875
4879
  return TVLManager_1;
4876
4880
  }());
4877
4881
  __setFunctionName(_classThis, "TVLManager");
@@ -4907,6 +4911,7 @@ var TVLManager = function () {
4907
4911
  _enableAudioFrameObserver_decorators = [NativeMethodSync('enableAudioFrameObserver:enableRendering:')];
4908
4912
  _setEnableSuperResolution_decorators = [NativeMethodSync('setEnableSuperResolution:')];
4909
4913
  _setVolume_decorators = [NativeMethodSync('setVolume:')];
4914
+ _setEnableIgnoreAudioInterruption_decorators = [NativeMethodSync('setEnableIgnoreAudioInterruption:')];
4910
4915
  __esDecorate(_classThis, null, _static_setLogLevel_decorators, { kind: "method", name: "setLogLevel", static: true, private: false, access: { has: function (obj) { return "setLogLevel" in obj; }, get: function (obj) { return obj.setLogLevel; } }, metadata: _metadata }, null, _staticExtraInitializers);
4911
4916
  __esDecorate(_classThis, null, _static_getVersion_decorators, { kind: "method", name: "getVersion", static: true, private: false, access: { has: function (obj) { return "getVersion" in obj; }, get: function (obj) { return obj.getVersion; } }, metadata: _metadata }, null, _staticExtraInitializers);
4912
4917
  __esDecorate(_classThis, null, _static_setHttpDNSHostIP_decorators, { kind: "method", name: "setHttpDNSHostIP", static: true, private: false, access: { has: function (obj) { return "setHttpDNSHostIP" in obj; }, get: function (obj) { return obj.setHttpDNSHostIP; } }, metadata: _metadata }, null, _staticExtraInitializers);
@@ -4933,6 +4938,7 @@ var TVLManager = function () {
4933
4938
  __esDecorate(_classThis, null, _enableAudioFrameObserver_decorators, { kind: "method", name: "enableAudioFrameObserver", static: false, private: false, access: { has: function (obj) { return "enableAudioFrameObserver" in obj; }, get: function (obj) { return obj.enableAudioFrameObserver; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4934
4939
  __esDecorate(_classThis, null, _setEnableSuperResolution_decorators, { kind: "method", name: "setEnableSuperResolution", static: false, private: false, access: { has: function (obj) { return "setEnableSuperResolution" in obj; }, get: function (obj) { return obj.setEnableSuperResolution; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4935
4940
  __esDecorate(_classThis, null, _setVolume_decorators, { kind: "method", name: "setVolume", static: false, private: false, access: { has: function (obj) { return "setVolume" in obj; }, get: function (obj) { return obj.setVolume; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4941
+ __esDecorate(_classThis, null, _setEnableIgnoreAudioInterruption_decorators, { kind: "method", name: "setEnableIgnoreAudioInterruption", static: false, private: false, access: { has: function (obj) { return "setEnableIgnoreAudioInterruption" in obj; }, get: function (obj) { return obj.setEnableIgnoreAudioInterruption; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4936
4942
  __esDecorate(null, null, _observer_decorators, { kind: "field", name: "observer", static: false, private: false, access: { has: function (obj) { return "observer" in obj; }, get: function (obj) { return obj.observer; }, set: function (obj, value) { obj.observer = value; } }, metadata: _metadata }, _observer_initializers, _observer_extraInitializers);
4937
4943
  __esDecorate(null, null, _playerView_decorators, { kind: "field", name: "playerView", static: false, private: false, access: { has: function (obj) { return "playerView" in obj; }, get: function (obj) { return obj.playerView; }, set: function (obj, value) { obj.playerView = value; } }, metadata: _metadata }, _playerView_initializers, _playerView_extraInitializers);
4938
4944
  __esDecorate(null, null, _volume_decorators, { kind: "field", name: "volume", static: false, private: false, access: { has: function (obj) { return "volume" in obj; }, get: function (obj) { return obj.volume; }, set: function (obj, value) { obj.volume = value; } }, metadata: _metadata }, _volume_initializers, _volume_extraInitializers);
@@ -11384,6 +11390,13 @@ extendsClassMethod(VeLivePlayer, 'destroy', function (origin) {
11384
11390
  }); });
11385
11391
  };
11386
11392
  });
11393
+ extendsClassMethod(VeLivePlayer, 'setEnableIgnoreAudioInterruption', function () {
11394
+ return function setEnableIgnoreAudioInterruption(enable) {
11395
+ return runImpl(this, function () { }, function (engine) {
11396
+ engine.setEnableIgnoreAudioInterruption(enable);
11397
+ });
11398
+ };
11399
+ });
11387
11400
 
11388
11401
  extendsClassMethod(android_VeLivePlayerObserver, 'onVideoSizeChanged', function (original) {
11389
11402
  return function onVideoSizeChanged(player, width, height) {
@@ -11641,23 +11654,24 @@ function initAndroidPlayer(options) {
11641
11654
  }
11642
11655
  function initIOSPlayer(options) {
11643
11656
  return __awaiter(this, void 0, void 0, function () {
11644
- var viewId, option, player, config, uiView, multiObserver, manager;
11657
+ var viewId, option, iosPlayer, player, config, uiView, multiObserver, manager;
11645
11658
  return __generator(this, function (_a) {
11646
11659
  switch (_a.label) {
11647
11660
  case 0:
11648
11661
  viewId = options.viewId, option = __rest(options, ["viewId"]);
11649
- player = new VeLivePlayer({});
11662
+ iosPlayer = new TVLManager();
11663
+ player = packObject(iosPlayer, VeLivePlayer);
11650
11664
  config = new VeLivePlayerConfiguration();
11651
11665
  Object.assign(config, defaultConfig, option);
11652
11666
  player.setConfig(config);
11653
11667
  uiView = NativeView.getView(viewId, NativeUIView);
11654
- return [4 /*yield*/, uiView.insertSubview(player.ios_playerView, 0)];
11668
+ return [4 /*yield*/, uiView.insertSubview(iosPlayer.playerView, 0)];
11655
11669
  case 1:
11656
11670
  _a.sent();
11657
11671
  multiObserver = VeLivePlayerMultiObserver.getInstance();
11658
- multiObserver.setupPlayer(unpackObject(player));
11672
+ multiObserver.setupPlayer(iosPlayer);
11659
11673
  manager = VeLivePictureInPictureManager.getInstance();
11660
- manager.setupPlayer(unpackObject(player));
11674
+ manager.setupPlayer(iosPlayer);
11661
11675
  return [2 /*return*/, player];
11662
11676
  }
11663
11677
  });
@@ -4563,6 +4563,7 @@ var TVLManager = function () {
4563
4563
  var _enableAudioFrameObserver_decorators;
4564
4564
  var _setEnableSuperResolution_decorators;
4565
4565
  var _setVolume_decorators;
4566
+ var _setEnableIgnoreAudioInterruption_decorators;
4566
4567
  _classThis = /** @class */ (function () {
4567
4568
  function TVLManager_1() {
4568
4569
  /** {zh}
@@ -4870,6 +4871,9 @@ var TVLManager = function () {
4870
4871
  TVLManager_1.prototype.setVolume = function (volume) {
4871
4872
  throw new Error('not implement');
4872
4873
  };
4874
+ TVLManager_1.prototype.setEnableIgnoreAudioInterruption = function (enable) {
4875
+ throw new Error('not implement');
4876
+ };
4873
4877
  return TVLManager_1;
4874
4878
  }());
4875
4879
  __setFunctionName(_classThis, "TVLManager");
@@ -4905,6 +4909,7 @@ var TVLManager = function () {
4905
4909
  _enableAudioFrameObserver_decorators = [NativeMethodSync('enableAudioFrameObserver:enableRendering:')];
4906
4910
  _setEnableSuperResolution_decorators = [NativeMethodSync('setEnableSuperResolution:')];
4907
4911
  _setVolume_decorators = [NativeMethodSync('setVolume:')];
4912
+ _setEnableIgnoreAudioInterruption_decorators = [NativeMethodSync('setEnableIgnoreAudioInterruption:')];
4908
4913
  __esDecorate(_classThis, null, _static_setLogLevel_decorators, { kind: "method", name: "setLogLevel", static: true, private: false, access: { has: function (obj) { return "setLogLevel" in obj; }, get: function (obj) { return obj.setLogLevel; } }, metadata: _metadata }, null, _staticExtraInitializers);
4909
4914
  __esDecorate(_classThis, null, _static_getVersion_decorators, { kind: "method", name: "getVersion", static: true, private: false, access: { has: function (obj) { return "getVersion" in obj; }, get: function (obj) { return obj.getVersion; } }, metadata: _metadata }, null, _staticExtraInitializers);
4910
4915
  __esDecorate(_classThis, null, _static_setHttpDNSHostIP_decorators, { kind: "method", name: "setHttpDNSHostIP", static: true, private: false, access: { has: function (obj) { return "setHttpDNSHostIP" in obj; }, get: function (obj) { return obj.setHttpDNSHostIP; } }, metadata: _metadata }, null, _staticExtraInitializers);
@@ -4931,6 +4936,7 @@ var TVLManager = function () {
4931
4936
  __esDecorate(_classThis, null, _enableAudioFrameObserver_decorators, { kind: "method", name: "enableAudioFrameObserver", static: false, private: false, access: { has: function (obj) { return "enableAudioFrameObserver" in obj; }, get: function (obj) { return obj.enableAudioFrameObserver; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4932
4937
  __esDecorate(_classThis, null, _setEnableSuperResolution_decorators, { kind: "method", name: "setEnableSuperResolution", static: false, private: false, access: { has: function (obj) { return "setEnableSuperResolution" in obj; }, get: function (obj) { return obj.setEnableSuperResolution; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4933
4938
  __esDecorate(_classThis, null, _setVolume_decorators, { kind: "method", name: "setVolume", static: false, private: false, access: { has: function (obj) { return "setVolume" in obj; }, get: function (obj) { return obj.setVolume; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4939
+ __esDecorate(_classThis, null, _setEnableIgnoreAudioInterruption_decorators, { kind: "method", name: "setEnableIgnoreAudioInterruption", static: false, private: false, access: { has: function (obj) { return "setEnableIgnoreAudioInterruption" in obj; }, get: function (obj) { return obj.setEnableIgnoreAudioInterruption; } }, metadata: _metadata }, null, _instanceExtraInitializers);
4934
4940
  __esDecorate(null, null, _observer_decorators, { kind: "field", name: "observer", static: false, private: false, access: { has: function (obj) { return "observer" in obj; }, get: function (obj) { return obj.observer; }, set: function (obj, value) { obj.observer = value; } }, metadata: _metadata }, _observer_initializers, _observer_extraInitializers);
4935
4941
  __esDecorate(null, null, _playerView_decorators, { kind: "field", name: "playerView", static: false, private: false, access: { has: function (obj) { return "playerView" in obj; }, get: function (obj) { return obj.playerView; }, set: function (obj, value) { obj.playerView = value; } }, metadata: _metadata }, _playerView_initializers, _playerView_extraInitializers);
4936
4942
  __esDecorate(null, null, _volume_decorators, { kind: "field", name: "volume", static: false, private: false, access: { has: function (obj) { return "volume" in obj; }, get: function (obj) { return obj.volume; }, set: function (obj, value) { obj.volume = value; } }, metadata: _metadata }, _volume_initializers, _volume_extraInitializers);
@@ -11382,6 +11388,13 @@ extendsClassMethod(VeLivePlayer, 'destroy', function (origin) {
11382
11388
  }); });
11383
11389
  };
11384
11390
  });
11391
+ extendsClassMethod(VeLivePlayer, 'setEnableIgnoreAudioInterruption', function () {
11392
+ return function setEnableIgnoreAudioInterruption(enable) {
11393
+ return runImpl(this, function () { }, function (engine) {
11394
+ engine.setEnableIgnoreAudioInterruption(enable);
11395
+ });
11396
+ };
11397
+ });
11385
11398
 
11386
11399
  extendsClassMethod(android_VeLivePlayerObserver, 'onVideoSizeChanged', function (original) {
11387
11400
  return function onVideoSizeChanged(player, width, height) {
@@ -11639,23 +11652,24 @@ function initAndroidPlayer(options) {
11639
11652
  }
11640
11653
  function initIOSPlayer(options) {
11641
11654
  return __awaiter(this, void 0, void 0, function () {
11642
- var viewId, option, player, config, uiView, multiObserver, manager;
11655
+ var viewId, option, iosPlayer, player, config, uiView, multiObserver, manager;
11643
11656
  return __generator(this, function (_a) {
11644
11657
  switch (_a.label) {
11645
11658
  case 0:
11646
11659
  viewId = options.viewId, option = __rest(options, ["viewId"]);
11647
- player = new VeLivePlayer({});
11660
+ iosPlayer = new TVLManager();
11661
+ player = packObject(iosPlayer, VeLivePlayer);
11648
11662
  config = new VeLivePlayerConfiguration();
11649
11663
  Object.assign(config, defaultConfig, option);
11650
11664
  player.setConfig(config);
11651
11665
  uiView = NativeView.getView(viewId, NativeUIView);
11652
- return [4 /*yield*/, uiView.insertSubview(player.ios_playerView, 0)];
11666
+ return [4 /*yield*/, uiView.insertSubview(iosPlayer.playerView, 0)];
11653
11667
  case 1:
11654
11668
  _a.sent();
11655
11669
  multiObserver = VeLivePlayerMultiObserver.getInstance();
11656
- multiObserver.setupPlayer(unpackObject(player));
11670
+ multiObserver.setupPlayer(iosPlayer);
11657
11671
  manager = VeLivePictureInPictureManager.getInstance();
11658
- manager.setupPlayer(unpackObject(player));
11672
+ manager.setupPlayer(iosPlayer);
11659
11673
  return [2 /*return*/, player];
11660
11674
  }
11661
11675
  });
@@ -62,6 +62,7 @@ export declare class TVLManager {
62
62
 
63
63
  setEnableSuperResolution(enable: BOOL): void;
64
64
  setVolume(volume: float): void;
65
+ setEnableIgnoreAudioInterruption(enable: BOOL): void;
65
66
  }
66
67
  export declare enum VeLivePlayerType {
67
68
 
@@ -83,6 +83,19 @@ declare module '../codegen/pack/api' {
83
83
  * @order 6
84
84
  */
85
85
  disablePictureInPicture(): Promise<void>;
86
+ /**
87
+ * {zh}
88
+ * @brief 设置是否忽略音频中断
89
+ * @param enable 是否忽略音频中断
90
+ * @order 7
91
+ */
92
+ /**
93
+ * {en}
94
+ * @brief Set whether to ignore audio interruption
95
+ * @param enable Whether to ignore audio interruption
96
+ * @order 7
97
+ */
98
+ setEnableIgnoreAudioInterruption(enable: boolean): void;
86
99
  }
87
100
  }
88
101
  export { VeLivePlayer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/react-native-live-pull",
3
- "version": "1.1.2-rc.0",
3
+ "version": "1.1.2-rc.2",
4
4
  "peerDependencies": {
5
5
  "react": "*",
6
6
  "react-native": "*"