react-native-theoplayer 9.10.0 → 10.1.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.
- package/CHANGELOG.md +35 -0
- package/README.md +2 -1
- package/android/build.gradle +11 -12
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/10.0.0/ads-wrapper-10.0.0.aar +0 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/{9.0.0/ads-wrapper-9.0.0.pom → 10.0.0/ads-wrapper-10.0.0.pom} +3 -3
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml +4 -4
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +39 -10
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.kt +32 -14
- package/android/src/main/java/com/theoplayer/ads/AdsModule.kt +18 -6
- package/android/src/main/java/com/theoplayer/broadcast/EventBroadcastModule.kt +15 -5
- package/android/src/main/java/com/theoplayer/cache/CacheAdapter.kt +0 -12
- package/android/src/main/java/com/theoplayer/cache/CacheModule.kt +20 -7
- package/android/src/main/java/com/theoplayer/cast/CastEventAdapter.kt +11 -7
- package/android/src/main/java/com/theoplayer/cast/CastModule.kt +17 -3
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionAdapter.kt +1 -1
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +28 -11
- package/android/src/main/java/com/theoplayer/media/ConditionalMediaButtonReceiver.kt +38 -0
- package/android/src/main/java/com/theoplayer/player/PlayerModule.kt +17 -4
- package/android/src/main/java/com/theoplayer/presentation/PresentationManager.kt +12 -3
- package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +16 -37
- package/android/src/main/java/com/theoplayer/theoads/THEOadsAdapter.kt +83 -0
- package/android/src/main/java/com/theoplayer/theoads/THEOadsEventAdapter.kt +55 -0
- package/android/src/main/java/com/theoplayer/theoads/THEOadsModule.kt +63 -0
- package/android/src/main/java/com/theoplayer/theolive/THEOliveEventAdapter.kt +21 -8
- package/android/src/main/java/com/theoplayer/theolive/THEOliveModule.kt +16 -3
- package/android/src/main/java/com/theoplayer/track/TextTrackStyleAdapter.kt +8 -1
- package/android/src/main/java/com/theoplayer/util/PayloadBuilder.kt +8 -0
- package/ios/THEOplayerRCTBridge.m +21 -1
- package/ios/THEOplayerRCTDebug.swift +4 -1
- package/ios/THEOplayerRCTMainEventHandler.swift +24 -21
- package/ios/THEOplayerRCTPlayerAPI.swift +3 -3
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +2 -1
- package/ios/THEOplayerRCTView.swift +22 -4
- package/ios/backgroundAudio/THEOplayerRCTNowPlayingManager.swift +96 -50
- package/ios/backgroundAudio/THEOplayerRCTRemoteCommandsManager.swift +0 -1
- package/ios/casting/THEOplayerRCTCastEventHandler.swift +1 -1
- package/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift +24 -6
- package/ios/theoAds/THEOplayerRCTTHEOAdsAPI.swift +101 -0
- package/ios/theoAds/THEOplayerRCTTHEOAdsEventAdapter.swift +118 -0
- package/ios/theoAds/THEOplayerRCTTHEOAdsEventHandler.swift +174 -0
- package/ios/theolive/THEOplayerRCTSourceDescriptionBuilder+Theolive.swift +0 -1
- package/ios/theolive/THEOplayerRCTTHEOliveEventHandler.swift +1 -1
- package/ios/theolive/THEOplayerRCTView+THEOlive.swift +1 -5
- package/ios/theolive/THEOplayerRCTView+THEOliveConfig.swift +0 -2
- package/lib/commonjs/api/barrel.js +45 -56
- package/lib/commonjs/api/barrel.js.map +1 -1
- package/lib/commonjs/api/cache/CachingTaskParameters.js +0 -19
- package/lib/commonjs/api/cache/CachingTaskParameters.js.map +1 -1
- package/lib/commonjs/api/event/PlayerEvent.js +16 -0
- package/lib/commonjs/api/event/PlayerEvent.js.map +1 -1
- package/lib/commonjs/api/event/TheoAdsEvent.js +7 -0
- package/lib/commonjs/api/event/TheoAdsEvent.js.map +1 -1
- package/lib/commonjs/api/player/PlayerEventMap.js +2 -0
- package/lib/commonjs/api/player/PlayerEventMap.js.map +1 -1
- package/lib/commonjs/api/source/SourceDescription.js +1 -13
- package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
- package/lib/commonjs/api/source/ads/{THEOplayerAdDescription.js → CsaiAdDescription.js} +1 -1
- package/lib/commonjs/api/source/ads/CsaiAdDescription.js.map +1 -0
- package/lib/commonjs/api/source/ads/barrel.js +4 -4
- package/lib/commonjs/api/source/ads/barrel.js.map +1 -1
- package/lib/commonjs/api/track/Quality.js +37 -0
- package/lib/commonjs/api/track/Quality.js.map +1 -1
- package/lib/commonjs/api/track/TextTrackStyle.js.map +1 -1
- package/lib/commonjs/index.js +0 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.js +15 -3
- package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.web.js +1 -1
- package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
- package/lib/commonjs/internal/adapter/DefaultNativePlayerState.js +2 -0
- package/lib/commonjs/internal/adapter/DefaultNativePlayerState.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js +27 -9
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js +18 -1
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
- package/lib/commonjs/internal/adapter/WebEventForwarder.js +15 -1
- package/lib/commonjs/internal/adapter/WebEventForwarder.js.map +1 -1
- package/lib/commonjs/internal/adapter/event/PlayerEvents.js +30 -1
- package/lib/commonjs/internal/adapter/event/PlayerEvents.js.map +1 -1
- package/lib/commonjs/internal/adapter/event/native/NativeTheoAdsEvent.js +20 -0
- package/lib/commonjs/internal/adapter/event/native/NativeTheoAdsEvent.js.map +1 -0
- package/lib/commonjs/internal/adapter/theoads/THEOAdsNativeAdapter.js +6 -12
- package/lib/commonjs/internal/adapter/theoads/THEOAdsNativeAdapter.js.map +1 -1
- package/lib/commonjs/internal/adapter/track/TextTrackStyleAdapter.js +10 -0
- package/lib/commonjs/internal/adapter/track/TextTrackStyleAdapter.js.map +1 -1
- package/lib/commonjs/internal/utils/TypeUtils.js +4 -1
- package/lib/commonjs/internal/utils/TypeUtils.js.map +1 -1
- package/lib/commonjs/manifest.json +1 -1
- package/lib/module/api/barrel.js +0 -1
- package/lib/module/api/barrel.js.map +1 -1
- package/lib/module/api/cache/CachingTaskParameters.js +1 -19
- package/lib/module/api/cache/CachingTaskParameters.js.map +1 -1
- package/lib/module/api/event/PlayerEvent.js +18 -0
- package/lib/module/api/event/PlayerEvent.js.map +1 -1
- package/lib/module/api/event/TheoAdsEvent.js +8 -0
- package/lib/module/api/event/TheoAdsEvent.js.map +1 -1
- package/lib/module/api/player/PlayerEventMap.js +2 -0
- package/lib/module/api/player/PlayerEventMap.js.map +1 -1
- package/lib/module/api/source/SourceDescription.js +0 -13
- package/lib/module/api/source/SourceDescription.js.map +1 -1
- package/lib/module/api/source/ads/CsaiAdDescription.js +4 -0
- package/lib/module/api/source/ads/CsaiAdDescription.js.map +1 -0
- package/lib/module/api/source/ads/barrel.js +1 -1
- package/lib/module/api/source/ads/barrel.js.map +1 -1
- package/lib/module/api/track/Quality.js +34 -0
- package/lib/module/api/track/Quality.js.map +1 -1
- package/lib/module/api/track/TextTrackStyle.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/THEOplayerView.js +16 -4
- package/lib/module/internal/THEOplayerView.js.map +1 -1
- package/lib/module/internal/THEOplayerView.web.js +1 -1
- package/lib/module/internal/THEOplayerView.web.js.map +1 -1
- package/lib/module/internal/adapter/DefaultNativePlayerState.js +2 -0
- package/lib/module/internal/adapter/DefaultNativePlayerState.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerAdapter.js +28 -10
- package/lib/module/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js +18 -1
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
- package/lib/module/internal/adapter/WebEventForwarder.js +16 -2
- package/lib/module/internal/adapter/WebEventForwarder.js.map +1 -1
- package/lib/module/internal/adapter/event/PlayerEvents.js +26 -0
- package/lib/module/internal/adapter/event/PlayerEvents.js.map +1 -1
- package/lib/module/internal/adapter/event/native/NativeTheoAdsEvent.js +16 -0
- package/lib/module/internal/adapter/event/native/NativeTheoAdsEvent.js.map +1 -0
- package/lib/module/internal/adapter/theoads/THEOAdsNativeAdapter.js +6 -12
- package/lib/module/internal/adapter/theoads/THEOAdsNativeAdapter.js.map +1 -1
- package/lib/module/internal/adapter/track/TextTrackStyleAdapter.js +10 -0
- package/lib/module/internal/adapter/track/TextTrackStyleAdapter.js.map +1 -1
- package/lib/module/internal/utils/TypeUtils.js +3 -0
- package/lib/module/internal/utils/TypeUtils.js.map +1 -1
- package/lib/module/manifest.json +1 -1
- package/lib/typescript/api/barrel.d.ts +0 -1
- package/lib/typescript/api/barrel.d.ts.map +1 -1
- package/lib/typescript/api/cache/CachingTaskParameters.d.ts +0 -34
- package/lib/typescript/api/cache/CachingTaskParameters.d.ts.map +1 -1
- package/lib/typescript/api/event/PlayerEvent.d.ts +36 -0
- package/lib/typescript/api/event/PlayerEvent.d.ts.map +1 -1
- package/lib/typescript/api/event/TheoAdsEvent.d.ts +13 -0
- package/lib/typescript/api/event/TheoAdsEvent.d.ts.map +1 -1
- package/lib/typescript/api/player/PlayerEventMap.d.ts +17 -2
- package/lib/typescript/api/player/PlayerEventMap.d.ts.map +1 -1
- package/lib/typescript/api/player/THEOplayer.d.ts +8 -0
- package/lib/typescript/api/player/THEOplayer.d.ts.map +1 -1
- package/lib/typescript/api/source/SourceDescription.d.ts +0 -20
- package/lib/typescript/api/source/SourceDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/{THEOplayerAdDescription.d.ts → CsaiAdDescription.d.ts} +2 -2
- package/lib/typescript/api/source/ads/CsaiAdDescription.d.ts.map +1 -0
- package/lib/typescript/api/source/ads/barrel.d.ts +1 -1
- package/lib/typescript/api/source/ads/barrel.d.ts.map +1 -1
- package/lib/typescript/api/track/Quality.d.ts +1 -0
- package/lib/typescript/api/track/Quality.d.ts.map +1 -1
- package/lib/typescript/api/track/TextTrackStyle.d.ts +7 -0
- package/lib/typescript/api/track/TextTrackStyle.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +0 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/internal/THEOplayerView.d.ts +3 -1
- package/lib/typescript/internal/THEOplayerView.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/DefaultNativePlayerState.d.ts +2 -0
- package/lib/typescript/internal/adapter/DefaultNativePlayerState.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/NativePlayerState.d.ts +2 -0
- package/lib/typescript/internal/adapter/NativePlayerState.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts +5 -3
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/THEOplayerWebAdapter.d.ts +5 -0
- package/lib/typescript/internal/adapter/THEOplayerWebAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/WebEventForwarder.d.ts +1 -0
- package/lib/typescript/internal/adapter/WebEventForwarder.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/event/PlayerEvents.d.ts +20 -1
- package/lib/typescript/internal/adapter/event/PlayerEvents.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/event/native/NativePlayerEvent.d.ts +11 -1
- package/lib/typescript/internal/adapter/event/native/NativePlayerEvent.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/event/native/NativeTheoAdsEvent.d.ts +18 -0
- package/lib/typescript/internal/adapter/event/native/NativeTheoAdsEvent.d.ts.map +1 -0
- package/lib/typescript/internal/adapter/theoads/THEOAdsNativeAdapter.d.ts +1 -1
- package/lib/typescript/internal/adapter/theoads/THEOAdsNativeAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/track/TextTrackStyleAdapter.d.ts +3 -0
- package/lib/typescript/internal/adapter/track/TextTrackStyleAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/utils/TypeUtils.d.ts +1 -0
- package/lib/typescript/internal/utils/TypeUtils.d.ts.map +1 -1
- package/package.json +6 -6
- package/react-native-theoplayer.podspec +7 -7
- package/src/api/barrel.ts +0 -1
- package/src/api/cache/CachingTaskParameters.ts +0 -37
- package/src/api/event/PlayerEvent.ts +40 -0
- package/src/api/event/TheoAdsEvent.ts +14 -0
- package/src/api/player/PlayerEventMap.ts +19 -0
- package/src/api/player/THEOplayer.ts +10 -0
- package/src/api/source/SourceDescription.ts +0 -22
- package/src/api/source/ads/{THEOplayerAdDescription.ts → CsaiAdDescription.ts} +1 -1
- package/src/api/source/ads/barrel.ts +1 -1
- package/src/api/track/Quality.ts +15 -0
- package/src/api/track/TextTrackStyle.ts +8 -0
- package/src/index.tsx +0 -1
- package/src/internal/THEOplayerView.tsx +24 -5
- package/src/internal/THEOplayerView.web.tsx +1 -1
- package/src/internal/adapter/DefaultNativePlayerState.ts +2 -0
- package/src/internal/adapter/NativePlayerState.ts +2 -0
- package/src/internal/adapter/THEOplayerAdapter.ts +43 -21
- package/src/internal/adapter/THEOplayerWebAdapter.ts +22 -2
- package/src/internal/adapter/WebEventForwarder.ts +17 -1
- package/src/internal/adapter/event/PlayerEvents.ts +34 -0
- package/src/internal/adapter/event/native/NativePlayerEvent.ts +13 -1
- package/src/internal/adapter/event/native/NativeTheoAdsEvent.ts +30 -0
- package/src/internal/adapter/theoads/THEOAdsNativeAdapter.ts +7 -12
- package/src/internal/adapter/track/TextTrackStyleAdapter.ts +12 -0
- package/src/internal/utils/TypeUtils.ts +6 -0
- package/src/manifest.json +1 -1
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/9.0.0/ads-wrapper-9.0.0.aar +0 -0
- package/android/src/main/java/com/theoplayer/playback/PlaybackSettingsModule.kt +0 -28
- package/lib/commonjs/api/playback/PlaybackSettingsAPI.js +0 -2
- package/lib/commonjs/api/playback/PlaybackSettingsAPI.js.map +0 -1
- package/lib/commonjs/api/playback/barrel.js +0 -17
- package/lib/commonjs/api/playback/barrel.js.map +0 -1
- package/lib/commonjs/api/source/ads/THEOplayerAdDescription.js.map +0 -1
- package/lib/commonjs/internal/playback/PlaybackSettings.js +0 -28
- package/lib/commonjs/internal/playback/PlaybackSettings.js.map +0 -1
- package/lib/module/api/playback/PlaybackSettingsAPI.js +0 -2
- package/lib/module/api/playback/PlaybackSettingsAPI.js.map +0 -1
- package/lib/module/api/playback/barrel.js +0 -4
- package/lib/module/api/playback/barrel.js.map +0 -1
- package/lib/module/api/source/ads/THEOplayerAdDescription.js +0 -4
- package/lib/module/api/source/ads/THEOplayerAdDescription.js.map +0 -1
- package/lib/module/internal/playback/PlaybackSettings.js +0 -23
- package/lib/module/internal/playback/PlaybackSettings.js.map +0 -1
- package/lib/typescript/api/playback/PlaybackSettingsAPI.d.ts +0 -35
- package/lib/typescript/api/playback/PlaybackSettingsAPI.d.ts.map +0 -1
- package/lib/typescript/api/playback/barrel.d.ts +0 -2
- package/lib/typescript/api/playback/barrel.d.ts.map +0 -1
- package/lib/typescript/api/source/ads/THEOplayerAdDescription.d.ts.map +0 -1
- package/lib/typescript/internal/playback/PlaybackSettings.d.ts +0 -7
- package/lib/typescript/internal/playback/PlaybackSettings.d.ts.map +0 -1
- package/src/api/playback/PlaybackSettingsAPI.ts +0 -36
- package/src/api/playback/barrel.ts +0 -1
- package/src/internal/playback/PlaybackSettings.ts +0 -25
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
DefaultAirplayStateChangeEvent,
|
|
44
44
|
DefaultChromecastChangeEvent,
|
|
45
45
|
DefaultChromecastErrorEvent,
|
|
46
|
+
DefaultDimensionChangeEvent,
|
|
46
47
|
DefaultDurationChangeEvent,
|
|
47
48
|
DefaultErrorEvent,
|
|
48
49
|
DefaultLoadedMetadataEvent,
|
|
@@ -57,12 +58,14 @@ import {
|
|
|
57
58
|
DefaultSegmentNotFoundEvent,
|
|
58
59
|
DefaultTextTrackEvent,
|
|
59
60
|
DefaultTextTrackListEvent,
|
|
61
|
+
DefaultTheoAdsErrorEvent,
|
|
60
62
|
DefaultTheoAdsEvent,
|
|
61
63
|
DefaultTheoLiveDistributionEvent,
|
|
62
64
|
DefaultTheoLiveEndpointLoadedEvent,
|
|
63
65
|
DefaultTheoLiveEvent,
|
|
64
66
|
DefaultTheoLiveIntentToFallbackEvent,
|
|
65
67
|
DefaultTimeupdateEvent,
|
|
68
|
+
DefaultVideoResizeEvent,
|
|
66
69
|
DefaultVolumeChangeEvent,
|
|
67
70
|
} from './event/PlayerEvents';
|
|
68
71
|
import { fromNativeCue, fromNativeMediaTrack, fromNativeTextTrack } from './web/TrackUtils';
|
|
@@ -99,6 +102,7 @@ export class WebEventForwarder {
|
|
|
99
102
|
this._player.addEventListener('segmentnotfound', this.onSegmentNotFound);
|
|
100
103
|
this._player.addEventListener('volumechange', this.onVolumeChangeEvent);
|
|
101
104
|
this._player.addEventListener('dimensionchange', this.onDimensionChange);
|
|
105
|
+
this._player.addEventListener('resize', this.onVideoResize);
|
|
102
106
|
|
|
103
107
|
this._player.textTracks.addEventListener('addtrack', this.onAddTextTrack);
|
|
104
108
|
this._player.textTracks.addEventListener('removetrack', this.onRemoveTextTrack);
|
|
@@ -146,6 +150,8 @@ export class WebEventForwarder {
|
|
|
146
150
|
this._player.removeEventListener('ratechange', this.onPlaybackRateChange);
|
|
147
151
|
this._player.removeEventListener('segmentnotfound', this.onSegmentNotFound);
|
|
148
152
|
this._player.removeEventListener('volumechange', this.onVolumeChangeEvent);
|
|
153
|
+
this._player.removeEventListener('dimensionchange', this.onDimensionChange);
|
|
154
|
+
this._player.removeEventListener('resize', this.onVideoResize);
|
|
149
155
|
|
|
150
156
|
this._player.textTracks.removeEventListener('addtrack', this.onAddTextTrack);
|
|
151
157
|
this._player.textTracks.removeEventListener('removetrack', this.onRemoveTextTrack);
|
|
@@ -265,6 +271,11 @@ export class WebEventForwarder {
|
|
|
265
271
|
|
|
266
272
|
private readonly onDimensionChange = (event: NativeDimensionChangeEvent) => {
|
|
267
273
|
this._facade.dispatchEvent(new DefaultResizeEvent(event.width, event.height));
|
|
274
|
+
this._facade.dispatchEvent(new DefaultDimensionChangeEvent(event.width, event.height));
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
private readonly onVideoResize = (_event: NativeEvent<'resize'>) => {
|
|
278
|
+
this._facade.dispatchEvent(new DefaultVideoResizeEvent(this._player.videoWidth, this._player.videoHeight));
|
|
268
279
|
};
|
|
269
280
|
|
|
270
281
|
private readonly onAddTextTrack = (event: AddTrackEvent) => {
|
|
@@ -351,7 +362,12 @@ export class WebEventForwarder {
|
|
|
351
362
|
};
|
|
352
363
|
|
|
353
364
|
private readonly onTheoAdsEvent = (event: InterstitialEvent<any>) => {
|
|
354
|
-
|
|
365
|
+
if (event.type === TheoAdsEventType.INTERSTITIAL_ERROR) {
|
|
366
|
+
const { message } = event as unknown as { message: string | undefined };
|
|
367
|
+
this._facade.dispatchEvent(new DefaultTheoAdsErrorEvent(event.type as TheoAdsEventType, event.interstitial, message));
|
|
368
|
+
} else {
|
|
369
|
+
this._facade.dispatchEvent(new DefaultTheoAdsEvent(event.type as TheoAdsEventType, event.interstitial));
|
|
370
|
+
}
|
|
355
371
|
};
|
|
356
372
|
|
|
357
373
|
private readonly onTheoLiveEvent = (event: NativeEvent) => {
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
TextTrackEventType,
|
|
39
39
|
TextTrackListEvent,
|
|
40
40
|
TheoAdsEvent,
|
|
41
|
+
TheoAdsErrorEvent,
|
|
41
42
|
TheoAdsEventType,
|
|
42
43
|
TheoLiveEvent,
|
|
43
44
|
TheoLiveDistributionEvent,
|
|
@@ -49,6 +50,8 @@ import {
|
|
|
49
50
|
TheoLiveEndpoint,
|
|
50
51
|
TheoLiveEndpointLoadedEvent,
|
|
51
52
|
TheoLiveIntentToFallbackEvent,
|
|
53
|
+
DimensionChangeEvent,
|
|
54
|
+
VideoResizeEvent,
|
|
52
55
|
} from 'react-native-theoplayer';
|
|
53
56
|
|
|
54
57
|
export class DefaultLoadedMetadataEvent extends BaseEvent<PlayerEventType.LOADED_METADATA> implements LoadedMetadataEvent {
|
|
@@ -90,6 +93,9 @@ export class DefaultVolumeChangeEvent extends BaseEvent<PlayerEventType.VOLUME_C
|
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated Use {@link DefaultDimensionChangeEvent} instead. This event is set for removal in version 11.
|
|
98
|
+
*/
|
|
93
99
|
export class DefaultResizeEvent extends BaseEvent<PlayerEventType.RESIZE> implements ResizeEvent {
|
|
94
100
|
constructor(
|
|
95
101
|
public width: number,
|
|
@@ -99,6 +105,24 @@ export class DefaultResizeEvent extends BaseEvent<PlayerEventType.RESIZE> implem
|
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
107
|
|
|
108
|
+
export class DefaultDimensionChangeEvent extends BaseEvent<PlayerEventType.DIMENSION_CHANGE> implements DimensionChangeEvent {
|
|
109
|
+
constructor(
|
|
110
|
+
public width: number,
|
|
111
|
+
public height: number,
|
|
112
|
+
) {
|
|
113
|
+
super(PlayerEventType.DIMENSION_CHANGE);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export class DefaultVideoResizeEvent extends BaseEvent<PlayerEventType.VIDEO_RESIZE> implements VideoResizeEvent {
|
|
118
|
+
constructor(
|
|
119
|
+
public videoWidth: number,
|
|
120
|
+
public videoHeight: number,
|
|
121
|
+
) {
|
|
122
|
+
super(PlayerEventType.VIDEO_RESIZE);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
102
126
|
export class DefaultErrorEvent extends BaseEvent<PlayerEventType.ERROR> implements ErrorEvent {
|
|
103
127
|
constructor(public error: PlayerError) {
|
|
104
128
|
super(PlayerEventType.ERROR);
|
|
@@ -215,6 +239,16 @@ export class DefaultTheoAdsEvent extends BaseEvent<PlayerEventType.THEOADS_EVENT
|
|
|
215
239
|
}
|
|
216
240
|
}
|
|
217
241
|
|
|
242
|
+
export class DefaultTheoAdsErrorEvent extends BaseEvent<PlayerEventType.THEOADS_EVENT> implements TheoAdsErrorEvent {
|
|
243
|
+
constructor(
|
|
244
|
+
public subType: TheoAdsEventType,
|
|
245
|
+
public interstitial: Interstitial,
|
|
246
|
+
public message: string | undefined,
|
|
247
|
+
) {
|
|
248
|
+
super(PlayerEventType.THEOADS_EVENT);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
218
252
|
export class DefaultTheoLiveEvent extends BaseEvent<PlayerEventType.THEOLIVE_EVENT> implements TheoLiveEvent {
|
|
219
253
|
constructor(public subType: TheoLiveEventType) {
|
|
220
254
|
super(PlayerEventType.THEOLIVE_EVENT);
|
|
@@ -111,7 +111,7 @@ export interface NativeProgressEvent {
|
|
|
111
111
|
readonly buffered: TimeRange[];
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
export interface
|
|
114
|
+
export interface NativeDimensionChangeEvent {
|
|
115
115
|
/**
|
|
116
116
|
* The width of the player.
|
|
117
117
|
*/
|
|
@@ -123,6 +123,18 @@ export interface NativeResizeEvent {
|
|
|
123
123
|
readonly height: number;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
export interface NativeVideoResizeEvent {
|
|
127
|
+
/**
|
|
128
|
+
* The width of the video.
|
|
129
|
+
*/
|
|
130
|
+
readonly videoWidth: number;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The height of the video.
|
|
134
|
+
*/
|
|
135
|
+
readonly videoHeight: number;
|
|
136
|
+
}
|
|
137
|
+
|
|
126
138
|
export interface NativeSegmentNotFoundEvent {
|
|
127
139
|
/**
|
|
128
140
|
* Start time of the segment.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Interstitial, TheoAdsEvent, TheoAdsEventType } from 'react-native-theoplayer';
|
|
2
|
+
import { NativeSyntheticEvent } from 'react-native';
|
|
3
|
+
import { DefaultTheoAdsErrorEvent, DefaultTheoAdsEvent } from '../PlayerEvents';
|
|
4
|
+
|
|
5
|
+
export interface NativeTheoAdsEvent {
|
|
6
|
+
/**
|
|
7
|
+
* Type of TheoAds event.
|
|
8
|
+
*/
|
|
9
|
+
type: TheoAdsEventType;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Interstitial referred to by the TheoAds event.
|
|
13
|
+
*/
|
|
14
|
+
interstitial: Interstitial;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Error message, in case of an INTERSTITIAL_ERROR event.
|
|
18
|
+
*/
|
|
19
|
+
message: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function fromNativeTheoAdsEvent(event: NativeSyntheticEvent<NativeTheoAdsEvent>): TheoAdsEvent {
|
|
23
|
+
const { nativeEvent } = event;
|
|
24
|
+
switch (event.type) {
|
|
25
|
+
case TheoAdsEventType.INTERSTITIAL_ERROR:
|
|
26
|
+
return new DefaultTheoAdsErrorEvent(TheoAdsEventType.INTERSTITIAL_ERROR, nativeEvent.interstitial, nativeEvent.message);
|
|
27
|
+
default:
|
|
28
|
+
return new DefaultTheoAdsEvent(event.type as TheoAdsEventType, nativeEvent.interstitial);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { TheoAdsAPI, Interstitial, type THEOplayerView } from 'react-native-theoplayer';
|
|
2
|
+
import { NativeModules } from 'react-native';
|
|
3
|
+
|
|
4
|
+
const NativeTHEOAdsModule = NativeModules.THEORCTTHEOAdsModule;
|
|
2
5
|
|
|
3
6
|
export class THEOAdsNativeAdapter implements TheoAdsAPI {
|
|
4
7
|
// @ts-ignore
|
|
5
8
|
constructor(private _player: THEOplayerView) {}
|
|
6
9
|
|
|
7
10
|
get currentInterstitials(): Promise<readonly Interstitial[]> {
|
|
8
|
-
|
|
9
|
-
//return NativeTHEOAdsModule.currentInterstitials(this._player.nativeHandle);
|
|
10
|
-
console.warn('THEOAdsNativeAdapter', 'currentInterstitials - NYI');
|
|
11
|
-
return Promise.resolve([]);
|
|
11
|
+
return NativeTHEOAdsModule.currentInterstitials(this._player.nativeHandle);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
get scheduledInterstitials(): Promise<readonly Interstitial[]> {
|
|
15
|
-
|
|
16
|
-
//return NativeTHEOAdsModule.scheduledInterstitials(this._player.nativeHandle);
|
|
17
|
-
console.warn('THEOAdsNativeAdapter', 'scheduledInterstitials - NYI');
|
|
18
|
-
return Promise.resolve([]);
|
|
15
|
+
return NativeTHEOAdsModule.scheduledInterstitials(this._player.nativeHandle);
|
|
19
16
|
}
|
|
20
17
|
|
|
21
|
-
replaceAdTagParameters(
|
|
22
|
-
|
|
23
|
-
console.warn('THEOAdsNativeAdapter', 'replaceAdTagParameters - NYI');
|
|
24
|
-
// TODO
|
|
18
|
+
replaceAdTagParameters(adTagParameters?: Record<string, string>): void {
|
|
19
|
+
NativeTHEOAdsModule.replaceAdTagParameters(this._player.nativeHandle, adTagParameters);
|
|
25
20
|
}
|
|
26
21
|
}
|
|
@@ -12,6 +12,7 @@ export class TextTrackStyleAdapter implements TextTrackStyle {
|
|
|
12
12
|
private _fontColor: string | undefined = undefined;
|
|
13
13
|
private _fontFamily: string | undefined = undefined;
|
|
14
14
|
private _fontSize: string | undefined = undefined;
|
|
15
|
+
private _fontPath: string | undefined = undefined;
|
|
15
16
|
private _windowColor: string | undefined = undefined;
|
|
16
17
|
private _marginBottom: number | undefined = undefined;
|
|
17
18
|
private _marginTop: number | undefined = undefined;
|
|
@@ -75,6 +76,17 @@ export class TextTrackStyleAdapter implements TextTrackStyle {
|
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
|
|
79
|
+
get fontPath(): string | undefined {
|
|
80
|
+
return this._fontPath
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
set fontPath(path: string) {
|
|
84
|
+
this._fontPath = path
|
|
85
|
+
NativePlayerModule.setTextTrackStyle(this._view.nativeHandle, {
|
|
86
|
+
fontPath: path
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
|
|
78
90
|
get fontSize(): string | undefined {
|
|
79
91
|
return this._fontSize;
|
|
80
92
|
}
|
|
@@ -37,3 +37,9 @@ export const isArrayBufferView_: typeof ArrayBuffer.isView =
|
|
|
37
37
|
export function isBufferSource(bufferSource: any): bufferSource is BufferSource {
|
|
38
38
|
return bufferSource instanceof ArrayBuffer || isArrayBufferView_(bufferSource);
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
export const isArray: <T = any>(arg: unknown) => arg is T[] =
|
|
42
|
+
Array.isArray ||
|
|
43
|
+
function isArray(arg: unknown): arg is unknown[] {
|
|
44
|
+
return objectToString.call(arg) === '[object Array]';
|
|
45
|
+
};
|
package/src/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"10.1.0","buildDate":"2025-10-06T13:40:51.511Z"}
|
package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/9.0.0/ads-wrapper-9.0.0.aar
DELETED
|
Binary file
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
package com.theoplayer.playback
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
-
import com.facebook.react.bridge.ReactMethod
|
|
6
|
-
import com.theoplayer.android.api.THEOplayerGlobal
|
|
7
|
-
import com.theoplayer.android.api.settings.PlaybackSettings
|
|
8
|
-
|
|
9
|
-
class PlaybackSettingsModule(private val context: ReactApplicationContext) :
|
|
10
|
-
ReactContextBaseJavaModule(context) {
|
|
11
|
-
|
|
12
|
-
private val playbackSettings: PlaybackSettings
|
|
13
|
-
get() = THEOplayerGlobal.getSharedInstance(context.applicationContext).playbackSettings
|
|
14
|
-
|
|
15
|
-
override fun getName(): String {
|
|
16
|
-
return "THEORCTPlaybackSettingsModule"
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@ReactMethod
|
|
20
|
-
fun useFastStartup(useFastStartup: Boolean) {
|
|
21
|
-
playbackSettings.useFastStartup(useFastStartup)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@ReactMethod
|
|
25
|
-
fun setLipSyncCorrection(correctionMs: Double) {
|
|
26
|
-
playbackSettings.setLipSyncCorrection(correctionMs.toLong())
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/playback/PlaybackSettingsAPI.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _PlaybackSettingsAPI = require("./PlaybackSettingsAPI");
|
|
7
|
-
Object.keys(_PlaybackSettingsAPI).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _PlaybackSettingsAPI[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _PlaybackSettingsAPI[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=barrel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_PlaybackSettingsAPI","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["api/playback/barrel.ts"],"mappings":";;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,oBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,oBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,oBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["api/source/ads/THEOplayerAdDescription.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PlaybackSettings = exports.NativePlaybackSettings = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
const NativePlaybackSettingsModule = _reactNative.NativeModules.THEORCTPlaybackSettingsModule;
|
|
9
|
-
const TAG = 'PlaybackSettings';
|
|
10
|
-
class NativePlaybackSettings {
|
|
11
|
-
useFastStartup(useFastStartup) {
|
|
12
|
-
if (_reactNative.Platform.OS !== 'android') {
|
|
13
|
-
console.warn(TAG, 'useFastStartup is only available on Android platforms.');
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
NativePlaybackSettingsModule.useFastStartup(useFastStartup);
|
|
17
|
-
}
|
|
18
|
-
setLipSyncCorrection(correctionMs) {
|
|
19
|
-
if (_reactNative.Platform.OS !== 'android') {
|
|
20
|
-
console.warn(TAG, 'setLipSyncCorrect is only available on Android platforms.');
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
NativePlaybackSettingsModule.setLipSyncCorrection(correctionMs);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.NativePlaybackSettings = NativePlaybackSettings;
|
|
27
|
-
const PlaybackSettings = exports.PlaybackSettings = new NativePlaybackSettings();
|
|
28
|
-
//# sourceMappingURL=PlaybackSettings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","NativePlaybackSettingsModule","NativeModules","THEORCTPlaybackSettingsModule","TAG","NativePlaybackSettings","useFastStartup","Platform","OS","console","warn","setLipSyncCorrection","correctionMs","exports","PlaybackSettings"],"sourceRoot":"../../../../src","sources":["internal/playback/PlaybackSettings.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,MAAMC,4BAA4B,GAAGC,0BAAa,CAACC,6BAA6B;AAEhF,MAAMC,GAAG,GAAG,kBAAkB;AAEvB,MAAMC,sBAAsB,CAAgC;EACjEC,cAAcA,CAACA,cAAuB,EAAQ;IAC5C,IAAIC,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACN,GAAG,EAAE,wDAAwD,CAAC;MAC3E;IACF;IACAH,4BAA4B,CAACK,cAAc,CAACA,cAAc,CAAC;EAC7D;EACAK,oBAAoBA,CAACC,YAAoB,EAAQ;IAC/C,IAAIL,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACN,GAAG,EAAE,2DAA2D,CAAC;MAC9E;IACF;IACAH,4BAA4B,CAACU,oBAAoB,CAACC,YAAY,CAAC;EACjE;AACF;AAACC,OAAA,CAAAR,sBAAA,GAAAA,sBAAA;AAEM,MAAMS,gBAAqC,GAAAD,OAAA,CAAAC,gBAAA,GAAG,IAAIT,sBAAsB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/playback/PlaybackSettingsAPI.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/playback/barrel.ts"],"mappings":";;AAAA,cAAc,uBAAuB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["api/source/ads/THEOplayerAdDescription.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { NativeModules, Platform } from 'react-native';
|
|
4
|
-
const NativePlaybackSettingsModule = NativeModules.THEORCTPlaybackSettingsModule;
|
|
5
|
-
const TAG = 'PlaybackSettings';
|
|
6
|
-
export class NativePlaybackSettings {
|
|
7
|
-
useFastStartup(useFastStartup) {
|
|
8
|
-
if (Platform.OS !== 'android') {
|
|
9
|
-
console.warn(TAG, 'useFastStartup is only available on Android platforms.');
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
NativePlaybackSettingsModule.useFastStartup(useFastStartup);
|
|
13
|
-
}
|
|
14
|
-
setLipSyncCorrection(correctionMs) {
|
|
15
|
-
if (Platform.OS !== 'android') {
|
|
16
|
-
console.warn(TAG, 'setLipSyncCorrect is only available on Android platforms.');
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
NativePlaybackSettingsModule.setLipSyncCorrection(correctionMs);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export const PlaybackSettings = new NativePlaybackSettings();
|
|
23
|
-
//# sourceMappingURL=PlaybackSettings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","NativePlaybackSettingsModule","THEORCTPlaybackSettingsModule","TAG","NativePlaybackSettings","useFastStartup","OS","console","warn","setLipSyncCorrection","correctionMs","PlaybackSettings"],"sourceRoot":"../../../../src","sources":["internal/playback/PlaybackSettings.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAGtD,MAAMC,4BAA4B,GAAGF,aAAa,CAACG,6BAA6B;AAEhF,MAAMC,GAAG,GAAG,kBAAkB;AAE9B,OAAO,MAAMC,sBAAsB,CAAgC;EACjEC,cAAcA,CAACA,cAAuB,EAAQ;IAC5C,IAAIL,QAAQ,CAACM,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACL,GAAG,EAAE,wDAAwD,CAAC;MAC3E;IACF;IACAF,4BAA4B,CAACI,cAAc,CAACA,cAAc,CAAC;EAC7D;EACAI,oBAAoBA,CAACC,YAAoB,EAAQ;IAC/C,IAAIV,QAAQ,CAACM,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACL,GAAG,EAAE,2DAA2D,CAAC;MAC9E;IACF;IACAF,4BAA4B,CAACQ,oBAAoB,CAACC,YAAY,CAAC;EACjE;AACF;AAEA,OAAO,MAAMC,gBAAqC,GAAG,IAAIP,sBAAsB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The playback settings for all instances of THEOplayer.
|
|
3
|
-
*/
|
|
4
|
-
export interface PlaybackSettingsAPI {
|
|
5
|
-
/**
|
|
6
|
-
* The player starts the playback as soon as the first video data is available related to the initial playback position.
|
|
7
|
-
*
|
|
8
|
-
* <ul>
|
|
9
|
-
* <li>Using this feature will sacrifice the accuracy of the initial seek position
|
|
10
|
-
* <li>This API is in an experimental stage and may be subject to breaking changes.
|
|
11
|
-
* </ul>
|
|
12
|
-
*
|
|
13
|
-
* @experimental
|
|
14
|
-
*
|
|
15
|
-
* @param {boolean} useFastStartup Whether fast startup is enabled.
|
|
16
|
-
*
|
|
17
|
-
* @platform android
|
|
18
|
-
*/
|
|
19
|
-
useFastStartup(useFastStartup: boolean): void;
|
|
20
|
-
/**
|
|
21
|
-
* Sets the lip sync correction delay.
|
|
22
|
-
*
|
|
23
|
-
* This method adjusts the synchronization between audio and video playback for all instances of THEOplayer
|
|
24
|
-
* by applying a specified correction delay.
|
|
25
|
-
*
|
|
26
|
-
* @experimental
|
|
27
|
-
* @since Native THEOplayer SDK v8.1.0.
|
|
28
|
-
* @param {number} correctionMs The correction delay in milliseconds.
|
|
29
|
-
* Positive values advance the audio, while negative values delay it.
|
|
30
|
-
*
|
|
31
|
-
* @platform android
|
|
32
|
-
*/
|
|
33
|
-
setLipSyncCorrection(correctionMs: number): void;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=PlaybackSettingsAPI.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlaybackSettingsAPI.d.ts","sourceRoot":"","sources":["../../../../src/api/playback/PlaybackSettingsAPI.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAElC;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAE9C;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../../../../src/api/playback/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"THEOplayerAdDescription.d.ts","sourceRoot":"","sources":["../../../../../src/api/source/ads/THEOplayerAdDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D;;;;;OAKG;IACH,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE3B;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PlaybackSettingsAPI } from '../../api/playback/PlaybackSettingsAPI';
|
|
2
|
-
export declare class NativePlaybackSettings implements PlaybackSettingsAPI {
|
|
3
|
-
useFastStartup(useFastStartup: boolean): void;
|
|
4
|
-
setLipSyncCorrection(correctionMs: number): void;
|
|
5
|
-
}
|
|
6
|
-
export declare const PlaybackSettings: PlaybackSettingsAPI;
|
|
7
|
-
//# sourceMappingURL=PlaybackSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlaybackSettings.d.ts","sourceRoot":"","sources":["../../../../src/internal/playback/PlaybackSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAM7E,qBAAa,sBAAuB,YAAW,mBAAmB;IAChE,cAAc,CAAC,cAAc,EAAE,OAAO,GAAG,IAAI;IAO7C,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CAOjD;AAED,eAAO,MAAM,gBAAgB,EAAE,mBAAkD,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The playback settings for all instances of THEOplayer.
|
|
3
|
-
*/
|
|
4
|
-
export interface PlaybackSettingsAPI {
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The player starts the playback as soon as the first video data is available related to the initial playback position.
|
|
8
|
-
*
|
|
9
|
-
* <ul>
|
|
10
|
-
* <li>Using this feature will sacrifice the accuracy of the initial seek position
|
|
11
|
-
* <li>This API is in an experimental stage and may be subject to breaking changes.
|
|
12
|
-
* </ul>
|
|
13
|
-
*
|
|
14
|
-
* @experimental
|
|
15
|
-
*
|
|
16
|
-
* @param {boolean} useFastStartup Whether fast startup is enabled.
|
|
17
|
-
*
|
|
18
|
-
* @platform android
|
|
19
|
-
*/
|
|
20
|
-
useFastStartup(useFastStartup: boolean): void;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Sets the lip sync correction delay.
|
|
24
|
-
*
|
|
25
|
-
* This method adjusts the synchronization between audio and video playback for all instances of THEOplayer
|
|
26
|
-
* by applying a specified correction delay.
|
|
27
|
-
*
|
|
28
|
-
* @experimental
|
|
29
|
-
* @since Native THEOplayer SDK v8.1.0.
|
|
30
|
-
* @param {number} correctionMs The correction delay in milliseconds.
|
|
31
|
-
* Positive values advance the audio, while negative values delay it.
|
|
32
|
-
*
|
|
33
|
-
* @platform android
|
|
34
|
-
*/
|
|
35
|
-
setLipSyncCorrection(correctionMs: number): void;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PlaybackSettingsAPI';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { NativeModules, Platform } from 'react-native';
|
|
2
|
-
import { PlaybackSettingsAPI } from '../../api/playback/PlaybackSettingsAPI';
|
|
3
|
-
|
|
4
|
-
const NativePlaybackSettingsModule = NativeModules.THEORCTPlaybackSettingsModule;
|
|
5
|
-
|
|
6
|
-
const TAG = 'PlaybackSettings';
|
|
7
|
-
|
|
8
|
-
export class NativePlaybackSettings implements PlaybackSettingsAPI {
|
|
9
|
-
useFastStartup(useFastStartup: boolean): void {
|
|
10
|
-
if (Platform.OS !== 'android') {
|
|
11
|
-
console.warn(TAG, 'useFastStartup is only available on Android platforms.');
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
NativePlaybackSettingsModule.useFastStartup(useFastStartup);
|
|
15
|
-
}
|
|
16
|
-
setLipSyncCorrection(correctionMs: number): void {
|
|
17
|
-
if (Platform.OS !== 'android') {
|
|
18
|
-
console.warn(TAG, 'setLipSyncCorrect is only available on Android platforms.');
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
NativePlaybackSettingsModule.setLipSyncCorrection(correctionMs);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const PlaybackSettings: PlaybackSettingsAPI = new NativePlaybackSettings();
|