bitmovin-player-react-native 0.44.1-alpha.0 → 1.0.0-alpha.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/.eslintignore +11 -0
- package/.eslintrc.js +7 -0
- package/.gitattributes +3 -0
- package/.prettierignore +11 -0
- package/.ruby-version +1 -0
- package/.swiftlint.yml +171 -0
- package/Brewfile +2 -0
- package/CHANGELOG.md +627 -0
- package/CONTRIBUTING.md +255 -0
- package/TODO.md +0 -0
- package/android/.editorconfig +8 -0
- package/android/build.gradle +78 -75
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +1 -0
- package/android/gradlew +248 -0
- package/android/gradlew.bat +92 -0
- package/android/ktlint.gradle +31 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/ActivityLifecycleListener.kt +51 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/BitmovinCastManagerModule.kt +32 -55
- package/android/src/main/java/com/bitmovin/player/reactnative/BufferModule.kt +33 -45
- package/android/src/main/java/com/bitmovin/player/reactnative/CustomMessageHandlerModule.kt +84 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/DebugModule.kt +6 -14
- package/android/src/main/java/com/bitmovin/player/reactnative/DecoderConfigModule.kt +89 -44
- package/android/src/main/java/com/bitmovin/player/reactnative/DrmModule.kt +80 -99
- package/android/src/main/java/com/bitmovin/player/reactnative/EventSubscription.kt +22 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/FullscreenHandlerModule.kt +100 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/MediaSessionPlaybackManager.kt +5 -5
- package/android/src/main/java/com/bitmovin/player/reactnative/NetworkModule.kt +98 -56
- package/android/src/main/java/com/bitmovin/player/reactnative/OfflineModule.kt +132 -186
- package/android/src/main/java/com/bitmovin/player/reactnative/PlayerAnalyticsModule.kt +37 -36
- package/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt +252 -528
- package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerPackage.kt +11 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt +558 -213
- package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewManager.kt +99 -286
- package/android/src/main/java/com/bitmovin/player/reactnative/ResultWaiter.kt +58 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/SourceModule.kt +77 -151
- package/android/src/main/java/com/bitmovin/player/reactnative/Types.kt +44 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/UuidModule.kt +12 -15
- package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +296 -456
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ListExtension.kt +89 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/MapExtension.kt +95 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/offline/OfflineContentManagerBridge.kt +20 -52
- package/android/src/main/java/com/bitmovin/player/reactnative/ui/CustomMessageHandlerBridge.kt +10 -20
- package/android/src/main/java/com/bitmovin/player/reactnative/ui/FullscreenHandlerBridge.kt +4 -9
- package/app.plugin.js +21 -0
- package/build/BitmovinPlayerReactNative.types.d.ts +18 -0
- package/build/BitmovinPlayerReactNative.types.d.ts.map +1 -0
- package/build/BitmovinPlayerReactNative.types.js +2 -0
- package/build/BitmovinPlayerReactNative.types.js.map +1 -0
- package/build/adaptationConfig.d.ts +18 -0
- package/build/adaptationConfig.d.ts.map +1 -0
- package/build/adaptationConfig.js +2 -0
- package/build/adaptationConfig.js.map +1 -0
- package/build/advertising.d.ts +175 -0
- package/build/advertising.d.ts.map +1 -0
- package/build/advertising.js +37 -0
- package/build/advertising.js.map +1 -0
- package/build/analytics/config.d.ts +194 -0
- package/build/analytics/config.d.ts.map +1 -0
- package/build/analytics/config.js +2 -0
- package/build/analytics/config.js.map +1 -0
- package/build/analytics/index.d.ts +3 -0
- package/build/analytics/index.d.ts.map +1 -0
- package/build/analytics/index.js +3 -0
- package/build/analytics/index.js.map +1 -0
- package/build/analytics/player.d.ts +24 -0
- package/build/analytics/player.d.ts.map +1 -0
- package/build/analytics/player.js +30 -0
- package/build/analytics/player.js.map +1 -0
- package/build/analytics/playerAnalyticsModule.d.ts +13 -0
- package/build/analytics/playerAnalyticsModule.d.ts.map +1 -0
- package/build/analytics/playerAnalyticsModule.js +3 -0
- package/build/analytics/playerAnalyticsModule.js.map +1 -0
- package/build/audioSession.d.ts +33 -0
- package/build/audioSession.d.ts.map +1 -0
- package/build/audioSession.js +21 -0
- package/build/audioSession.js.map +1 -0
- package/build/audioTrack.d.ts +39 -0
- package/build/audioTrack.d.ts.map +1 -0
- package/build/audioTrack.js +2 -0
- package/build/audioTrack.js.map +1 -0
- package/build/bitmovinCastManager.d.ts +58 -0
- package/build/bitmovinCastManager.d.ts.map +1 -0
- package/build/bitmovinCastManager.js +64 -0
- package/build/bitmovinCastManager.js.map +1 -0
- package/build/bufferApi.d.ts +85 -0
- package/build/bufferApi.d.ts.map +1 -0
- package/build/bufferApi.js +60 -0
- package/build/bufferApi.js.map +1 -0
- package/build/bufferConfig.d.ts +42 -0
- package/build/bufferConfig.d.ts.map +1 -0
- package/build/bufferConfig.js +2 -0
- package/build/bufferConfig.js.map +1 -0
- package/build/components/PlayerView/events.d.ts +310 -0
- package/build/components/PlayerView/events.d.ts.map +1 -0
- package/build/components/PlayerView/events.js +2 -0
- package/build/components/PlayerView/events.js.map +1 -0
- package/build/components/PlayerView/index.d.ts +10 -0
- package/build/components/PlayerView/index.d.ts.map +1 -0
- package/build/components/PlayerView/index.js +72 -0
- package/build/components/PlayerView/index.js.map +1 -0
- package/build/components/PlayerView/native.d.ts +30 -0
- package/build/components/PlayerView/native.d.ts.map +1 -0
- package/build/components/PlayerView/native.js +6 -0
- package/build/components/PlayerView/native.js.map +1 -0
- package/build/components/PlayerView/nativeEvents.d.ts +437 -0
- package/build/components/PlayerView/nativeEvents.d.ts.map +1 -0
- package/build/components/PlayerView/nativeEvents.js +2 -0
- package/build/components/PlayerView/nativeEvents.js.map +1 -0
- package/build/components/PlayerView/pictureInPictureConfig.d.ts +22 -0
- package/build/components/PlayerView/pictureInPictureConfig.d.ts.map +1 -0
- package/build/components/PlayerView/pictureInPictureConfig.js +2 -0
- package/build/components/PlayerView/pictureInPictureConfig.js.map +1 -0
- package/build/components/PlayerView/playerViewConfig.d.ts +111 -0
- package/build/components/PlayerView/playerViewConfig.d.ts.map +1 -0
- package/build/components/PlayerView/playerViewConfig.js +51 -0
- package/build/components/PlayerView/playerViewConfig.js.map +1 -0
- package/build/components/PlayerView/properties.d.ts +61 -0
- package/build/components/PlayerView/properties.d.ts.map +1 -0
- package/build/components/PlayerView/properties.js +2 -0
- package/build/components/PlayerView/properties.js.map +1 -0
- package/build/components/index.d.ts +5 -0
- package/build/components/index.d.ts.map +1 -0
- package/build/components/index.js +5 -0
- package/build/components/index.js.map +1 -0
- package/build/debug.d.ts +46 -0
- package/build/debug.d.ts.map +1 -0
- package/build/debug.js +52 -0
- package/build/debug.js.map +1 -0
- package/build/decoder/decoderConfig.d.ts +96 -0
- package/build/decoder/decoderConfig.d.ts.map +1 -0
- package/build/decoder/decoderConfig.js +6 -0
- package/build/decoder/decoderConfig.js.map +1 -0
- package/build/decoder/decoderConfigModule.d.ts +14 -0
- package/build/decoder/decoderConfigModule.d.ts.map +1 -0
- package/build/decoder/decoderConfigModule.js +31 -0
- package/build/decoder/decoderConfigModule.js.map +1 -0
- package/build/decoder/index.d.ts +26 -0
- package/build/decoder/index.d.ts.map +1 -0
- package/build/decoder/index.js +50 -0
- package/build/decoder/index.js.map +1 -0
- package/build/drm/drmModule.d.ts +55 -0
- package/build/drm/drmModule.d.ts.map +1 -0
- package/build/drm/drmModule.js +3 -0
- package/build/drm/drmModule.js.map +1 -0
- package/build/drm/fairplayConfig.d.ts +91 -0
- package/build/drm/fairplayConfig.d.ts.map +1 -0
- package/build/drm/fairplayConfig.js +2 -0
- package/build/drm/fairplayConfig.js.map +1 -0
- package/build/drm/index.d.ts +112 -0
- package/build/drm/index.d.ts.map +1 -0
- package/build/drm/index.js +191 -0
- package/build/drm/index.js.map +1 -0
- package/build/drm/widevineConfig.d.ts +58 -0
- package/build/drm/widevineConfig.d.ts.map +1 -0
- package/build/drm/widevineConfig.js +2 -0
- package/build/drm/widevineConfig.js.map +1 -0
- package/build/events.d.ts +692 -0
- package/build/events.d.ts.map +1 -0
- package/build/events.js +2 -0
- package/build/events.js.map +1 -0
- package/build/hooks/index.d.ts +2 -0
- package/build/hooks/index.d.ts.map +1 -0
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -0
- package/build/hooks/usePlayer.d.ts +8 -0
- package/build/hooks/usePlayer.d.ts.map +1 -0
- package/build/hooks/usePlayer.js +10 -0
- package/build/hooks/usePlayer.js.map +1 -0
- package/build/hooks/useProxy.d.ts +18 -0
- package/build/hooks/useProxy.d.ts.map +1 -0
- package/build/hooks/useProxy.js +16 -0
- package/build/hooks/useProxy.js.map +1 -0
- package/build/index.d.ts +32 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +32 -0
- package/build/index.js.map +1 -0
- package/build/liveConfig.d.ts +13 -0
- package/build/liveConfig.d.ts.map +1 -0
- package/build/liveConfig.js +2 -0
- package/build/liveConfig.js.map +1 -0
- package/build/media.d.ts +85 -0
- package/build/media.d.ts.map +1 -0
- package/build/media.js +2 -0
- package/build/media.js.map +1 -0
- package/build/mediaControlConfig.d.ts +62 -0
- package/build/mediaControlConfig.d.ts.map +1 -0
- package/build/mediaControlConfig.js +2 -0
- package/build/mediaControlConfig.js.map +1 -0
- package/build/mediaTrackRole.d.ts +28 -0
- package/build/mediaTrackRole.d.ts.map +1 -0
- package/build/mediaTrackRole.js +2 -0
- package/build/mediaTrackRole.js.map +1 -0
- package/build/modules/AudioSessionModule.d.ts +8 -0
- package/build/modules/AudioSessionModule.d.ts.map +1 -0
- package/build/modules/AudioSessionModule.js +7 -0
- package/build/modules/AudioSessionModule.js.map +1 -0
- package/build/modules/BitmovinCastManagerModule.d.ts +11 -0
- package/build/modules/BitmovinCastManagerModule.d.ts.map +1 -0
- package/build/modules/BitmovinCastManagerModule.js +3 -0
- package/build/modules/BitmovinCastManagerModule.js.map +1 -0
- package/build/modules/BufferModule.d.ts +16 -0
- package/build/modules/BufferModule.d.ts.map +1 -0
- package/build/modules/BufferModule.js +3 -0
- package/build/modules/BufferModule.js.map +1 -0
- package/build/modules/DebugModule.d.ts +8 -0
- package/build/modules/DebugModule.d.ts.map +1 -0
- package/build/modules/DebugModule.js +3 -0
- package/build/modules/DebugModule.js.map +1 -0
- package/build/modules/PlayerModule.d.ts +188 -0
- package/build/modules/PlayerModule.d.ts.map +1 -0
- package/build/modules/PlayerModule.js +3 -0
- package/build/modules/PlayerModule.js.map +1 -0
- package/build/modules/SourceModule.d.ts +51 -0
- package/build/modules/SourceModule.d.ts.map +1 -0
- package/build/modules/SourceModule.js +3 -0
- package/build/modules/SourceModule.js.map +1 -0
- package/build/modules/UuidModule.d.ts +8 -0
- package/build/modules/UuidModule.d.ts.map +1 -0
- package/build/modules/UuidModule.js +3 -0
- package/build/modules/UuidModule.js.map +1 -0
- package/build/nativeInstance.d.ts +49 -0
- package/build/nativeInstance.d.ts.map +1 -0
- package/build/nativeInstance.js +20 -0
- package/build/nativeInstance.js.map +1 -0
- package/build/network/index.d.ts +50 -0
- package/build/network/index.d.ts.map +1 -0
- package/build/network/index.js +102 -0
- package/build/network/index.js.map +1 -0
- package/build/network/networkConfig.d.ts +151 -0
- package/build/network/networkConfig.d.ts.map +1 -0
- package/build/network/networkConfig.js +21 -0
- package/build/network/networkConfig.js.map +1 -0
- package/build/network/networkModule.d.ts +29 -0
- package/build/network/networkModule.d.ts.map +1 -0
- package/build/network/networkModule.js +3 -0
- package/build/network/networkModule.js.map +1 -0
- package/build/offline/index.d.ts +8 -0
- package/build/offline/index.d.ts.map +1 -0
- package/build/offline/index.js +8 -0
- package/build/offline/index.js.map +1 -0
- package/build/offline/offlineContentConfig.d.ts +18 -0
- package/build/offline/offlineContentConfig.d.ts.map +1 -0
- package/build/offline/offlineContentConfig.js +2 -0
- package/build/offline/offlineContentConfig.js.map +1 -0
- package/build/offline/offlineContentManager.d.ts +90 -0
- package/build/offline/offlineContentManager.d.ts.map +1 -0
- package/build/offline/offlineContentManager.js +177 -0
- package/build/offline/offlineContentManager.js.map +1 -0
- package/build/offline/offlineContentManagerListener.d.ts +174 -0
- package/build/offline/offlineContentManagerListener.d.ts.map +1 -0
- package/build/offline/offlineContentManagerListener.js +17 -0
- package/build/offline/offlineContentManagerListener.js.map +1 -0
- package/build/offline/offlineContentOptions.d.ts +29 -0
- package/build/offline/offlineContentOptions.d.ts.map +1 -0
- package/build/offline/offlineContentOptions.js +2 -0
- package/build/offline/offlineContentOptions.js.map +1 -0
- package/build/offline/offlineDownloadRequest.d.ts +19 -0
- package/build/offline/offlineDownloadRequest.d.ts.map +1 -0
- package/build/offline/offlineDownloadRequest.js +2 -0
- package/build/offline/offlineDownloadRequest.js.map +1 -0
- package/build/offline/offlineModule.d.ts +32 -0
- package/build/offline/offlineModule.d.ts.map +1 -0
- package/build/offline/offlineModule.js +3 -0
- package/build/offline/offlineModule.js.map +1 -0
- package/build/offline/offlineSourceOptions.d.ts +12 -0
- package/build/offline/offlineSourceOptions.d.ts.map +1 -0
- package/build/offline/offlineSourceOptions.js +2 -0
- package/build/offline/offlineSourceOptions.js.map +1 -0
- package/build/offline/offlineState.d.ts +23 -0
- package/build/offline/offlineState.d.ts.map +1 -0
- package/build/offline/offlineState.js +24 -0
- package/build/offline/offlineState.js.map +1 -0
- package/build/playbackConfig.d.ts +88 -0
- package/build/playbackConfig.d.ts.map +1 -0
- package/build/playbackConfig.js +2 -0
- package/build/playbackConfig.js.map +1 -0
- package/build/player.d.ts +308 -0
- package/build/player.d.ts.map +1 -0
- package/build/player.js +445 -0
- package/build/player.js.map +1 -0
- package/build/playerConfig.d.ts +83 -0
- package/build/playerConfig.d.ts.map +1 -0
- package/build/playerConfig.js +2 -0
- package/build/playerConfig.js.map +1 -0
- package/build/remoteControlConfig.d.ts +38 -0
- package/build/remoteControlConfig.d.ts.map +1 -0
- package/build/remoteControlConfig.js +2 -0
- package/build/remoteControlConfig.js.map +1 -0
- package/build/source.d.ts +216 -0
- package/build/source.d.ts.map +1 -0
- package/build/source.js +167 -0
- package/build/source.js.map +1 -0
- package/build/styleConfig.d.ts +120 -0
- package/build/styleConfig.d.ts.map +1 -0
- package/build/styleConfig.js +38 -0
- package/build/styleConfig.js.map +1 -0
- package/build/subtitleFormat.d.ts +27 -0
- package/build/subtitleFormat.d.ts.map +1 -0
- package/build/subtitleFormat.js +28 -0
- package/build/subtitleFormat.js.map +1 -0
- package/build/subtitleTrack.d.ts +55 -0
- package/build/subtitleTrack.d.ts.map +1 -0
- package/build/subtitleTrack.js +2 -0
- package/build/subtitleTrack.js.map +1 -0
- package/build/thumbnail.d.ts +38 -0
- package/build/thumbnail.d.ts.map +1 -0
- package/build/thumbnail.js +2 -0
- package/build/thumbnail.js.map +1 -0
- package/build/tweaksConfig.d.ts +197 -0
- package/build/tweaksConfig.d.ts.map +1 -0
- package/build/tweaksConfig.js +25 -0
- package/build/tweaksConfig.js.map +1 -0
- package/build/ui/customMessageHandlerModule.d.ts +27 -0
- package/build/ui/customMessageHandlerModule.d.ts.map +1 -0
- package/build/ui/customMessageHandlerModule.js +3 -0
- package/build/ui/customMessageHandlerModule.js.map +1 -0
- package/build/ui/custommessagehandler.d.ts +56 -0
- package/build/ui/custommessagehandler.d.ts.map +1 -0
- package/build/ui/custommessagehandler.js +54 -0
- package/build/ui/custommessagehandler.js.map +1 -0
- package/build/ui/custommessagehandlerbridge.d.ts +33 -0
- package/build/ui/custommessagehandlerbridge.d.ts.map +1 -0
- package/build/ui/custommessagehandlerbridge.js +72 -0
- package/build/ui/custommessagehandlerbridge.js.map +1 -0
- package/build/ui/custommessagesender.d.ts +5 -0
- package/build/ui/custommessagesender.d.ts.map +1 -0
- package/build/ui/custommessagesender.js +2 -0
- package/build/ui/custommessagesender.js.map +1 -0
- package/build/ui/fullscreenHandlerModule.d.ts +20 -0
- package/build/ui/fullscreenHandlerModule.d.ts.map +1 -0
- package/build/ui/fullscreenHandlerModule.js +3 -0
- package/build/ui/fullscreenHandlerModule.js.map +1 -0
- package/build/ui/fullscreenhandler.d.ts +18 -0
- package/build/ui/fullscreenhandler.d.ts.map +1 -0
- package/build/ui/fullscreenhandler.js +2 -0
- package/build/ui/fullscreenhandler.js.map +1 -0
- package/build/ui/fullscreenhandlerbridge.d.ts +26 -0
- package/build/ui/fullscreenhandlerbridge.d.ts.map +1 -0
- package/build/ui/fullscreenhandlerbridge.js +67 -0
- package/build/ui/fullscreenhandlerbridge.js.map +1 -0
- package/build/ui/index.d.ts +3 -0
- package/build/ui/index.d.ts.map +1 -0
- package/build/ui/index.js +3 -0
- package/build/ui/index.js.map +1 -0
- package/expo-module.config.json +40 -0
- package/ios/AppLifecycleDelegate.swift +25 -0
- package/ios/AudioSessionModule.swift +14 -40
- package/ios/BitmovinCastManagerModule.swift +30 -69
- package/ios/BufferModule.swift +26 -62
- package/ios/CustomMessageHandlerBridge.swift +11 -18
- package/ios/CustomMessageHandlerModule.swift +61 -63
- package/ios/DebugModule.swift +6 -27
- package/ios/DrmModule.swift +105 -379
- package/ios/Event+JSON.swift +1 -0
- package/ios/FullscreenHandlerBridge.swift +12 -5
- package/ios/FullscreenHandlerModule.swift +73 -57
- package/ios/LockedBox.swift +21 -0
- package/ios/ModuleRegistry+Generics.swift +11 -0
- package/ios/NetworkModule.swift +78 -82
- package/ios/OfflineContentManagerBridge.swift +11 -38
- package/ios/OfflineModule.swift +136 -454
- package/ios/PlayerAnalyticsModule.swift +24 -52
- package/ios/PlayerModule.swift +192 -770
- package/ios/RCTConvert+BitmovinPlayer.swift +38 -312
- package/ios/RNBitmovinPlayer.h +1 -8
- package/ios/RNBitmovinPlayer.podspec +47 -0
- package/ios/RNPlayerView.swift +600 -77
- package/ios/RNPlayerViewManager.swift +96 -210
- package/ios/Registry.swift +2 -2
- package/ios/ResultWaiter.swift +66 -0
- package/ios/SourceModule.swift +104 -223
- package/ios/UuidModule.swift +9 -18
- package/package.json +67 -71
- package/plugin/build/FeatureFlags.d.ts +24 -0
- package/plugin/build/FeatureFlags.js +2 -0
- package/plugin/build/index.d.ts +7 -0
- package/plugin/build/index.js +10 -0
- package/plugin/build/withAppGradleDependencies.d.ts +7 -0
- package/plugin/build/withAppGradleDependencies.js +49 -0
- package/plugin/build/withBitmovinAndroidConfig.d.ts +7 -0
- package/plugin/build/withBitmovinAndroidConfig.js +159 -0
- package/plugin/build/withBitmovinConfig.d.ts +7 -0
- package/plugin/build/withBitmovinConfig.js +21 -0
- package/plugin/build/withBitmovinIosConfig.d.ts +7 -0
- package/plugin/build/withBitmovinIosConfig.js +53 -0
- package/plugin/src/FeatureFlags.ts +21 -0
- package/plugin/src/index.ts +9 -0
- package/plugin/src/withAppGradleDependencies.ts +80 -0
- package/plugin/src/withBitmovinAndroidConfig.ts +224 -0
- package/plugin/src/withBitmovinConfig.ts +24 -0
- package/plugin/src/withBitmovinIosConfig.ts +71 -0
- package/plugin/tsconfig.json +9 -0
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/prettier.config.js +7 -0
- package/scripts/format-android.sh +2 -0
- package/scripts/format-swift.sh +3 -0
- package/scripts/lint-android.sh +2 -0
- package/scripts/lint-swift.sh +3 -0
- package/scripts/pre-commit.sh +14 -0
- package/scripts/setup-hooks.sh +58 -0
- package/src/BitmovinPlayerReactNative.types.ts +19 -0
- package/src/adaptationConfig.ts +1 -1
- package/src/advertising.ts +1 -1
- package/src/analytics/config.ts +4 -4
- package/src/analytics/player.ts +4 -6
- package/src/analytics/playerAnalyticsModule.ts +19 -0
- package/src/audioSession.ts +4 -6
- package/src/audioTrack.ts +1 -1
- package/src/bitmovinCastManager.ts +14 -10
- package/src/bufferApi.ts +1 -3
- package/src/bufferConfig.ts +2 -2
- package/src/components/PlayerView/events.ts +92 -94
- package/src/components/PlayerView/index.tsx +109 -159
- package/src/components/PlayerView/native.ts +24 -11
- package/src/components/PlayerView/nativeEvents.ts +113 -94
- package/src/components/PlayerView/pictureInPictureConfig.ts +1 -1
- package/src/components/PlayerView/playerViewConfig.ts +4 -8
- package/src/components/PlayerView/properties.ts +23 -22
- package/src/debug.ts +1 -3
- package/src/decoder/decoderConfig.ts +3 -3
- package/src/decoder/decoderConfigModule.ts +62 -0
- package/src/decoder/index.ts +32 -16
- package/src/drm/drmModule.ts +84 -0
- package/src/drm/fairplayConfig.ts +1 -1
- package/src/drm/index.ts +130 -40
- package/src/drm/widevineConfig.ts +5 -5
- package/src/events.ts +47 -41
- package/src/hooks/useProxy.ts +13 -20
- package/src/mediaControlConfig.ts +1 -1
- package/src/modules/AudioSessionModule.ts +13 -0
- package/src/modules/BitmovinCastManagerModule.ts +14 -0
- package/src/modules/BufferModule.ts +18 -0
- package/src/modules/DebugModule.ts +9 -0
- package/src/modules/PlayerModule.ts +251 -0
- package/src/modules/SourceModule.ts +74 -0
- package/src/modules/UuidModule.ts +9 -0
- package/src/nativeInstance.ts +3 -3
- package/src/network/index.ts +42 -15
- package/src/network/networkConfig.ts +3 -3
- package/src/network/networkModule.ts +51 -0
- package/src/offline/offlineContentConfig.ts +1 -1
- package/src/offline/offlineContentManager.ts +15 -50
- package/src/offline/offlineContentManagerListener.ts +20 -23
- package/src/offline/offlineContentOptions.ts +2 -2
- package/src/offline/offlineDownloadRequest.ts +1 -1
- package/src/offline/offlineModule.ts +46 -0
- package/src/offline/offlineSourceOptions.ts +2 -2
- package/src/offline/offlineState.ts +1 -1
- package/src/playbackConfig.ts +5 -6
- package/src/player.ts +53 -48
- package/src/source.ts +15 -14
- package/src/styleConfig.ts +5 -5
- package/src/subtitleFormat.ts +5 -5
- package/src/subtitleTrack.ts +1 -1
- package/src/tweaksConfig.ts +16 -16
- package/src/ui/customMessageHandlerModule.ts +46 -0
- package/src/ui/custommessagehandlerbridge.ts +45 -18
- package/src/ui/fullscreenHandlerModule.ts +35 -0
- package/src/ui/fullscreenhandlerbridge.ts +35 -15
- package/tsconfig.json +9 -0
- package/typedoc.json +23 -0
- package/RNBitmovinPlayer.podspec +0 -26
- package/android/src/main/java/com/bitmovin/player/reactnative/BitmovinBaseModule.kt +0 -114
- package/android/src/main/java/com/bitmovin/player/reactnative/EventRelay.kt +0 -47
- package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt +0 -48
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReactContextExtension.kt +0 -24
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReadableArray.kt +0 -20
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReadableMap.kt +0 -15
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReadableMapExtension.kt +0 -57
- package/android/src/main/java/com/bitmovin/player/reactnative/extensions/WritableMap.kt +0 -27
- package/android/src/main/java/com/bitmovin/player/reactnative/ui/CustomMessageHandlerModule.kt +0 -86
- package/android/src/main/java/com/bitmovin/player/reactnative/ui/FullscreenHandlerModule.kt +0 -78
- package/ios/AudioSessionModule.m +0 -10
- package/ios/BitmovinCastManagerModule.m +0 -14
- package/ios/BufferModule.m +0 -8
- package/ios/CustomMessageHandlerModule.m +0 -10
- package/ios/DebugModule.m +0 -7
- package/ios/DrmModule.m +0 -16
- package/ios/FullscreenHandlerModule.m +0 -10
- package/ios/NetworkModule.m +0 -10
- package/ios/OfflineModule.m +0 -19
- package/ios/PlayerAnalyticsModule.m +0 -8
- package/ios/PlayerModule.m +0 -130
- package/ios/PreprocessHttpRequestDelegateBridge.swift +0 -30
- package/ios/RCTBridge+Generics.swift +0 -6
- package/ios/RNBitmovinPlayer.xcodeproj/project.pbxproj +0 -303
- package/ios/RNPlayerView+PlayerListener.swift +0 -229
- package/ios/RNPlayerView+UserInterfaceListener.swift +0 -35
- package/ios/RNPlayerViewManager.m +0 -79
- package/ios/SourceModule.m +0 -42
- package/ios/UuidModule.m +0 -9
- package/lib/index.d.mts +0 -4303
- package/lib/index.d.ts +0 -4303
- package/lib/index.js +0 -1895
- package/lib/index.mjs +0 -1836
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MediaTrackRole } from './mediaTrackRole';
|
|
2
|
+
import { SubtitleFormat } from './subtitleFormat';
|
|
3
|
+
/**
|
|
4
|
+
* Describes a subtitle track.
|
|
5
|
+
* @remarks Platform: Android, iOS, tvOS
|
|
6
|
+
*/
|
|
7
|
+
export interface SubtitleTrack {
|
|
8
|
+
/**
|
|
9
|
+
* The URL to the timed file, e.g. WebVTT file.
|
|
10
|
+
*/
|
|
11
|
+
url?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The label for this track.
|
|
14
|
+
*/
|
|
15
|
+
label?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The unique identifier for this track. If no value is provided, a random UUIDv4 will be generated for it.
|
|
18
|
+
*/
|
|
19
|
+
identifier?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the file format to be used by this track.
|
|
22
|
+
*/
|
|
23
|
+
format?: SubtitleFormat;
|
|
24
|
+
/**
|
|
25
|
+
* If set to true, this track would be considered as default. Default is `false`.
|
|
26
|
+
*/
|
|
27
|
+
isDefault?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Tells if a subtitle track is forced. If set to `true` it means that the player should automatically
|
|
30
|
+
* select and switch this subtitle according to the selected audio language. Forced subtitles do
|
|
31
|
+
* not appear in `Player.getAvailableSubtitles`.
|
|
32
|
+
*
|
|
33
|
+
* Default is `false`.
|
|
34
|
+
*/
|
|
35
|
+
isForced?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The IETF BCP 47 language tag associated with this track, e.g. `pt`, `en`, `es` etc.
|
|
38
|
+
*/
|
|
39
|
+
language?: string;
|
|
40
|
+
/**
|
|
41
|
+
* An array of {@link MediaTrackRole} objects, each describing a specific role or characteristic of the subtitle track.
|
|
42
|
+
* This property provides a unified way to understand track purposes (e.g., for accessibility) across platforms.
|
|
43
|
+
*/
|
|
44
|
+
roles?: MediaTrackRole[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A subtitle track that can be added to `SourceConfig.subtitleTracks`.
|
|
48
|
+
*/
|
|
49
|
+
export interface SideLoadedSubtitleTrack extends SubtitleTrack {
|
|
50
|
+
url: string;
|
|
51
|
+
label: string;
|
|
52
|
+
language: string;
|
|
53
|
+
format: SubtitleFormat;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=subtitleTrack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtitleTrack.d.ts","sourceRoot":"","sources":["../src/subtitleTrack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtitleTrack.js","sourceRoot":"","sources":["../src/subtitleTrack.ts"],"names":[],"mappings":"","sourcesContent":["import { MediaTrackRole } from './mediaTrackRole';\nimport { SubtitleFormat } from './subtitleFormat';\n\n/**\n * Describes a subtitle track.\n * @remarks Platform: Android, iOS, tvOS\n */\nexport interface SubtitleTrack {\n /**\n * The URL to the timed file, e.g. WebVTT file.\n */\n url?: string;\n /**\n * The label for this track.\n */\n label?: string;\n /**\n * The unique identifier for this track. If no value is provided, a random UUIDv4 will be generated for it.\n */\n identifier?: string;\n /**\n * Specifies the file format to be used by this track.\n */\n format?: SubtitleFormat;\n /**\n * If set to true, this track would be considered as default. Default is `false`.\n */\n isDefault?: boolean;\n /**\n * Tells if a subtitle track is forced. If set to `true` it means that the player should automatically\n * select and switch this subtitle according to the selected audio language. Forced subtitles do\n * not appear in `Player.getAvailableSubtitles`.\n *\n * Default is `false`.\n */\n isForced?: boolean;\n /**\n * The IETF BCP 47 language tag associated with this track, e.g. `pt`, `en`, `es` etc.\n */\n language?: string;\n /**\n * An array of {@link MediaTrackRole} objects, each describing a specific role or characteristic of the subtitle track.\n * This property provides a unified way to understand track purposes (e.g., for accessibility) across platforms.\n */\n roles?: MediaTrackRole[];\n}\n\n/**\n * A subtitle track that can be added to `SourceConfig.subtitleTracks`.\n */\nexport interface SideLoadedSubtitleTrack extends SubtitleTrack {\n url: string;\n label: string;\n language: string;\n format: SubtitleFormat;\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a VTT thumbnail.
|
|
3
|
+
*/
|
|
4
|
+
export interface Thumbnail {
|
|
5
|
+
/**
|
|
6
|
+
* The start time of the thumbnail.
|
|
7
|
+
*/
|
|
8
|
+
start: number;
|
|
9
|
+
/**
|
|
10
|
+
* The end time of the thumbnail.
|
|
11
|
+
*/
|
|
12
|
+
end: number;
|
|
13
|
+
/**
|
|
14
|
+
* The raw cue data.
|
|
15
|
+
*/
|
|
16
|
+
text: string;
|
|
17
|
+
/**
|
|
18
|
+
* The URL of the spritesheet
|
|
19
|
+
*/
|
|
20
|
+
url: string;
|
|
21
|
+
/**
|
|
22
|
+
* The horizontal offset of the thumbnail in its spritesheet
|
|
23
|
+
*/
|
|
24
|
+
x: number;
|
|
25
|
+
/**
|
|
26
|
+
* The vertical offset of the thumbnail in its spritesheet
|
|
27
|
+
*/
|
|
28
|
+
y: number;
|
|
29
|
+
/**
|
|
30
|
+
* The width of the thumbnail
|
|
31
|
+
*/
|
|
32
|
+
width: number;
|
|
33
|
+
/**
|
|
34
|
+
* The height of the thumbnail
|
|
35
|
+
*/
|
|
36
|
+
height: number;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=thumbnail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thumbnail.d.ts","sourceRoot":"","sources":["../src/thumbnail.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thumbnail.js","sourceRoot":"","sources":["../src/thumbnail.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a VTT thumbnail.\n */\nexport interface Thumbnail {\n /**\n * The start time of the thumbnail.\n */\n start: number;\n /**\n * The end time of the thumbnail.\n */\n end: number;\n /**\n * The raw cue data.\n */\n text: string;\n /**\n * The URL of the spritesheet\n */\n url: string;\n /**\n * The horizontal offset of the thumbnail in its spritesheet\n */\n x: number;\n /**\n * The vertical offset of the thumbnail in its spritesheet\n */\n y: number;\n /**\n * The width of the thumbnail\n */\n width: number;\n /**\n * The height of the thumbnail\n */\n height: number;\n}\n"]}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When switching the video quality, the video decoder's configuration might change
|
|
3
|
+
* as the player can't always know if the codec supports such configuration change, it destroys and recreates it.
|
|
4
|
+
* This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow.
|
|
5
|
+
*
|
|
6
|
+
* If a codec is know to support a given configuration change without issues,
|
|
7
|
+
* the configuration can be added to the `TweaksConfig.forceReuseVideoCodecReasons`
|
|
8
|
+
* to always reuse the video codec and avoid the black screen.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ForceReuseVideoCodecReason {
|
|
11
|
+
/**
|
|
12
|
+
* The new video quality color information is not compatible.
|
|
13
|
+
*/
|
|
14
|
+
ColorInfoMismatch = "ColorInfoMismatch",
|
|
15
|
+
/**
|
|
16
|
+
* The new video quality exceed the decoder's configured maximum sample size.
|
|
17
|
+
*/
|
|
18
|
+
MaxInputSizeExceeded = "MaxInputSizeExceeded",
|
|
19
|
+
/**
|
|
20
|
+
* The new video quality exceed the decoder's configured maximum resolution.
|
|
21
|
+
*/
|
|
22
|
+
MaxResolutionExceeded = "MaxResolutionExceeded"
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* This configuration is used as an incubator for experimental features. Tweaks are not officially
|
|
26
|
+
* supported and are not guaranteed to be stable, i.e. their naming, functionality and API can
|
|
27
|
+
* change at any time within the tweaks or when being promoted to an official feature and moved
|
|
28
|
+
* into its final configuration namespace.
|
|
29
|
+
*/
|
|
30
|
+
export interface TweaksConfig {
|
|
31
|
+
/**
|
|
32
|
+
* The frequency in seconds `onTimeChanged` is called with `TimeChangedEvent`s.
|
|
33
|
+
*
|
|
34
|
+
* Default value in iOS is `1.0`.
|
|
35
|
+
* Default value in Android is `0.2`.
|
|
36
|
+
*
|
|
37
|
+
* @remarks Platform: iOS, Android
|
|
38
|
+
*/
|
|
39
|
+
timeChangedInterval?: number;
|
|
40
|
+
/**
|
|
41
|
+
* If enabled, HLS playlists will be parsed and additional features and events are enabled. This includes:
|
|
42
|
+
*
|
|
43
|
+
* - MetadataEvents carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`
|
|
44
|
+
* - MetadataParsedEvents carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`
|
|
45
|
+
* - DrmDataParsedEvents when a `#EXT-X-KEY` is found
|
|
46
|
+
* - `Player.availableVideoQualities` includes additional information
|
|
47
|
+
* - Automatic retries when HLS playlist requests failed with non-2xx HTTP status code
|
|
48
|
+
*
|
|
49
|
+
* Default is false.
|
|
50
|
+
*
|
|
51
|
+
* @remarks Platform: iOS
|
|
52
|
+
*/
|
|
53
|
+
isNativeHlsParsingEnabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If enabled, playlists will be downloaded by the Bitmovin Player SDK instead of AVFoundation.
|
|
56
|
+
* This enables additional features and events, like:
|
|
57
|
+
*
|
|
58
|
+
* - DownloadFinishedEvents for playlist downloads.
|
|
59
|
+
* - SourceWarningEvents when no `#EXT-X-PLAYLIST-TYPE` is found If set to false, enabling
|
|
60
|
+
* nativeHlsParsingEnabled won’t have any effect.
|
|
61
|
+
*
|
|
62
|
+
* Default is true.
|
|
63
|
+
*
|
|
64
|
+
* @remarks Platform: iOS
|
|
65
|
+
*/
|
|
66
|
+
isCustomHlsLoadingEnabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The threshold which will be applied when seeking to the end in seconds. This value will be used
|
|
69
|
+
* to calculate the maximum seekable time when calling `player.seek(time:)` or `player.playlist.seek(source:time:)`,
|
|
70
|
+
* so the maximum value will be duration - seekToEndThreshold.
|
|
71
|
+
*
|
|
72
|
+
* This is useful if the duration of the segments does not match the duration specified in the
|
|
73
|
+
* manifest. In this case, if we try to seek to the end, AVPlayer could get stuck and might stall
|
|
74
|
+
* forever Therefore increasing this value could help.
|
|
75
|
+
*
|
|
76
|
+
* Default is 0.5.
|
|
77
|
+
*
|
|
78
|
+
* @remarks Platform: iOS
|
|
79
|
+
*/
|
|
80
|
+
seekToEndThreshold?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Specifies the player behaviour when `Player.play` is called. Default is 'relaxed'.
|
|
83
|
+
*
|
|
84
|
+
* - 'relaxed': Starts playback when enough media data is buffered and continuous playback without stalling can be ensured. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.
|
|
85
|
+
* - 'aggressive': When the buffer is not empty, this setting will cause the player to start playback of available media immediately. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.
|
|
86
|
+
*
|
|
87
|
+
* @remarks Platform: iOS
|
|
88
|
+
*/
|
|
89
|
+
playbackStartBehaviour?: 'relaxed' | 'aggressive';
|
|
90
|
+
/**
|
|
91
|
+
* Specifies the player behaviour when stalling should be exited. Default is 'relaxed'.
|
|
92
|
+
*
|
|
93
|
+
* - 'relaxed': The player will wait until the buffer is filled that it can, most likely, ensure continuous playback without another stalling right after playback continued.
|
|
94
|
+
* - 'aggressive': The player will try to unstall as soon as some media data became available and will start playback of this media immediately.
|
|
95
|
+
*
|
|
96
|
+
* @remarks Platform: iOS
|
|
97
|
+
*/
|
|
98
|
+
unstallingBehaviour?: 'relaxed' | 'aggressive';
|
|
99
|
+
/**
|
|
100
|
+
* Constantly aggregated and weighted bandwidth samples are summed up to this weight limit to calculate an bandwidth estimation. Remaining samples (i.e. that would lead to exceeding the limit) are dropped from memory as they are not relevant anymore.
|
|
101
|
+
* Default is 2000.
|
|
102
|
+
*
|
|
103
|
+
* @remarks Platform: Android
|
|
104
|
+
*/
|
|
105
|
+
bandwidthEstimateWeightLimit?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Some devices have an incorrect implementation of MediaCodec.setOutputSurface. This leads to failure when the surface changes. To prevent failure, the codec will be released and re-instantiated in those scenarios.
|
|
108
|
+
*
|
|
109
|
+
* @remarks Platform: Android
|
|
110
|
+
*/
|
|
111
|
+
devicesThatRequireSurfaceWorkaround?: {
|
|
112
|
+
/**
|
|
113
|
+
* A device name as reported by Build.DEVICE.
|
|
114
|
+
*
|
|
115
|
+
* @see Build.DEVICE: https://developer.android.com/reference/kotlin/android/os/Build.html#DEVICE--
|
|
116
|
+
*/
|
|
117
|
+
deviceNames?: string[];
|
|
118
|
+
/**
|
|
119
|
+
* A model name as reported by Build.MODEL.
|
|
120
|
+
*
|
|
121
|
+
* @see Build.MODEL: https://developer.android.com/reference/kotlin/android/os/Build.html#MODEL--
|
|
122
|
+
*/
|
|
123
|
+
modelNames?: string[];
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Specifies if the language property on DASH Representations, HLS Renditions and SmoothStreaming QualityLevels is normalized.
|
|
127
|
+
* If enabled, language properties are normalized to IETF BCP 47 language tags. Default is true.
|
|
128
|
+
*
|
|
129
|
+
* Examples:
|
|
130
|
+
* - "ENG" is normalized to "en"
|
|
131
|
+
* - "en_us" is normalized to "en-us"
|
|
132
|
+
* - "en-US-x-lvariant-POSIX" is normalized to "en-us-posix"
|
|
133
|
+
*
|
|
134
|
+
* @remarks Platform: Android
|
|
135
|
+
*/
|
|
136
|
+
languagePropertyNormalization?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* The interval in which dynamic DASH windows are updated locally. I.e. The rate by which the
|
|
139
|
+
* playback window is moved forward on the timeline.
|
|
140
|
+
*
|
|
141
|
+
* @remarks Platform: Android
|
|
142
|
+
*/
|
|
143
|
+
localDynamicDashWindowUpdateInterval?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Specifies whether a DRM session should be used for clear tracks of type video and audio. Using
|
|
146
|
+
* DRM sessions for clear content avoids the recreation of decoders when transitioning between clear
|
|
147
|
+
* and encrypted sections of content. Default is false.
|
|
148
|
+
*
|
|
149
|
+
* @remarks Platform: Android
|
|
150
|
+
*/
|
|
151
|
+
useDrmSessionForClearPeriods?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Specifies whether a DRM session should be used for clear tracks of type video and audio in a clear
|
|
154
|
+
* source that follows after a DRM protected source. In addition, a DRM session will be used for clear
|
|
155
|
+
* periods in a DRM protected source. Using DRM sessions for clear content avoids the recreation of
|
|
156
|
+
* decoders when transitioning between clear and encrypted sections of content. Default is false.
|
|
157
|
+
*
|
|
158
|
+
* @remarks Platform: Android
|
|
159
|
+
*/
|
|
160
|
+
useDrmSessionForClearSources?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Specifies if the player should always fall back to an extractor matching the file type, if no
|
|
163
|
+
* matching extractor was found. If the fallback is applied, this will ignore potential incompatibilities
|
|
164
|
+
* with streams and thus can result in unstable or failing playback.
|
|
165
|
+
*
|
|
166
|
+
* @remarks Platform: Android
|
|
167
|
+
*/
|
|
168
|
+
useFiletypeExtractorFallbackForHls?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Determines whether `AVKit` should update Now Playing information automatically when using System UI.
|
|
171
|
+
*
|
|
172
|
+
* - If set to `false`, the automatic updates of Now Playing Info sent by `AVKit` are disabled.
|
|
173
|
+
* This prevents interference with manual updates you may want to perform.
|
|
174
|
+
* - If set to `true`, the default behaviour is maintained, allowing `AVKit` to handle Now Playing updates.
|
|
175
|
+
*
|
|
176
|
+
* Default is `true`.
|
|
177
|
+
*
|
|
178
|
+
* @deprecated To enable the Now Playing information use {@link MediaControlConfig.isEnabled}
|
|
179
|
+
* @remarks Platform: iOS
|
|
180
|
+
*/
|
|
181
|
+
updatesNowPlayingInfoCenter?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* When switching between video formats (eg: adapting between video qualities)
|
|
184
|
+
* the codec might be recreated due to several reasons.
|
|
185
|
+
* This behaviour can cause brief black screens when switching between video qualities as codec recreation can be
|
|
186
|
+
* slow.
|
|
187
|
+
*
|
|
188
|
+
* If a device is know to support video format changes and keep the current decoder without issues,
|
|
189
|
+
* this set can be filled with multiple `ForceReuseVideoCodecReason` and avoid the black screen.
|
|
190
|
+
*
|
|
191
|
+
* Default is `null` i.e not set
|
|
192
|
+
*
|
|
193
|
+
* @remarks Platform: Android
|
|
194
|
+
*/
|
|
195
|
+
forceReuseVideoCodecReasons?: ForceReuseVideoCodecReason[];
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=tweaksConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tweaksConfig.d.ts","sourceRoot":"","sources":["../src/tweaksConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,iBAAiB,sBAAsB;IACvC;;OAEG;IACH,oBAAoB,yBAAyB;IAC7C;;OAEG;IACH,qBAAqB,0BAA0B;CAChD;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;;;;OAWG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAClD;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAC/C;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC;;;;OAIG;IACH,mCAAmC,CAAC,EAAE;QACpC;;;;WAIG;QACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB;;;;WAIG;QACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;IACF;;;;;;;;;;OAUG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;OAKG;IACH,oCAAoC,CAAC,EAAE,MAAM,CAAC;IAC9C;;;;;;OAMG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;;;;;;OAOG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;;;;;OAMG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C;;;;;;;;;;;OAWG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC;;;;;;;;;;;;OAYG;IACH,2BAA2B,CAAC,EAAE,0BAA0B,EAAE,CAAC;CAC5D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When switching the video quality, the video decoder's configuration might change
|
|
3
|
+
* as the player can't always know if the codec supports such configuration change, it destroys and recreates it.
|
|
4
|
+
* This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow.
|
|
5
|
+
*
|
|
6
|
+
* If a codec is know to support a given configuration change without issues,
|
|
7
|
+
* the configuration can be added to the `TweaksConfig.forceReuseVideoCodecReasons`
|
|
8
|
+
* to always reuse the video codec and avoid the black screen.
|
|
9
|
+
*/
|
|
10
|
+
export var ForceReuseVideoCodecReason;
|
|
11
|
+
(function (ForceReuseVideoCodecReason) {
|
|
12
|
+
/**
|
|
13
|
+
* The new video quality color information is not compatible.
|
|
14
|
+
*/
|
|
15
|
+
ForceReuseVideoCodecReason["ColorInfoMismatch"] = "ColorInfoMismatch";
|
|
16
|
+
/**
|
|
17
|
+
* The new video quality exceed the decoder's configured maximum sample size.
|
|
18
|
+
*/
|
|
19
|
+
ForceReuseVideoCodecReason["MaxInputSizeExceeded"] = "MaxInputSizeExceeded";
|
|
20
|
+
/**
|
|
21
|
+
* The new video quality exceed the decoder's configured maximum resolution.
|
|
22
|
+
*/
|
|
23
|
+
ForceReuseVideoCodecReason["MaxResolutionExceeded"] = "MaxResolutionExceeded";
|
|
24
|
+
})(ForceReuseVideoCodecReason || (ForceReuseVideoCodecReason = {}));
|
|
25
|
+
//# sourceMappingURL=tweaksConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tweaksConfig.js","sourceRoot":"","sources":["../src/tweaksConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,0BAaX;AAbD,WAAY,0BAA0B;IACpC;;OAEG;IACH,qEAAuC,CAAA;IACvC;;OAEG;IACH,2EAA6C,CAAA;IAC7C;;OAEG;IACH,6EAA+C,CAAA;AACjD,CAAC,EAbW,0BAA0B,KAA1B,0BAA0B,QAarC","sourcesContent":["/**\n * When switching the video quality, the video decoder's configuration might change\n * as the player can't always know if the codec supports such configuration change, it destroys and recreates it.\n * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow.\n *\n * If a codec is know to support a given configuration change without issues,\n * the configuration can be added to the `TweaksConfig.forceReuseVideoCodecReasons`\n * to always reuse the video codec and avoid the black screen.\n */\nexport enum ForceReuseVideoCodecReason {\n /**\n * The new video quality color information is not compatible.\n */\n ColorInfoMismatch = 'ColorInfoMismatch',\n /**\n * The new video quality exceed the decoder's configured maximum sample size.\n */\n MaxInputSizeExceeded = 'MaxInputSizeExceeded',\n /**\n * The new video quality exceed the decoder's configured maximum resolution.\n */\n MaxResolutionExceeded = 'MaxResolutionExceeded',\n}\n\n/**\n * This configuration is used as an incubator for experimental features. Tweaks are not officially\n * supported and are not guaranteed to be stable, i.e. their naming, functionality and API can\n * change at any time within the tweaks or when being promoted to an official feature and moved\n * into its final configuration namespace.\n */\nexport interface TweaksConfig {\n /**\n * The frequency in seconds `onTimeChanged` is called with `TimeChangedEvent`s.\n *\n * Default value in iOS is `1.0`.\n * Default value in Android is `0.2`.\n *\n * @remarks Platform: iOS, Android\n */\n timeChangedInterval?: number;\n /**\n * If enabled, HLS playlists will be parsed and additional features and events are enabled. This includes:\n *\n * - MetadataEvents carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`\n * - MetadataParsedEvents carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`\n * - DrmDataParsedEvents when a `#EXT-X-KEY` is found\n * - `Player.availableVideoQualities` includes additional information\n * - Automatic retries when HLS playlist requests failed with non-2xx HTTP status code\n *\n * Default is false.\n *\n * @remarks Platform: iOS\n */\n isNativeHlsParsingEnabled?: boolean;\n /**\n * If enabled, playlists will be downloaded by the Bitmovin Player SDK instead of AVFoundation.\n * This enables additional features and events, like:\n *\n * - DownloadFinishedEvents for playlist downloads.\n * - SourceWarningEvents when no `#EXT-X-PLAYLIST-TYPE` is found If set to false, enabling\n * nativeHlsParsingEnabled won’t have any effect.\n *\n * Default is true.\n *\n * @remarks Platform: iOS\n */\n isCustomHlsLoadingEnabled?: boolean;\n /**\n * The threshold which will be applied when seeking to the end in seconds. This value will be used\n * to calculate the maximum seekable time when calling `player.seek(time:)` or `player.playlist.seek(source:time:)`,\n * so the maximum value will be duration - seekToEndThreshold.\n *\n * This is useful if the duration of the segments does not match the duration specified in the\n * manifest. In this case, if we try to seek to the end, AVPlayer could get stuck and might stall\n * forever Therefore increasing this value could help.\n *\n * Default is 0.5.\n *\n * @remarks Platform: iOS\n */\n seekToEndThreshold?: number;\n /**\n * Specifies the player behaviour when `Player.play` is called. Default is 'relaxed'.\n *\n * - 'relaxed': Starts playback when enough media data is buffered and continuous playback without stalling can be ensured. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.\n * - 'aggressive': When the buffer is not empty, this setting will cause the player to start playback of available media immediately. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.\n *\n * @remarks Platform: iOS\n */\n playbackStartBehaviour?: 'relaxed' | 'aggressive';\n /**\n * Specifies the player behaviour when stalling should be exited. Default is 'relaxed'.\n *\n * - 'relaxed': The player will wait until the buffer is filled that it can, most likely, ensure continuous playback without another stalling right after playback continued.\n * - 'aggressive': The player will try to unstall as soon as some media data became available and will start playback of this media immediately.\n *\n * @remarks Platform: iOS\n */\n unstallingBehaviour?: 'relaxed' | 'aggressive';\n /**\n * Constantly aggregated and weighted bandwidth samples are summed up to this weight limit to calculate an bandwidth estimation. Remaining samples (i.e. that would lead to exceeding the limit) are dropped from memory as they are not relevant anymore.\n * Default is 2000.\n *\n * @remarks Platform: Android\n */\n bandwidthEstimateWeightLimit?: number;\n /**\n * Some devices have an incorrect implementation of MediaCodec.setOutputSurface. This leads to failure when the surface changes. To prevent failure, the codec will be released and re-instantiated in those scenarios.\n *\n * @remarks Platform: Android\n */\n devicesThatRequireSurfaceWorkaround?: {\n /**\n * A device name as reported by Build.DEVICE.\n *\n * @see Build.DEVICE: https://developer.android.com/reference/kotlin/android/os/Build.html#DEVICE--\n */\n deviceNames?: string[];\n /**\n * A model name as reported by Build.MODEL.\n *\n * @see Build.MODEL: https://developer.android.com/reference/kotlin/android/os/Build.html#MODEL--\n */\n modelNames?: string[];\n };\n /**\n * Specifies if the language property on DASH Representations, HLS Renditions and SmoothStreaming QualityLevels is normalized.\n * If enabled, language properties are normalized to IETF BCP 47 language tags. Default is true.\n *\n * Examples:\n * - \"ENG\" is normalized to \"en\"\n * - \"en_us\" is normalized to \"en-us\"\n * - \"en-US-x-lvariant-POSIX\" is normalized to \"en-us-posix\"\n *\n * @remarks Platform: Android\n */\n languagePropertyNormalization?: boolean;\n /**\n * The interval in which dynamic DASH windows are updated locally. I.e. The rate by which the\n * playback window is moved forward on the timeline.\n *\n * @remarks Platform: Android\n */\n localDynamicDashWindowUpdateInterval?: number;\n /**\n * Specifies whether a DRM session should be used for clear tracks of type video and audio. Using\n * DRM sessions for clear content avoids the recreation of decoders when transitioning between clear\n * and encrypted sections of content. Default is false.\n *\n * @remarks Platform: Android\n */\n useDrmSessionForClearPeriods?: boolean;\n /**\n * Specifies whether a DRM session should be used for clear tracks of type video and audio in a clear\n * source that follows after a DRM protected source. In addition, a DRM session will be used for clear\n * periods in a DRM protected source. Using DRM sessions for clear content avoids the recreation of\n * decoders when transitioning between clear and encrypted sections of content. Default is false.\n *\n * @remarks Platform: Android\n */\n useDrmSessionForClearSources?: boolean;\n /**\n * Specifies if the player should always fall back to an extractor matching the file type, if no\n * matching extractor was found. If the fallback is applied, this will ignore potential incompatibilities\n * with streams and thus can result in unstable or failing playback.\n *\n * @remarks Platform: Android\n */\n useFiletypeExtractorFallbackForHls?: boolean;\n /**\n * Determines whether `AVKit` should update Now Playing information automatically when using System UI.\n *\n * - If set to `false`, the automatic updates of Now Playing Info sent by `AVKit` are disabled.\n * This prevents interference with manual updates you may want to perform.\n * - If set to `true`, the default behaviour is maintained, allowing `AVKit` to handle Now Playing updates.\n *\n * Default is `true`.\n *\n * @deprecated To enable the Now Playing information use {@link MediaControlConfig.isEnabled}\n * @remarks Platform: iOS\n */\n updatesNowPlayingInfoCenter?: boolean;\n\n /**\n * When switching between video formats (eg: adapting between video qualities)\n * the codec might be recreated due to several reasons.\n * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be\n * slow.\n *\n * If a device is know to support video format changes and keep the current decoder without issues,\n * this set can be filled with multiple `ForceReuseVideoCodecReason` and avoid the black screen.\n *\n * Default is `null` i.e not set\n *\n * @remarks Platform: Android\n */\n forceReuseVideoCodecReasons?: ForceReuseVideoCodecReason[];\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
|
+
export type CustomMessageHandlerModuleEvents = {
|
|
3
|
+
onReceivedSynchronousMessage: ({ nativeId, id, message, data, }: {
|
|
4
|
+
nativeId: string;
|
|
5
|
+
id: number;
|
|
6
|
+
message: string;
|
|
7
|
+
data: string | undefined;
|
|
8
|
+
}) => void;
|
|
9
|
+
onReceivedAsynchronousMessage: ({ nativeId, message, data, }: {
|
|
10
|
+
nativeId: string;
|
|
11
|
+
message: string;
|
|
12
|
+
data: string | undefined;
|
|
13
|
+
}) => void;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Native CustomMessageHandlerModule using Expo modules API.
|
|
17
|
+
* Provides modern async/await interface while maintaining backward compatibility.
|
|
18
|
+
*/
|
|
19
|
+
declare class CustomMessageHandlerModule extends NativeModule<CustomMessageHandlerModuleEvents> {
|
|
20
|
+
registerHandler(nativeId: string): Promise<void>;
|
|
21
|
+
destroy(nativeId: string): Promise<void>;
|
|
22
|
+
onReceivedSynchronousMessageResult(id: number, result: string | undefined): Promise<void>;
|
|
23
|
+
sendMessage(nativeId: string, message: string, data: string | undefined): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
declare const _default: CustomMessageHandlerModule;
|
|
26
|
+
export default _default;
|
|
27
|
+
//# sourceMappingURL=customMessageHandlerModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customMessageHandlerModule.d.ts","sourceRoot":"","sources":["../../src/ui/customMessageHandlerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,MAAM,MAAM,gCAAgC,GAAG;IAC7C,4BAA4B,EAAE,CAAC,EAC7B,QAAQ,EACR,EAAE,EACF,OAAO,EACP,IAAI,GACL,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1B,KAAK,IAAI,CAAC;IACX,6BAA6B,EAAE,CAAC,EAC9B,QAAQ,EACR,OAAO,EACP,IAAI,GACL,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1B,KAAK,IAAI,CAAC;CACZ,CAAC;AAEF;;;GAGG;AACH,OAAO,OAAO,0BAA2B,SAAQ,YAAY,CAAC,gCAAgC,CAAC;IAC7F,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAChD,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACxC,kCAAkC,CAChC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,IAAI,CAAC;IAChB,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAAC,IAAI,CAAC;CACjB;;AAED,wBAEE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customMessageHandlerModule.js","sourceRoot":"","sources":["../../src/ui/customMessageHandlerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA2CtE,eAAe,mBAAmB,CAChC,4BAA4B,CAC7B,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\n\nexport type CustomMessageHandlerModuleEvents = {\n onReceivedSynchronousMessage: ({\n nativeId,\n id,\n message,\n data,\n }: {\n nativeId: string;\n id: number;\n message: string;\n data: string | undefined;\n }) => void;\n onReceivedAsynchronousMessage: ({\n nativeId,\n message,\n data,\n }: {\n nativeId: string;\n message: string;\n data: string | undefined;\n }) => void;\n};\n\n/**\n * Native CustomMessageHandlerModule using Expo modules API.\n * Provides modern async/await interface while maintaining backward compatibility.\n */\ndeclare class CustomMessageHandlerModule extends NativeModule<CustomMessageHandlerModuleEvents> {\n registerHandler(nativeId: string): Promise<void>;\n destroy(nativeId: string): Promise<void>;\n onReceivedSynchronousMessageResult(\n id: number,\n result: string | undefined\n ): Promise<void>;\n sendMessage(\n nativeId: string,\n message: string,\n data: string | undefined\n ): Promise<void>;\n}\n\nexport default requireNativeModule<CustomMessageHandlerModule>(\n 'CustomMessageHandlerModule'\n);\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CustomMessageSender } from './custommessagesender';
|
|
2
|
+
export interface CustomMessageHandlerProps {
|
|
3
|
+
/**
|
|
4
|
+
* A function that will be called when the Player UI sends a synchronous message to the integration.
|
|
5
|
+
*/
|
|
6
|
+
onReceivedSynchronousMessage: (message: string, data: string | undefined) => string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* A function that will be called when the Player UI sends an asynchronous message to the integration.
|
|
9
|
+
*/
|
|
10
|
+
onReceivedAsynchronousMessage: (message: string, data: string | undefined) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Android and iOS only.
|
|
14
|
+
* For Android it requires Player SDK version 3.39.0 or higher.
|
|
15
|
+
*
|
|
16
|
+
* Provides a two-way communication channel between the Player UI and the integration.
|
|
17
|
+
*/
|
|
18
|
+
export declare class CustomMessageHandler {
|
|
19
|
+
private readonly onReceivedSynchronousMessage;
|
|
20
|
+
private readonly onReceivedAsynchronousMessage;
|
|
21
|
+
/** @internal */
|
|
22
|
+
customMessageSender?: CustomMessageSender;
|
|
23
|
+
/**
|
|
24
|
+
* Android and iOS only.
|
|
25
|
+
*
|
|
26
|
+
* Creates a new `CustomMessageHandler` instance to handle two-way communication between the integation and the Player UI.
|
|
27
|
+
*
|
|
28
|
+
* @param options - Configuration options for the `CustomMessageHandler` instance.
|
|
29
|
+
*/
|
|
30
|
+
constructor({ onReceivedSynchronousMessage, onReceivedAsynchronousMessage, }: CustomMessageHandlerProps);
|
|
31
|
+
/**
|
|
32
|
+
* Gets called when a synchronous message was received from the Bitmovin Web UI.
|
|
33
|
+
*
|
|
34
|
+
* @param message Identifier of the message.
|
|
35
|
+
* @param data Optional data of the message as string (can be a serialized object).
|
|
36
|
+
* @returns Optional return value as string which will be propagates back to the JS counterpart.
|
|
37
|
+
*/
|
|
38
|
+
receivedSynchronousMessage(message: string, data: string | undefined): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Gets called when an asynchronous message was received from the Bitmovin Web UI.
|
|
41
|
+
*
|
|
42
|
+
* @param message Identifier of the message.
|
|
43
|
+
* @param data Optional data of the message as string (can be a serialized object).
|
|
44
|
+
*/
|
|
45
|
+
receivedAsynchronousMessage(message: string, data: string | undefined): void;
|
|
46
|
+
/**
|
|
47
|
+
* Android and iOS only.
|
|
48
|
+
*
|
|
49
|
+
* Sends a message to the Player UI.
|
|
50
|
+
*
|
|
51
|
+
* @param message - Identifier for the callback which should be called.
|
|
52
|
+
* @param data - Payload for the callback.
|
|
53
|
+
*/
|
|
54
|
+
sendMessage(message: string, data: string | undefined): void;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=custommessagehandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custommessagehandler.d.ts","sourceRoot":"","sources":["../../src/ui/custommessagehandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,4BAA4B,EAAE,CAC5B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,KACrB,MAAM,GAAG,SAAS,CAAC;IACxB;;OAEG;IACH,6BAA6B,EAAE,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,KACrB,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAGrB;IACxB,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAGpC;IAEV,gBAAgB;IAChB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C;;;;;;OAMG;gBACS,EACV,4BAA4B,EAC5B,6BAA6B,GAC9B,EAAE,yBAAyB;IAK5B;;;;;;OAMG;IACH,0BAA0B,CACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS;IAIrB;;;;;OAKG;IACH,2BAA2B,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAI5E;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAG7D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Android and iOS only.
|
|
3
|
+
* For Android it requires Player SDK version 3.39.0 or higher.
|
|
4
|
+
*
|
|
5
|
+
* Provides a two-way communication channel between the Player UI and the integration.
|
|
6
|
+
*/
|
|
7
|
+
export class CustomMessageHandler {
|
|
8
|
+
onReceivedSynchronousMessage;
|
|
9
|
+
onReceivedAsynchronousMessage;
|
|
10
|
+
/** @internal */
|
|
11
|
+
customMessageSender;
|
|
12
|
+
/**
|
|
13
|
+
* Android and iOS only.
|
|
14
|
+
*
|
|
15
|
+
* Creates a new `CustomMessageHandler` instance to handle two-way communication between the integation and the Player UI.
|
|
16
|
+
*
|
|
17
|
+
* @param options - Configuration options for the `CustomMessageHandler` instance.
|
|
18
|
+
*/
|
|
19
|
+
constructor({ onReceivedSynchronousMessage, onReceivedAsynchronousMessage, }) {
|
|
20
|
+
this.onReceivedSynchronousMessage = onReceivedSynchronousMessage;
|
|
21
|
+
this.onReceivedAsynchronousMessage = onReceivedAsynchronousMessage;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Gets called when a synchronous message was received from the Bitmovin Web UI.
|
|
25
|
+
*
|
|
26
|
+
* @param message Identifier of the message.
|
|
27
|
+
* @param data Optional data of the message as string (can be a serialized object).
|
|
28
|
+
* @returns Optional return value as string which will be propagates back to the JS counterpart.
|
|
29
|
+
*/
|
|
30
|
+
receivedSynchronousMessage(message, data) {
|
|
31
|
+
return this.onReceivedSynchronousMessage(message, data);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Gets called when an asynchronous message was received from the Bitmovin Web UI.
|
|
35
|
+
*
|
|
36
|
+
* @param message Identifier of the message.
|
|
37
|
+
* @param data Optional data of the message as string (can be a serialized object).
|
|
38
|
+
*/
|
|
39
|
+
receivedAsynchronousMessage(message, data) {
|
|
40
|
+
this.onReceivedAsynchronousMessage(message, data);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Android and iOS only.
|
|
44
|
+
*
|
|
45
|
+
* Sends a message to the Player UI.
|
|
46
|
+
*
|
|
47
|
+
* @param message - Identifier for the callback which should be called.
|
|
48
|
+
* @param data - Payload for the callback.
|
|
49
|
+
*/
|
|
50
|
+
sendMessage(message, data) {
|
|
51
|
+
this.customMessageSender?.sendMessage(message, data);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=custommessagehandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custommessagehandler.js","sourceRoot":"","sources":["../../src/ui/custommessagehandler.ts"],"names":[],"mappings":"AAmBA;;;;;GAKG;AACH,MAAM,OAAO,oBAAoB;IACd,4BAA4B,CAGrB;IACP,6BAA6B,CAGpC;IAEV,gBAAgB;IAChB,mBAAmB,CAAuB;IAE1C;;;;;;OAMG;IACH,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,GACH;QAC1B,IAAI,CAAC,4BAA4B,GAAG,4BAA4B,CAAC;QACjE,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;IACrE,CAAC;IAED;;;;;;OAMG;IACH,0BAA0B,CACxB,OAAe,EACf,IAAwB;QAExB,OAAO,IAAI,CAAC,4BAA4B,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;OAKG;IACH,2BAA2B,CAAC,OAAe,EAAE,IAAwB;QACnE,IAAI,CAAC,6BAA6B,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACH,WAAW,CAAC,OAAe,EAAE,IAAwB;QACnD,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;CACF","sourcesContent":["import { CustomMessageSender } from './custommessagesender';\n\nexport interface CustomMessageHandlerProps {\n /**\n * A function that will be called when the Player UI sends a synchronous message to the integration.\n */\n onReceivedSynchronousMessage: (\n message: string,\n data: string | undefined\n ) => string | undefined;\n /**\n * A function that will be called when the Player UI sends an asynchronous message to the integration.\n */\n onReceivedAsynchronousMessage: (\n message: string,\n data: string | undefined\n ) => void;\n}\n\n/**\n * Android and iOS only.\n * For Android it requires Player SDK version 3.39.0 or higher.\n *\n * Provides a two-way communication channel between the Player UI and the integration.\n */\nexport class CustomMessageHandler {\n private readonly onReceivedSynchronousMessage: (\n message: string,\n data: string | undefined\n ) => string | undefined;\n private readonly onReceivedAsynchronousMessage: (\n message: string,\n data: string | undefined\n ) => void;\n\n /** @internal */\n customMessageSender?: CustomMessageSender;\n\n /**\n * Android and iOS only.\n *\n * Creates a new `CustomMessageHandler` instance to handle two-way communication between the integation and the Player UI.\n *\n * @param options - Configuration options for the `CustomMessageHandler` instance.\n */\n constructor({\n onReceivedSynchronousMessage,\n onReceivedAsynchronousMessage,\n }: CustomMessageHandlerProps) {\n this.onReceivedSynchronousMessage = onReceivedSynchronousMessage;\n this.onReceivedAsynchronousMessage = onReceivedAsynchronousMessage;\n }\n\n /**\n * Gets called when a synchronous message was received from the Bitmovin Web UI.\n *\n * @param message Identifier of the message.\n * @param data Optional data of the message as string (can be a serialized object).\n * @returns Optional return value as string which will be propagates back to the JS counterpart.\n */\n receivedSynchronousMessage(\n message: string,\n data: string | undefined\n ): string | undefined {\n return this.onReceivedSynchronousMessage(message, data);\n }\n\n /**\n * Gets called when an asynchronous message was received from the Bitmovin Web UI.\n *\n * @param message Identifier of the message.\n * @param data Optional data of the message as string (can be a serialized object).\n */\n receivedAsynchronousMessage(message: string, data: string | undefined): void {\n this.onReceivedAsynchronousMessage(message, data);\n }\n\n /**\n * Android and iOS only.\n *\n * Sends a message to the Player UI.\n *\n * @param message - Identifier for the callback which should be called.\n * @param data - Payload for the callback.\n */\n sendMessage(message: string, data: string | undefined): void {\n this.customMessageSender?.sendMessage(message, data);\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CustomMessageHandler } from './custommessagehandler';
|
|
2
|
+
import { CustomMessageSender } from './custommessagesender';
|
|
3
|
+
/**
|
|
4
|
+
* Takes care of JS/Native communication for a CustomMessageHandler.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CustomMessageHandlerBridge implements CustomMessageSender {
|
|
7
|
+
readonly nativeId: string;
|
|
8
|
+
private customMessageHandler?;
|
|
9
|
+
private isDestroyed;
|
|
10
|
+
private onReceivedSynchronousMessageSubscription?;
|
|
11
|
+
private onReceivedAsynchronousMessageSubscription?;
|
|
12
|
+
constructor(nativeId?: string);
|
|
13
|
+
setCustomMessageHandler(customMessageHandler: CustomMessageHandler): void;
|
|
14
|
+
/**
|
|
15
|
+
* Destroys the native CustomMessageHandler
|
|
16
|
+
*/
|
|
17
|
+
destroy(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Called by native code, when the UI sends a synchronous message.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
private receivedSynchronousMessage;
|
|
23
|
+
/**
|
|
24
|
+
* Called by native code, when the UI sends an asynchronous message.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
private receivedAsynchronousMessage;
|
|
28
|
+
/**
|
|
29
|
+
* Called by CustomMessageHandler, when sending a message to the UI.
|
|
30
|
+
*/
|
|
31
|
+
sendMessage(message: string, data: string | undefined): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=custommessagehandlerbridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custommessagehandlerbridge.d.ts","sourceRoot":"","sources":["../../src/ui/custommessagehandlerbridge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D;;GAEG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,oBAAoB,CAAC,CAAuB;IACpD,OAAO,CAAC,WAAW,CAAU;IAE7B,OAAO,CAAC,wCAAwC,CAAC,CAAoB;IACrE,OAAO,CAAC,yCAAyC,CAAC,CAAoB;gBAE1D,QAAQ,CAAC,EAAE,MAAM;IA8B7B,uBAAuB,CAAC,oBAAoB,EAAE,oBAAoB;IAKlE;;OAEG;IACH,OAAO;IAWP;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IAYlC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IAQnC;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAG7D"}
|