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
package/src/events.ts
CHANGED
|
@@ -48,38 +48,44 @@ export interface ErrorEvent extends Event {
|
|
|
48
48
|
* Emitted when a source is loaded into the player.
|
|
49
49
|
* Seeking and time shifting are allowed as soon as this event is seen.
|
|
50
50
|
*/
|
|
51
|
-
export
|
|
51
|
+
export type PlayerActiveEvent = Event;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Emitted when a source is unloaded from the player.
|
|
55
|
+
* Seeking and time shifting are not allowed anymore after this event.
|
|
56
|
+
*/
|
|
57
|
+
export type PlayerInactiveEvent = Event;
|
|
52
58
|
|
|
53
59
|
/**
|
|
54
60
|
* Emitted when a player error occurred.
|
|
55
61
|
*/
|
|
56
|
-
export
|
|
62
|
+
export type PlayerErrorEvent = ErrorEvent;
|
|
57
63
|
|
|
58
64
|
/**
|
|
59
65
|
* Emitted when a player warning occurred.
|
|
60
66
|
*/
|
|
61
|
-
export
|
|
67
|
+
export type PlayerWarningEvent = ErrorEvent;
|
|
62
68
|
|
|
63
69
|
/**
|
|
64
70
|
* Emitted when the player is destroyed.
|
|
65
71
|
*/
|
|
66
|
-
export
|
|
72
|
+
export type DestroyEvent = Event;
|
|
67
73
|
|
|
68
74
|
/**
|
|
69
75
|
* Emitted when the player is muted.
|
|
70
76
|
*/
|
|
71
|
-
export
|
|
77
|
+
export type MutedEvent = Event;
|
|
72
78
|
|
|
73
79
|
/**
|
|
74
80
|
* Emitted when the player is unmuted.
|
|
75
81
|
*/
|
|
76
|
-
export
|
|
82
|
+
export type UnmutedEvent = Event;
|
|
77
83
|
|
|
78
84
|
/**
|
|
79
85
|
* Emitted when the player is ready for immediate playback, because initial audio/video
|
|
80
86
|
* has been downloaded.
|
|
81
87
|
*/
|
|
82
|
-
export
|
|
88
|
+
export type ReadyEvent = Event;
|
|
83
89
|
|
|
84
90
|
/**
|
|
85
91
|
* Emitted when the player is paused.
|
|
@@ -114,7 +120,7 @@ export interface PlayingEvent extends Event {
|
|
|
114
120
|
/**
|
|
115
121
|
* Emitted when the playback of the current media has finished.
|
|
116
122
|
*/
|
|
117
|
-
export
|
|
123
|
+
export type PlaybackFinishedEvent = Event;
|
|
118
124
|
|
|
119
125
|
/**
|
|
120
126
|
* Source object representation the way it appears on event's payloads such as `SeekEvent`, for example.
|
|
@@ -182,7 +188,7 @@ export interface SeekEvent extends Event {
|
|
|
182
188
|
* This event only applies to VoD streams.
|
|
183
189
|
* When looking for an equivalent for live streams, the {@link TimeShiftedEvent} is relevant.
|
|
184
190
|
*/
|
|
185
|
-
export
|
|
191
|
+
export type SeekedEvent = Event;
|
|
186
192
|
|
|
187
193
|
/**
|
|
188
194
|
* Emitted when the player starts time shifting.
|
|
@@ -205,17 +211,17 @@ export interface TimeShiftEvent extends Event {
|
|
|
205
211
|
* This event only applies to live streams.
|
|
206
212
|
* When looking for an equivalent for VoD streams, the {@link SeekedEvent} is relevant.
|
|
207
213
|
*/
|
|
208
|
-
export
|
|
214
|
+
export type TimeShiftedEvent = Event;
|
|
209
215
|
|
|
210
216
|
/**
|
|
211
217
|
* Emitted when the player begins to stall and to buffer due to an empty buffer.
|
|
212
218
|
*/
|
|
213
|
-
export
|
|
219
|
+
export type StallStartedEvent = Event;
|
|
214
220
|
|
|
215
221
|
/**
|
|
216
222
|
* Emitted when the player ends stalling, due to enough data in the buffer.
|
|
217
223
|
*/
|
|
218
|
-
export
|
|
224
|
+
export type StallEndedEvent = Event;
|
|
219
225
|
|
|
220
226
|
/**
|
|
221
227
|
* Emitted when the current playback time has changed.
|
|
@@ -262,12 +268,12 @@ export interface SourceUnloadedEvent extends Event {
|
|
|
262
268
|
/**
|
|
263
269
|
* Emitted when a source error occurred.
|
|
264
270
|
*/
|
|
265
|
-
export
|
|
271
|
+
export type SourceErrorEvent = ErrorEvent;
|
|
266
272
|
|
|
267
273
|
/**
|
|
268
274
|
* Emitted when a source warning occurred.
|
|
269
275
|
*/
|
|
270
|
-
export
|
|
276
|
+
export type SourceWarningEvent = ErrorEvent;
|
|
271
277
|
|
|
272
278
|
/**
|
|
273
279
|
* Emitted when a new audio track is added to the player.
|
|
@@ -340,63 +346,63 @@ export interface SubtitleChangedEvent extends Event {
|
|
|
340
346
|
/**
|
|
341
347
|
* Emitted when the player enters Picture in Picture mode.
|
|
342
348
|
*
|
|
343
|
-
* @
|
|
349
|
+
* @remarks Platform: iOS, Android
|
|
344
350
|
*/
|
|
345
|
-
export
|
|
351
|
+
export type PictureInPictureEnterEvent = Event;
|
|
346
352
|
|
|
347
353
|
/**
|
|
348
354
|
* Emitted when the player exits Picture in Picture mode.
|
|
349
355
|
*
|
|
350
|
-
* @
|
|
356
|
+
* @remarks Platform: iOS, Android
|
|
351
357
|
*/
|
|
352
|
-
export
|
|
358
|
+
export type PictureInPictureExitEvent = Event;
|
|
353
359
|
|
|
354
360
|
/**
|
|
355
361
|
* Emitted when the player has finished entering Picture in Picture mode on iOS.
|
|
356
362
|
*
|
|
357
|
-
* @
|
|
363
|
+
* @remarks Platform: iOS
|
|
358
364
|
*/
|
|
359
|
-
export
|
|
365
|
+
export type PictureInPictureEnteredEvent = Event;
|
|
360
366
|
|
|
361
367
|
/**
|
|
362
368
|
* Emitted when the player has finished exiting Picture in Picture mode on iOS.
|
|
363
369
|
*
|
|
364
|
-
* @
|
|
370
|
+
* @remarks Platform: iOS
|
|
365
371
|
*/
|
|
366
|
-
export
|
|
372
|
+
export type PictureInPictureExitedEvent = Event;
|
|
367
373
|
|
|
368
374
|
/**
|
|
369
375
|
* Emitted when the fullscreen functionality has been enabled.
|
|
370
376
|
*
|
|
371
|
-
* @
|
|
377
|
+
* @remarks Platform: iOS, Android
|
|
372
378
|
*/
|
|
373
|
-
export
|
|
379
|
+
export type FullscreenEnabledEvent = Event;
|
|
374
380
|
|
|
375
381
|
/**
|
|
376
382
|
* Emitted when the fullscreen functionality has been disabled.
|
|
377
383
|
*
|
|
378
|
-
* @
|
|
384
|
+
* @remarks Platform: iOS, Android
|
|
379
385
|
*/
|
|
380
|
-
export
|
|
386
|
+
export type FullscreenDisabledEvent = Event;
|
|
381
387
|
|
|
382
388
|
/**
|
|
383
389
|
* Emitted when the player enters fullscreen mode.
|
|
384
390
|
*
|
|
385
|
-
* @
|
|
391
|
+
* @remarks Platform: iOS, Android
|
|
386
392
|
*/
|
|
387
|
-
export
|
|
393
|
+
export type FullscreenEnterEvent = Event;
|
|
388
394
|
|
|
389
395
|
/**
|
|
390
396
|
* Emitted when the player exits fullscreen mode.
|
|
391
397
|
*
|
|
392
|
-
* @
|
|
398
|
+
* @remarks Platform: iOS, Android
|
|
393
399
|
*/
|
|
394
|
-
export
|
|
400
|
+
export type FullscreenExitEvent = Event;
|
|
395
401
|
|
|
396
402
|
/**
|
|
397
403
|
* Emitted when the availability of the Picture in Picture mode changed on Android.
|
|
398
404
|
*
|
|
399
|
-
* @
|
|
405
|
+
* @remarks Platform: Android
|
|
400
406
|
*/
|
|
401
407
|
export interface PictureInPictureAvailabilityChangedEvent extends Event {
|
|
402
408
|
/**
|
|
@@ -590,28 +596,28 @@ export interface VideoPlaybackQualityChangedEvent extends Event {
|
|
|
590
596
|
/**
|
|
591
597
|
* Emitted when casting to a cast-compatible device is available.
|
|
592
598
|
*/
|
|
593
|
-
export
|
|
599
|
+
export type CastAvailableEvent = Event;
|
|
594
600
|
|
|
595
601
|
/**
|
|
596
602
|
* Emitted when the playback on a cast-compatible device was paused.
|
|
597
603
|
*
|
|
598
604
|
* On Android {@link PausedEvent} is also emitted while casting.
|
|
599
605
|
*/
|
|
600
|
-
export
|
|
606
|
+
export type CastPausedEvent = Event;
|
|
601
607
|
|
|
602
608
|
/**
|
|
603
609
|
* Emitted when the playback on a cast-compatible device has finished.
|
|
604
610
|
*
|
|
605
611
|
* On Android {@link PlaybackFinishedEvent} is also emitted while casting.
|
|
606
612
|
*/
|
|
607
|
-
export
|
|
613
|
+
export type CastPlaybackFinishedEvent = Event;
|
|
608
614
|
|
|
609
615
|
/**
|
|
610
616
|
* Emitted when playback on a cast-compatible device has started.
|
|
611
617
|
*
|
|
612
618
|
* On Android {@link PlayingEvent} is also emitted while casting.
|
|
613
619
|
*/
|
|
614
|
-
export
|
|
620
|
+
export type CastPlayingEvent = Event;
|
|
615
621
|
|
|
616
622
|
/**
|
|
617
623
|
* Emitted when the cast app is launched successfully.
|
|
@@ -626,17 +632,17 @@ export interface CastStartedEvent extends Event {
|
|
|
626
632
|
/**
|
|
627
633
|
* Emitted when casting is initiated, but the user still needs to choose which device should be used.
|
|
628
634
|
*/
|
|
629
|
-
export
|
|
635
|
+
export type CastStartEvent = Event;
|
|
630
636
|
|
|
631
637
|
/**
|
|
632
638
|
* Emitted when casting to a cast-compatible device is stopped.
|
|
633
639
|
*/
|
|
634
|
-
export
|
|
640
|
+
export type CastStoppedEvent = Event;
|
|
635
641
|
|
|
636
642
|
/**
|
|
637
643
|
* Emitted when the time update from the currently used cast-compatible device is received.
|
|
638
644
|
*/
|
|
639
|
-
export
|
|
645
|
+
export type CastTimeUpdatedEvent = Event;
|
|
640
646
|
|
|
641
647
|
/**
|
|
642
648
|
* Contains information for the {@link CastWaitingForDeviceEvent}.
|
|
@@ -691,7 +697,7 @@ export interface DownloadFinishedEvent extends Event {
|
|
|
691
697
|
/**
|
|
692
698
|
* The last redirect location, or `null` if no redirect happened.
|
|
693
699
|
*/
|
|
694
|
-
lastRedirectLocation?:
|
|
700
|
+
lastRedirectLocation?: string;
|
|
695
701
|
/**
|
|
696
702
|
* The size of the downloaded data, in bytes.
|
|
697
703
|
*/
|
|
@@ -699,12 +705,12 @@ export interface DownloadFinishedEvent extends Event {
|
|
|
699
705
|
/**
|
|
700
706
|
* The URL of the request.
|
|
701
707
|
*/
|
|
702
|
-
url:
|
|
708
|
+
url: string;
|
|
703
709
|
}
|
|
704
710
|
|
|
705
711
|
/**
|
|
706
712
|
* Emitted when the player transitions from one playback speed to another.
|
|
707
|
-
* @
|
|
713
|
+
* @remarks Platform: iOS, tvOS
|
|
708
714
|
*/
|
|
709
715
|
export interface PlaybackSpeedChangedEvent extends Event {
|
|
710
716
|
/**
|
package/src/hooks/useProxy.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useCallback, RefObject } from 'react';
|
|
3
|
-
import { NativeSyntheticEvent, findNodeHandle } from 'react-native';
|
|
1
|
+
import { RefObject, useCallback } from 'react';
|
|
4
2
|
import { Event } from '../events';
|
|
3
|
+
import { findNodeHandle } from 'react-native';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* A function that takes a generic event as argument.
|
|
@@ -11,30 +10,24 @@ type Callback<E> = (event: E) => void;
|
|
|
11
10
|
/**
|
|
12
11
|
* A function that takes the synthetic version of a generic event as argument.
|
|
13
12
|
*/
|
|
14
|
-
type NativeCallback<E> = (nativeEvent:
|
|
13
|
+
type NativeCallback<E> = (event: { nativeEvent: E }) => void;
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
function unwrapNativeEvent<E extends Event>(event: NativeSyntheticEvent<E>): E {
|
|
20
|
-
return omit(event.nativeEvent, ['target']) as E;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Produce a callback function that takes some native synthetic event and calls
|
|
25
|
-
* the passed callback with the unwrapped event value. And always check first
|
|
26
|
-
* if the received synthetic event target matches viewRef's node value.
|
|
16
|
+
* Create a proxy function that unwraps native events.
|
|
27
17
|
*/
|
|
28
18
|
export function useProxy(
|
|
29
19
|
viewRef: RefObject<any>
|
|
30
20
|
): <E extends Event>(callback?: Callback<E>) => NativeCallback<E> {
|
|
31
21
|
return useCallback(
|
|
32
|
-
(callback
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
<E extends Event>(callback?: Callback<E>) =>
|
|
23
|
+
(event: { nativeEvent: E }) => {
|
|
24
|
+
const eventTargetNodeHandle: number = (event.nativeEvent as any).target;
|
|
25
|
+
if (eventTargetNodeHandle !== findNodeHandle(viewRef.current)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const { target, ...eventWithoutTarget } = event.nativeEvent as any;
|
|
29
|
+
callback?.(eventWithoutTarget as E);
|
|
30
|
+
},
|
|
38
31
|
[viewRef]
|
|
39
32
|
);
|
|
40
33
|
}
|
|
@@ -13,7 +13,7 @@ export interface MediaControlConfig {
|
|
|
13
13
|
* For a detailed list of the supported features in the **default behavior**,
|
|
14
14
|
* check the **Default Supported Features** section.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
16
|
+
* @remarks Enabling this flag will automatically treat {@link TweaksConfig.updatesNowPlayingInfoCenter} as `false`.
|
|
17
17
|
*
|
|
18
18
|
* ## Limitations
|
|
19
19
|
* ---
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NativeModule, requireNativeModule } from 'expo-modules-core';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export type AudioSessionModuleEvents = Record<string, any>;
|
|
5
|
+
|
|
6
|
+
declare class AudioSessionModule extends NativeModule<AudioSessionModuleEvents> {
|
|
7
|
+
setCategory(category: string): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// iOS-only module
|
|
11
|
+
export default Platform.OS === 'ios'
|
|
12
|
+
? requireNativeModule<AudioSessionModule>('AudioSessionModule')
|
|
13
|
+
: null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NativeModule, requireNativeModule } from 'expo-modules-core';
|
|
2
|
+
|
|
3
|
+
export type BitmovinCastManagerModuleEvents = Record<string, any>;
|
|
4
|
+
|
|
5
|
+
declare class BitmovinCastManagerModule extends NativeModule<BitmovinCastManagerModuleEvents> {
|
|
6
|
+
isInitialized(): Promise<boolean>;
|
|
7
|
+
initializeCastManager(options?: Record<string, any>): Promise<void>;
|
|
8
|
+
sendMessage(message: string, messageNamespace?: string): Promise<void>;
|
|
9
|
+
updateContext?(): Promise<void>; // Android only
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default requireNativeModule<BitmovinCastManagerModule>(
|
|
13
|
+
'BitmovinCastManagerModule'
|
|
14
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NativeModule, requireNativeModule } from 'expo-modules-core';
|
|
2
|
+
import { BufferLevels } from '../bufferApi';
|
|
3
|
+
|
|
4
|
+
export type BufferModuleEvents = Record<string, any>;
|
|
5
|
+
|
|
6
|
+
declare class BufferModule extends NativeModule<BufferModuleEvents> {
|
|
7
|
+
/**
|
|
8
|
+
* Get buffer level for the specified player and buffer type.
|
|
9
|
+
*/
|
|
10
|
+
getLevel(playerId: string, type: string): Promise<BufferLevels>;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Set target level for the specified player and buffer type.
|
|
14
|
+
*/
|
|
15
|
+
setTargetLevel(playerId: string, type: string, value: number): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default requireNativeModule<BufferModule>('BufferModule');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NativeModule, requireNativeModule } from 'expo-modules-core';
|
|
2
|
+
|
|
3
|
+
export type DebugModuleEvents = Record<string, any>;
|
|
4
|
+
|
|
5
|
+
declare class DebugModule extends NativeModule<DebugModuleEvents> {
|
|
6
|
+
setDebugLoggingEnabled(enabled: boolean): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default requireNativeModule<DebugModule>('DebugModule');
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { NativeModule, requireNativeModule } from 'expo-modules-core';
|
|
2
|
+
|
|
3
|
+
export type PlayerModuleEvents = Record<string, any>;
|
|
4
|
+
|
|
5
|
+
declare class PlayerModule extends NativeModule<PlayerModuleEvents> {
|
|
6
|
+
/**
|
|
7
|
+
* Call .play() on nativeId's player.
|
|
8
|
+
*/
|
|
9
|
+
play(nativeId: string): Promise<void>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Call .pause() on nativeId's player.
|
|
13
|
+
*/
|
|
14
|
+
pause(nativeId: string): Promise<void>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Call .mute() on nativeId's player.
|
|
18
|
+
*/
|
|
19
|
+
mute(nativeId: string): Promise<void>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Call .unmute() on nativeId's player.
|
|
23
|
+
*/
|
|
24
|
+
unmute(nativeId: string): Promise<void>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Call .seek(time) on nativeId's player.
|
|
28
|
+
*/
|
|
29
|
+
seek(nativeId: string, time: number): Promise<void>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Sets timeShift on nativeId's player.
|
|
33
|
+
*/
|
|
34
|
+
timeShift(nativeId: string, offset: number): Promise<void>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Call .destroy() on nativeId's player and remove from registry.
|
|
38
|
+
*/
|
|
39
|
+
destroy(nativeId: string): Promise<void>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Call .setVolume(volume) on nativeId's player.
|
|
43
|
+
*/
|
|
44
|
+
setVolume(nativeId: string, volume: number): Promise<void>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Resolve nativeId's current volume.
|
|
48
|
+
*/
|
|
49
|
+
getVolume(nativeId: string): Promise<number | null>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Resolve nativeId's current time.
|
|
53
|
+
*/
|
|
54
|
+
currentTime(nativeId: string, mode?: string): Promise<number | null>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Resolve nativeId's current playing state.
|
|
58
|
+
*/
|
|
59
|
+
isPlaying(nativeId: string): Promise<boolean | null>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Resolve nativeId's current paused state.
|
|
63
|
+
*/
|
|
64
|
+
isPaused(nativeId: string): Promise<boolean | null>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Resolve nativeId's active source duration.
|
|
68
|
+
*/
|
|
69
|
+
duration(nativeId: string): Promise<number | null>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Resolve nativeId's current muted state.
|
|
73
|
+
*/
|
|
74
|
+
isMuted(nativeId: string): Promise<boolean | null>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Call .unload() on nativeId's player.
|
|
78
|
+
*/
|
|
79
|
+
unload(nativeId: string): Promise<void>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Resolve nativeId's current time shift value.
|
|
83
|
+
*/
|
|
84
|
+
getTimeShift(nativeId: string): Promise<number | null>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Resolve nativeId's live stream state.
|
|
88
|
+
*/
|
|
89
|
+
isLive(nativeId: string): Promise<boolean | null>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Resolve nativeId's maximum time shift value.
|
|
93
|
+
*/
|
|
94
|
+
getMaxTimeShift(nativeId: string): Promise<number | null>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Resolve nativeId's current playback speed.
|
|
98
|
+
*/
|
|
99
|
+
getPlaybackSpeed(nativeId: string): Promise<number | null>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Set playback speed for nativeId's player.
|
|
103
|
+
*/
|
|
104
|
+
setPlaybackSpeed(nativeId: string, playbackSpeed: number): Promise<void>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Resolve nativeId's current ad state.
|
|
108
|
+
*/
|
|
109
|
+
isAd(nativeId: string): Promise<boolean | null>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Set maximum selectable bitrate for nativeId's player.
|
|
113
|
+
*/
|
|
114
|
+
setMaxSelectableBitrate(nativeId: string, maxBitrate: number): Promise<void>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Resolve nativeId's AirPlay activation state (iOS only).
|
|
118
|
+
*/
|
|
119
|
+
isAirPlayActive(nativeId: string): Promise<boolean | null>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Resolve nativeId's AirPlay availability state (iOS only).
|
|
123
|
+
*/
|
|
124
|
+
isAirPlayAvailable(nativeId: string): Promise<boolean | null>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Resolve nativeId's cast availability state.
|
|
128
|
+
*/
|
|
129
|
+
isCastAvailable(nativeId: string): Promise<boolean | null>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Resolve nativeId's current casting state.
|
|
133
|
+
*/
|
|
134
|
+
isCasting(nativeId: string): Promise<boolean | null>;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Initiate casting for nativeId's player.
|
|
138
|
+
*/
|
|
139
|
+
castVideo(nativeId: string): Promise<void>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Stop casting for nativeId's player.
|
|
143
|
+
*/
|
|
144
|
+
castStop(nativeId: string): Promise<void>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Skip current ad for nativeId's player.
|
|
148
|
+
*/
|
|
149
|
+
skipAd(nativeId: string): Promise<void>;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Check if player can play at specified playback speed (iOS only).
|
|
153
|
+
*/
|
|
154
|
+
canPlayAtPlaybackSpeed(
|
|
155
|
+
nativeId: string,
|
|
156
|
+
playbackSpeed: number
|
|
157
|
+
): Promise<boolean | null>;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Creates a new Player instance using the provided config.
|
|
161
|
+
*/
|
|
162
|
+
initializeWithConfig(
|
|
163
|
+
nativeId: string,
|
|
164
|
+
config?: Record<string, any>,
|
|
165
|
+
networkNativeId?: string,
|
|
166
|
+
decoderNativeId?: string
|
|
167
|
+
): Promise<void>;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Creates a new analytics-enabled Player instance.
|
|
171
|
+
*/
|
|
172
|
+
initializeWithAnalyticsConfig(
|
|
173
|
+
nativeId: string,
|
|
174
|
+
analyticsConfig: Record<string, any>,
|
|
175
|
+
config?: Record<string, any>,
|
|
176
|
+
networkNativeId?: string,
|
|
177
|
+
decoderNativeId?: string
|
|
178
|
+
): Promise<void>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Load source into the player.
|
|
182
|
+
* Requires SourceModule dependency.
|
|
183
|
+
*/
|
|
184
|
+
loadSource(nativeId: string, sourceNativeId: string): Promise<void>;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Load offline content into the player.
|
|
188
|
+
*/
|
|
189
|
+
loadOfflineContent(
|
|
190
|
+
nativeId: string,
|
|
191
|
+
offlineContentId: string,
|
|
192
|
+
options?: Record<string, any>
|
|
193
|
+
): Promise<void>;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Get current audio track.
|
|
197
|
+
*/
|
|
198
|
+
getAudioTrack(nativeId: string): Promise<any | null>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Get available audio tracks.
|
|
202
|
+
*/
|
|
203
|
+
getAvailableAudioTracks(nativeId: string): Promise<any[]>;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Set audio track.
|
|
207
|
+
*/
|
|
208
|
+
setAudioTrack(nativeId: string, trackId: string): Promise<void>;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Get current subtitle track.
|
|
212
|
+
*/
|
|
213
|
+
getSubtitleTrack(nativeId: string): Promise<any | null>;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Get available subtitle tracks.
|
|
217
|
+
*/
|
|
218
|
+
getAvailableSubtitles(nativeId: string): Promise<any[]>;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Set subtitle track.
|
|
222
|
+
*/
|
|
223
|
+
setSubtitleTrack(nativeId: string, trackId: string): Promise<void>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Schedule an ad.
|
|
227
|
+
*/
|
|
228
|
+
scheduleAd(nativeId: string, adConfig: Record<string, any>): Promise<void>;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Get thumbnail for time position.
|
|
232
|
+
*/
|
|
233
|
+
getThumbnail(nativeId: string, time: number): Promise<any | null>;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Get current video quality.
|
|
237
|
+
*/
|
|
238
|
+
getVideoQuality(nativeId: string): Promise<any | null>;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Get available video qualities.
|
|
242
|
+
*/
|
|
243
|
+
getAvailableVideoQualities(nativeId: string): Promise<any[]>;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Set video quality.
|
|
247
|
+
*/
|
|
248
|
+
setVideoQuality(nativeId: string, qualityId: string): Promise<void>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export default requireNativeModule<PlayerModule>('PlayerModule');
|