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 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"","sourcesContent":["import {\n Ad,\n AdBreak,\n AdConfig,\n AdItem,\n AdQuartile,\n AdSourceType,\n} from './advertising';\nimport { SubtitleTrack } from './subtitleTrack';\nimport { VideoQuality } from './media';\nimport { AudioTrack } from './audioTrack';\nimport { LoadingState } from './source';\nimport { HttpRequestType } from './network/networkConfig';\n\n/**\n * Base event type for all events.\n */\nexport interface Event {\n /**\n * This event name as it is on the native side.\n */\n name: string;\n /**\n * The UNIX timestamp in which this event happened.\n */\n timestamp: number;\n}\n\n/**\n * Base event type for error and warning events.\n */\nexport interface ErrorEvent extends Event {\n /**\n * Error/Warning's code number.\n */\n code?: number;\n /**\n * Error/Warning's localized message.\n */\n message: string;\n /**\n * Underlying data emitted with the error or warning.\n */\n data?: Record<string, any>;\n}\n\n/**\n * Emitted when a source is loaded into the player.\n * Seeking and time shifting are allowed as soon as this event is seen.\n */\nexport type PlayerActiveEvent = Event;\n\n/**\n * Emitted when a source is unloaded from the player.\n * Seeking and time shifting are not allowed anymore after this event.\n */\nexport type PlayerInactiveEvent = Event;\n\n/**\n * Emitted when a player error occurred.\n */\nexport type PlayerErrorEvent = ErrorEvent;\n\n/**\n * Emitted when a player warning occurred.\n */\nexport type PlayerWarningEvent = ErrorEvent;\n\n/**\n * Emitted when the player is destroyed.\n */\nexport type DestroyEvent = Event;\n\n/**\n * Emitted when the player is muted.\n */\nexport type MutedEvent = Event;\n\n/**\n * Emitted when the player is unmuted.\n */\nexport type UnmutedEvent = Event;\n\n/**\n * Emitted when the player is ready for immediate playback, because initial audio/video\n * has been downloaded.\n */\nexport type ReadyEvent = Event;\n\n/**\n * Emitted when the player is paused.\n */\nexport interface PausedEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when the player received an intention to start/resume playback.\n */\nexport interface PlayEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when playback has started.\n */\nexport interface PlayingEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when the playback of the current media has finished.\n */\nexport type PlaybackFinishedEvent = Event;\n\n/**\n * Source object representation the way it appears on event's payloads such as `SeekEvent`, for example.\n *\n * This interface only type hints what should be the shape of a {@link Source} object inside an event's\n * payload during runtime so it has no direct relation with the `Source` class present in `src/source.ts`.\n *\n * Do not mistake it for a `NativeInstance` type.\n */\nexport interface EventSource {\n /**\n * Event's source duration in seconds.\n */\n duration: number;\n /**\n * Whether this event's source is currently active in a player.\n */\n isActive: boolean;\n /**\n * Whether this event's source is currently attached to a player instance.\n */\n isAttachedToPlayer: boolean;\n /**\n * Metadata for this event's source.\n */\n metadata?: Record<string, any>;\n /**\n * The current {@link LoadingState} of the source.\n */\n loadingState: LoadingState;\n}\n\n/**\n * Represents a seeking position.\n */\nexport interface SeekPosition {\n /**\n * The relevant {@link Source}.\n */\n source: EventSource;\n /**\n * The position within the {@link Source} in seconds.\n */\n time: number;\n}\n\n/**\n * Emitted when the player is about to seek to a new position.\n * This event only applies to VoD streams.\n * When looking for an equivalent for live streams, the {@link TimeShiftEvent} is relevant.\n */\nexport interface SeekEvent extends Event {\n /**\n * Origin source metadata.\n */\n from: SeekPosition;\n /**\n * Target source metadata.\n */\n to: SeekPosition;\n}\n\n/**\n * Emitted when seeking has finished and data to continue playback is available.\n * This event only applies to VoD streams.\n * When looking for an equivalent for live streams, the {@link TimeShiftedEvent} is relevant.\n */\nexport type SeekedEvent = Event;\n\n/**\n * Emitted when the player starts time shifting.\n * This event only applies to live streams.\n * When looking for an equivalent for VoD streams, the {@link SeekEvent} is relevant.\n */\nexport interface TimeShiftEvent extends Event {\n /**\n * The position from which we start the time shift\n */\n position: number;\n /**\n * The position to which we want to jump for the time shift\n */\n targetPosition: number;\n}\n\n/**\n * Emitted when time shifting has finished and data is available to continue playback.\n * This event only applies to live streams.\n * When looking for an equivalent for VoD streams, the {@link SeekedEvent} is relevant.\n */\nexport type TimeShiftedEvent = Event;\n\n/**\n * Emitted when the player begins to stall and to buffer due to an empty buffer.\n */\nexport type StallStartedEvent = Event;\n\n/**\n * Emitted when the player ends stalling, due to enough data in the buffer.\n */\nexport type StallEndedEvent = Event;\n\n/**\n * Emitted when the current playback time has changed.\n */\nexport interface TimeChangedEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n currentTime: number;\n}\n\n/**\n * Emitted when a new source loading has started.\n */\nexport interface SourceLoadEvent extends Event {\n /**\n * Source that is about to load.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when a new source is loaded.\n * This does not mean that the source is immediately ready for playback.\n * {@link ReadyEvent} indicates the player is ready for immediate playback.\n */\nexport interface SourceLoadedEvent extends Event {\n /**\n * Source that was loaded into player.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when the current source has been unloaded.\n */\nexport interface SourceUnloadedEvent extends Event {\n /**\n * Source that was unloaded from player.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when a source error occurred.\n */\nexport type SourceErrorEvent = ErrorEvent;\n\n/**\n * Emitted when a source warning occurred.\n */\nexport type SourceWarningEvent = ErrorEvent;\n\n/**\n * Emitted when a new audio track is added to the player.\n */\nexport interface AudioAddedEvent extends Event {\n /**\n * Audio track that has been added.\n */\n audioTrack: AudioTrack;\n}\n\n/**\n * Emitted when the player's selected audio track has changed.\n */\nexport interface AudioChangedEvent extends Event {\n /**\n * Audio track that was previously selected.\n */\n oldAudioTrack: AudioTrack;\n /**\n * Audio track that is selected now.\n */\n newAudioTrack: AudioTrack;\n}\n\n/**\n * Emitted when an audio track is removed from the player.\n */\nexport interface AudioRemovedEvent extends Event {\n /**\n * Audio track that has been removed.\n */\n audioTrack: AudioTrack;\n}\n\n/**\n * Emitted when a new subtitle track is added to the player.\n */\nexport interface SubtitleAddedEvent extends Event {\n /**\n * Subtitle track that has been added.\n */\n subtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when a subtitle track is removed from the player.\n */\nexport interface SubtitleRemovedEvent extends Event {\n /**\n * Subtitle track that has been removed.\n */\n subtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when the player's selected subtitle track has changed.\n */\nexport interface SubtitleChangedEvent extends Event {\n /**\n * Subtitle track that was previously selected.\n */\n oldSubtitleTrack: SubtitleTrack;\n /**\n * Subtitle track that is selected now.\n */\n newSubtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when the player enters Picture in Picture mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type PictureInPictureEnterEvent = Event;\n\n/**\n * Emitted when the player exits Picture in Picture mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type PictureInPictureExitEvent = Event;\n\n/**\n * Emitted when the player has finished entering Picture in Picture mode on iOS.\n *\n * @remarks Platform: iOS\n */\nexport type PictureInPictureEnteredEvent = Event;\n\n/**\n * Emitted when the player has finished exiting Picture in Picture mode on iOS.\n *\n * @remarks Platform: iOS\n */\nexport type PictureInPictureExitedEvent = Event;\n\n/**\n * Emitted when the fullscreen functionality has been enabled.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenEnabledEvent = Event;\n\n/**\n * Emitted when the fullscreen functionality has been disabled.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenDisabledEvent = Event;\n\n/**\n * Emitted when the player enters fullscreen mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenEnterEvent = Event;\n\n/**\n * Emitted when the player exits fullscreen mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenExitEvent = Event;\n\n/**\n * Emitted when the availability of the Picture in Picture mode changed on Android.\n *\n * @remarks Platform: Android\n */\nexport interface PictureInPictureAvailabilityChangedEvent extends Event {\n /**\n * Whether Picture in Picture is available.\n */\n isPictureInPictureAvailable: boolean;\n}\n\n/**\n * Emitted when an ad break has started.\n */\nexport interface AdBreakStartedEvent extends Event {\n /**\n * The {@link AdBreak} that has started.\n */\n adBreak?: AdBreak;\n}\n\n/**\n * Emitted when an ad break has finished.\n */\nexport interface AdBreakFinishedEvent extends Event {\n /**\n * The {@link AdBreak} that has finished.\n */\n adBreak?: AdBreak;\n}\n\n/**\n * Emitted when the playback of an ad has started.\n */\nexport interface AdStartedEvent extends Event {\n /**\n * The {@link Ad} this event is related to.\n */\n ad?: Ad;\n /**\n * The target URL to open once the user clicks on the ad.\n */\n clickThroughUrl?: string;\n /**\n * The {@link AdSourceType} of the started ad.\n */\n clientType?: AdSourceType;\n /**\n * The duration of the ad in seconds.\n */\n duration: number;\n /**\n * The index of the ad in the queue.\n */\n indexInQueue: number;\n /**\n * The position of the corresponding ad.\n */\n position?: string;\n /**\n * The skip offset of the ad in seconds.\n */\n skipOffset: number;\n /**\n * The main content time at which the ad is played.\n */\n timeOffset: number;\n}\n\n/**\n * Emitted when an ad has finished playback.\n */\nexport interface AdFinishedEvent extends Event {\n /**\n * The {@link Ad} that finished playback.\n */\n ad?: Ad;\n}\n\n/**\n * Emitted when an error with the ad playback occurs.\n */\nexport interface AdErrorEvent extends ErrorEvent {\n /**\n * The {@link AdConfig} for which the ad error occurred.\n */\n adConfig?: AdConfig;\n /**\n * The {@link AdItem} for which the ad error occurred.\n */\n adItem?: AdItem;\n}\n\n/**\n * Emitted when an ad was clicked.\n */\nexport interface AdClickedEvent extends Event {\n /**\n * The click through url of the ad.\n */\n clickThroughUrl?: string;\n}\n\n/**\n * Emitted when an ad was skipped.\n */\nexport interface AdSkippedEvent extends Event {\n /**\n * The ad that was skipped.\n */\n ad?: Ad;\n}\n\n/**\n * Emitted when the playback of an ad has progressed over a quartile boundary.\n */\nexport interface AdQuartileEvent extends Event {\n /**\n * The {@link AdQuartile} boundary that playback has progressed over.\n */\n quartile: AdQuartile;\n}\n\n/**\n * Emitted when an ad manifest was successfully downloaded, parsed and added into the ad break schedule.\n */\nexport interface AdScheduledEvent extends Event {\n /**\n * The total number of scheduled ads.\n */\n numberOfAds: number;\n}\n\n/**\n * Emitted when the download of an ad manifest is started.\n */\nexport interface AdManifestLoadEvent extends Event {\n /**\n * The {@link AdBreak} this event is related to.\n */\n adBreak?: AdBreak;\n /**\n * The {@link AdConfig} of the loaded ad manifest.\n */\n adConfig?: AdConfig;\n}\n\n/**\n * Emitted when an ad manifest was successfully loaded.\n */\nexport interface AdManifestLoadedEvent extends Event {\n /**\n * The {@link AdBreak} this event is related to.\n */\n adBreak?: AdBreak;\n /**\n * The {@link AdConfig} of the loaded ad manifest.\n */\n adConfig?: AdConfig;\n /**\n * How long it took for the ad tag to be downloaded in milliseconds.\n */\n downloadTime: number;\n}\n\n/**\n * Emitted when current video download quality has changed.\n */\nexport interface VideoDownloadQualityChangedEvent extends Event {\n /**\n * The new quality\n */\n newVideoQuality: VideoQuality;\n /**\n * The previous quality\n */\n oldVideoQuality: VideoQuality;\n}\n\n/**\n * Emitted when the current video playback quality has changed.\n */\nexport interface VideoPlaybackQualityChangedEvent extends Event {\n /**\n * The new quality\n */\n newVideoQuality: VideoQuality;\n /**\n * The previous quality\n */\n oldVideoQuality: VideoQuality;\n}\n\n/**\n * Emitted when casting to a cast-compatible device is available.\n */\nexport type CastAvailableEvent = Event;\n\n/**\n * Emitted when the playback on a cast-compatible device was paused.\n *\n * On Android {@link PausedEvent} is also emitted while casting.\n */\nexport type CastPausedEvent = Event;\n\n/**\n * Emitted when the playback on a cast-compatible device has finished.\n *\n * On Android {@link PlaybackFinishedEvent} is also emitted while casting.\n */\nexport type CastPlaybackFinishedEvent = Event;\n\n/**\n * Emitted when playback on a cast-compatible device has started.\n *\n * On Android {@link PlayingEvent} is also emitted while casting.\n */\nexport type CastPlayingEvent = Event;\n\n/**\n * Emitted when the cast app is launched successfully.\n */\nexport interface CastStartedEvent extends Event {\n /**\n * The name of the cast device on which the app was launched.\n */\n deviceName: string | null;\n}\n\n/**\n * Emitted when casting is initiated, but the user still needs to choose which device should be used.\n */\nexport type CastStartEvent = Event;\n\n/**\n * Emitted when casting to a cast-compatible device is stopped.\n */\nexport type CastStoppedEvent = Event;\n\n/**\n * Emitted when the time update from the currently used cast-compatible device is received.\n */\nexport type CastTimeUpdatedEvent = Event;\n\n/**\n * Contains information for the {@link CastWaitingForDeviceEvent}.\n */\nexport interface CastPayload {\n /**\n * The current time in seconds.\n */\n currentTime: number;\n /**\n * The name of the chosen cast device.\n */\n deviceName: string | null;\n /**\n * The type of the payload (always `\"cast\"`).\n */\n type: string;\n}\n\n/**\n * Emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for\n * playback.\n */\nexport interface CastWaitingForDeviceEvent extends Event {\n /**\n * The {@link CastPayload} object for the event\n */\n castPayload: CastPayload;\n}\n\n/**\n * Emitted when a download was finished.\n */\nexport interface DownloadFinishedEvent extends Event {\n /**\n * The time needed to finish the request, in seconds.\n */\n downloadTime: number;\n /**\n * Which type of request this was.\n */\n requestType: HttpRequestType;\n /**\n * The HTTP status code of the request.\n * If opening the connection failed, a value of `0` is returned.\n */\n httpStatus: number;\n /**\n * If the download was successful.\n */\n isSuccess: boolean;\n /**\n * The last redirect location, or `null` if no redirect happened.\n */\n lastRedirectLocation?: string;\n /**\n * The size of the downloaded data, in bytes.\n */\n size: number;\n /**\n * The URL of the request.\n */\n url: string;\n}\n\n/**\n * Emitted when the player transitions from one playback speed to another.\n * @remarks Platform: iOS, tvOS\n */\nexport interface PlaybackSpeedChangedEvent extends Event {\n /**\n * The playback speed before the change happened.\n */\n from: number;\n /**\n * The playback speed after the change happened.\n */\n to: number;\n}\n\n/**\n * Emitted when a subtitle entry transitions into the active status.\n */\nexport interface CueEnterEvent extends Event {\n /**\n * The playback time in seconds when the subtitle should be rendered.\n */\n start: number;\n /**\n * The playback time in seconds when the subtitle should be hidden.\n */\n end: number;\n /**\n * The textual content of this subtitle.\n */\n text?: string;\n /**\n * Data URI for image data of this subtitle.\n */\n image?: string;\n}\n\n/**\n * Emitted when an active subtitle entry transitions into the inactive status.\n */\nexport interface CueExitEvent extends Event {\n /**\n * The playback time in seconds when the subtitle should be rendered.\n */\n start: number;\n /**\n * The playback time in seconds when the subtitle should be hidden.\n */\n end: number;\n /**\n * The textual content of this subtitle.\n */\n text?: string;\n /**\n * Data URI for image data of this subtitle.\n */\n image?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC","sourcesContent":["export * from './usePlayer';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Player } from '../player';
|
|
2
|
+
import { PlayerConfig } from '../playerConfig';
|
|
3
|
+
/**
|
|
4
|
+
* React hook that creates and returns a reference to a `Player` instance
|
|
5
|
+
* that can be used inside any component.
|
|
6
|
+
*/
|
|
7
|
+
export declare function usePlayer(config?: PlayerConfig): Player;
|
|
8
|
+
//# sourceMappingURL=usePlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlayer.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlayer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { Player } from '../player';
|
|
3
|
+
/**
|
|
4
|
+
* React hook that creates and returns a reference to a `Player` instance
|
|
5
|
+
* that can be used inside any component.
|
|
6
|
+
*/
|
|
7
|
+
export function usePlayer(config) {
|
|
8
|
+
return useRef(new Player(config)).current;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=usePlayer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlayer.js","sourceRoot":"","sources":["../../src/hooks/usePlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAAqB;IAC7C,OAAO,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AAC5C,CAAC","sourcesContent":["import { useRef } from 'react';\nimport { Player } from '../player';\nimport { PlayerConfig } from '../playerConfig';\n\n/**\n * React hook that creates and returns a reference to a `Player` instance\n * that can be used inside any component.\n */\nexport function usePlayer(config?: PlayerConfig): Player {\n return useRef(new Player(config)).current;\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { Event } from '../events';
|
|
3
|
+
/**
|
|
4
|
+
* A function that takes a generic event as argument.
|
|
5
|
+
*/
|
|
6
|
+
type Callback<E> = (event: E) => void;
|
|
7
|
+
/**
|
|
8
|
+
* A function that takes the synthetic version of a generic event as argument.
|
|
9
|
+
*/
|
|
10
|
+
type NativeCallback<E> = (event: {
|
|
11
|
+
nativeEvent: E;
|
|
12
|
+
}) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Create a proxy function that unwraps native events.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useProxy(viewRef: RefObject<any>): <E extends Event>(callback?: Callback<E>) => NativeCallback<E>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProxy.d.ts","sourceRoot":"","sources":["../../src/hooks/useProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGlC;;GAEG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AAEtC;;GAEG;AACH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,CAAC,CAAA;CAAE,KAAK,IAAI,CAAC;AAE7D;;GAEG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,GACtB,CAAC,CAAC,SAAS,KAAK,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,CAahE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { findNodeHandle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Create a proxy function that unwraps native events.
|
|
5
|
+
*/
|
|
6
|
+
export function useProxy(viewRef) {
|
|
7
|
+
return useCallback((callback) => (event) => {
|
|
8
|
+
const eventTargetNodeHandle = event.nativeEvent.target;
|
|
9
|
+
if (eventTargetNodeHandle !== findNodeHandle(viewRef.current)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const { target, ...eventWithoutTarget } = event.nativeEvent;
|
|
13
|
+
callback?.(eventWithoutTarget);
|
|
14
|
+
}, [viewRef]);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=useProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProxy.js","sourceRoot":"","sources":["../../src/hooks/useProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAY9C;;GAEG;AACH,MAAM,UAAU,QAAQ,CACtB,OAAuB;IAEvB,OAAO,WAAW,CAChB,CAAkB,QAAsB,EAAE,EAAE,CAC1C,CAAC,KAAyB,EAAE,EAAE;QAC5B,MAAM,qBAAqB,GAAY,KAAK,CAAC,WAAmB,CAAC,MAAM,CAAC;QACxE,IAAI,qBAAqB,KAAK,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,OAAO;QACT,CAAC;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,GAAG,KAAK,CAAC,WAAkB,CAAC;QACnE,QAAQ,EAAE,CAAC,kBAAuB,CAAC,CAAC;IACtC,CAAC,EACH,CAAC,OAAO,CAAC,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { RefObject, useCallback } from 'react';\nimport { Event } from '../events';\nimport { findNodeHandle } from 'react-native';\n\n/**\n * A function that takes a generic event as argument.\n */\ntype Callback<E> = (event: E) => void;\n\n/**\n * A function that takes the synthetic version of a generic event as argument.\n */\ntype NativeCallback<E> = (event: { nativeEvent: E }) => void;\n\n/**\n * Create a proxy function that unwraps native events.\n */\nexport function useProxy(\n viewRef: RefObject<any>\n): <E extends Event>(callback?: Callback<E>) => NativeCallback<E> {\n return useCallback(\n <E extends Event>(callback?: Callback<E>) =>\n (event: { nativeEvent: E }) => {\n const eventTargetNodeHandle: number = (event.nativeEvent as any).target;\n if (eventTargetNodeHandle !== findNodeHandle(viewRef.current)) {\n return;\n }\n const { target, ...eventWithoutTarget } = event.nativeEvent as any;\n callback?.(eventWithoutTarget as E);\n },\n [viewRef]\n );\n}\n"]}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from './adaptationConfig';
|
|
2
|
+
export * from './advertising';
|
|
3
|
+
export * from './analytics';
|
|
4
|
+
export * from './audioSession';
|
|
5
|
+
export * from './components';
|
|
6
|
+
export * from './drm';
|
|
7
|
+
export * from './events';
|
|
8
|
+
export * from './hooks';
|
|
9
|
+
export * from './player';
|
|
10
|
+
export * from './source';
|
|
11
|
+
export * from './subtitleTrack';
|
|
12
|
+
export * from './styleConfig';
|
|
13
|
+
export * from './ui';
|
|
14
|
+
export * from './offline';
|
|
15
|
+
export * from './thumbnail';
|
|
16
|
+
export * from './remoteControlConfig';
|
|
17
|
+
export * from './bitmovinCastManager';
|
|
18
|
+
export * from './audioTrack';
|
|
19
|
+
export * from './media';
|
|
20
|
+
export * from './tweaksConfig';
|
|
21
|
+
export * from './bufferConfig';
|
|
22
|
+
export * from './playbackConfig';
|
|
23
|
+
export * from './playerConfig';
|
|
24
|
+
export * from './liveConfig';
|
|
25
|
+
export * from './bufferApi';
|
|
26
|
+
export * from './network';
|
|
27
|
+
export * from './mediaControlConfig';
|
|
28
|
+
export * from './debug';
|
|
29
|
+
export * from './decoder/decoderConfig';
|
|
30
|
+
export * from './mediaTrackRole';
|
|
31
|
+
export * from './subtitleFormat';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from './adaptationConfig';
|
|
2
|
+
export * from './advertising';
|
|
3
|
+
export * from './analytics';
|
|
4
|
+
export * from './audioSession';
|
|
5
|
+
export * from './components';
|
|
6
|
+
export * from './drm';
|
|
7
|
+
export * from './events';
|
|
8
|
+
export * from './hooks';
|
|
9
|
+
export * from './player';
|
|
10
|
+
export * from './source';
|
|
11
|
+
export * from './subtitleTrack';
|
|
12
|
+
export * from './styleConfig';
|
|
13
|
+
export * from './ui';
|
|
14
|
+
export * from './offline';
|
|
15
|
+
export * from './thumbnail';
|
|
16
|
+
export * from './remoteControlConfig';
|
|
17
|
+
export * from './bitmovinCastManager';
|
|
18
|
+
export * from './audioTrack';
|
|
19
|
+
export * from './media';
|
|
20
|
+
export * from './tweaksConfig';
|
|
21
|
+
export * from './bufferConfig';
|
|
22
|
+
export * from './playbackConfig';
|
|
23
|
+
export * from './playerConfig';
|
|
24
|
+
export * from './liveConfig';
|
|
25
|
+
export * from './bufferApi';
|
|
26
|
+
export * from './network';
|
|
27
|
+
export * from './mediaControlConfig';
|
|
28
|
+
export * from './debug';
|
|
29
|
+
export * from './decoder/decoderConfig';
|
|
30
|
+
export * from './mediaTrackRole';
|
|
31
|
+
export * from './subtitleFormat';
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './adaptationConfig';\nexport * from './advertising';\nexport * from './analytics';\nexport * from './audioSession';\nexport * from './components';\nexport * from './drm';\nexport * from './events';\nexport * from './hooks';\nexport * from './player';\nexport * from './source';\nexport * from './subtitleTrack';\nexport * from './styleConfig';\nexport * from './ui';\nexport * from './offline';\nexport * from './thumbnail';\nexport * from './remoteControlConfig';\nexport * from './bitmovinCastManager';\nexport * from './audioTrack';\nexport * from './media';\nexport * from './tweaksConfig';\nexport * from './bufferConfig';\nexport * from './playbackConfig';\nexport * from './playerConfig';\nexport * from './liveConfig';\nexport * from './bufferApi';\nexport * from './network';\nexport * from './mediaControlConfig';\nexport * from './debug';\nexport * from './decoder/decoderConfig';\nexport * from './mediaTrackRole';\nexport * from './subtitleFormat';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains config values regarding the behaviour when playing live streams.
|
|
3
|
+
*/
|
|
4
|
+
export interface LiveConfig {
|
|
5
|
+
/**
|
|
6
|
+
* The minimum buffer depth of a stream needed to enable time shifting.
|
|
7
|
+
* When the internal value for the maximal possible timeshift is lower than this value,
|
|
8
|
+
* timeshifting should be disabled. That means `Player.maxTimeShift` returns `0` in that case.
|
|
9
|
+
* This value should always be non-positive value, default value is `-40`.
|
|
10
|
+
*/
|
|
11
|
+
minTimeshiftBufferDepth?: number;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=liveConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveConfig.d.ts","sourceRoot":"","sources":["../src/liveConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveConfig.js","sourceRoot":"","sources":["../src/liveConfig.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Contains config values regarding the behaviour when playing live streams.\n */\nexport interface LiveConfig {\n /**\n * The minimum buffer depth of a stream needed to enable time shifting.\n * When the internal value for the maximal possible timeshift is lower than this value,\n * timeshifting should be disabled. That means `Player.maxTimeShift` returns `0` in that case.\n * This value should always be non-positive value, default value is `-40`.\n */\n minTimeshiftBufferDepth?: number;\n}\n"]}
|
package/build/media.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quality definition of a video representation.
|
|
3
|
+
*/
|
|
4
|
+
export interface VideoQuality {
|
|
5
|
+
/**
|
|
6
|
+
* The id of the media quality.
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* The label of the media quality that should be exposed to the user.
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The bitrate of the media quality.
|
|
15
|
+
*/
|
|
16
|
+
bitrate?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The codec of the media quality.
|
|
19
|
+
*/
|
|
20
|
+
codec?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The frame rate of the video quality. If the frame rate is not known or not applicable a value of -1 will be returned.
|
|
23
|
+
*/
|
|
24
|
+
frameRate?: number;
|
|
25
|
+
/**
|
|
26
|
+
* The height of the video quality.
|
|
27
|
+
*/
|
|
28
|
+
height?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The width of the video quality.
|
|
31
|
+
*/
|
|
32
|
+
width?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Quality definition of an audio representation.
|
|
36
|
+
*
|
|
37
|
+
* @platform Android
|
|
38
|
+
*/
|
|
39
|
+
export interface AudioQuality {
|
|
40
|
+
/**
|
|
41
|
+
* The id of the media quality.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* The label of the media quality that should be exposed to the user.
|
|
46
|
+
*/
|
|
47
|
+
label?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate
|
|
50
|
+
* if known, or else -1.
|
|
51
|
+
*/
|
|
52
|
+
bitrate?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The average bitrate in bits per second, or -1 if unknown or not applicable. The
|
|
55
|
+
* way in which this field is populated depends on the type of media to which the format
|
|
56
|
+
* corresponds:
|
|
57
|
+
*
|
|
58
|
+
* - DASH representations: Always -1.
|
|
59
|
+
* - HLS variants: The `AVERAGE-BANDWIDTH` attribute defined on the corresponding
|
|
60
|
+
* `EXT-X-STREAM-INF` tag in the multivariant playlist, or -1 if not present.
|
|
61
|
+
* - SmoothStreaming track elements: The `Bitrate` attribute defined on the
|
|
62
|
+
* corresponding `TrackElement` in the manifest, or -1 if not present.
|
|
63
|
+
* - Progressive container formats: Often -1, but may be populated with
|
|
64
|
+
* the average bitrate of the container if known.
|
|
65
|
+
*/
|
|
66
|
+
averageBitrate?: number;
|
|
67
|
+
/**
|
|
68
|
+
* The peak bitrate in bits per second, or -1 if unknown or not applicable. The way
|
|
69
|
+
* in which this field is populated depends on the type of media to which the format corresponds:
|
|
70
|
+
*
|
|
71
|
+
* - DASH representations: The `@bandwidth` attribute of the corresponding
|
|
72
|
+
* `Representation` element in the manifest.
|
|
73
|
+
* - HLS variants: The `BANDWIDTH` attribute defined on the corresponding
|
|
74
|
+
* `EXT-X-STREAM-INF` tag.
|
|
75
|
+
* - SmoothStreaming track elements: Always -1.
|
|
76
|
+
* - Progressive container formats: Often -1, but may be populated with
|
|
77
|
+
* the peak bitrate of the container if known.
|
|
78
|
+
*/
|
|
79
|
+
peakBitrate?: number;
|
|
80
|
+
/**
|
|
81
|
+
* The codec of the media quality.
|
|
82
|
+
*/
|
|
83
|
+
codec?: string;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/build/media.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Quality definition of a video representation.\n */\nexport interface VideoQuality {\n /**\n * The id of the media quality.\n */\n id: string;\n /**\n * The label of the media quality that should be exposed to the user.\n */\n label?: string;\n /**\n * The bitrate of the media quality.\n */\n bitrate?: number;\n /**\n * The codec of the media quality.\n */\n codec?: string;\n /**\n * The frame rate of the video quality. If the frame rate is not known or not applicable a value of -1 will be returned.\n */\n frameRate?: number;\n /**\n * The height of the video quality.\n */\n height?: number;\n /**\n * The width of the video quality.\n */\n width?: number;\n}\n\n/**\n * Quality definition of an audio representation.\n *\n * @platform Android\n */\nexport interface AudioQuality {\n /**\n * The id of the media quality.\n */\n id: string;\n /**\n * The label of the media quality that should be exposed to the user.\n */\n label?: string;\n /**\n * The bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate\n * if known, or else -1.\n */\n bitrate?: number;\n /**\n * The average bitrate in bits per second, or -1 if unknown or not applicable. The\n * way in which this field is populated depends on the type of media to which the format\n * corresponds:\n *\n * - DASH representations: Always -1.\n * - HLS variants: The `AVERAGE-BANDWIDTH` attribute defined on the corresponding\n * `EXT-X-STREAM-INF` tag in the multivariant playlist, or -1 if not present.\n * - SmoothStreaming track elements: The `Bitrate` attribute defined on the\n * corresponding `TrackElement` in the manifest, or -1 if not present.\n * - Progressive container formats: Often -1, but may be populated with\n * the average bitrate of the container if known.\n */\n averageBitrate?: number;\n /**\n * The peak bitrate in bits per second, or -1 if unknown or not applicable. The way\n * in which this field is populated depends on the type of media to which the format corresponds:\n *\n * - DASH representations: The `@bandwidth` attribute of the corresponding\n * `Representation` element in the manifest.\n * - HLS variants: The `BANDWIDTH` attribute defined on the corresponding\n * `EXT-X-STREAM-INF` tag.\n * - SmoothStreaming track elements: Always -1.\n * - Progressive container formats: Often -1, but may be populated with\n * the peak bitrate of the container if known.\n */\n peakBitrate?: number;\n /**\n * The codec of the media quality.\n */\n codec?: string;\n}\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configures the media control information for the application. This information will be displayed
|
|
3
|
+
* wherever current media information typically appears, such as the lock screen, in notifications, and
|
|
4
|
+
* and inside the control center.
|
|
5
|
+
*/
|
|
6
|
+
export interface MediaControlConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Enable the default behavior of displaying media information
|
|
9
|
+
* on the lock screen, in notifications, and within the control center.
|
|
10
|
+
*
|
|
11
|
+
* Default is `true`.
|
|
12
|
+
*
|
|
13
|
+
* For a detailed list of the supported features in the **default behavior**,
|
|
14
|
+
* check the **Default Supported Features** section.
|
|
15
|
+
*
|
|
16
|
+
* @remarks Enabling this flag will automatically treat {@link TweaksConfig.updatesNowPlayingInfoCenter} as `false`.
|
|
17
|
+
*
|
|
18
|
+
* ## Limitations
|
|
19
|
+
* ---
|
|
20
|
+
* - Android: If an app creates multiple player instances, the player shown in media controls is the latest one created having media controls enabled.
|
|
21
|
+
* - At the moment, the current media information is disabled during casting.
|
|
22
|
+
*
|
|
23
|
+
* ## Known Issues
|
|
24
|
+
* ---
|
|
25
|
+
* **iOS**:
|
|
26
|
+
* - There is unexpected behavior when using the IMA SDK. The Google IMA SDK adds its own commands
|
|
27
|
+
* for play/pause as soon as the ad starts loading (not when it starts playing). Within this window
|
|
28
|
+
* (approximately around 10 seconds), it is possible that both the ad and the main content are playing
|
|
29
|
+
* at the same time when a user interacts with the media control feature.
|
|
30
|
+
*
|
|
31
|
+
* ## Default Supported Features
|
|
32
|
+
* ---
|
|
33
|
+
* Here is the list of features supported by the default behavior.
|
|
34
|
+
*
|
|
35
|
+
* ### Populated Metadata
|
|
36
|
+
* - media type (to visualize the correct kind of data — _e.g. a waveform for audio files_)
|
|
37
|
+
* - title
|
|
38
|
+
* - artwork
|
|
39
|
+
* - elapsed time
|
|
40
|
+
* - duration
|
|
41
|
+
*
|
|
42
|
+
* **Android-only**
|
|
43
|
+
* - source description
|
|
44
|
+
*
|
|
45
|
+
* **iOS-only**
|
|
46
|
+
* - live or VOD status
|
|
47
|
+
* - playback rate
|
|
48
|
+
* - default playback rate
|
|
49
|
+
*
|
|
50
|
+
* ### Registered Commands
|
|
51
|
+
* - toggle play/pause
|
|
52
|
+
* - change playback position
|
|
53
|
+
*
|
|
54
|
+
* **iOS-only**
|
|
55
|
+
* - skip forward
|
|
56
|
+
* - skip backward
|
|
57
|
+
* - play
|
|
58
|
+
* - pause
|
|
59
|
+
*/
|
|
60
|
+
isEnabled?: boolean;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=mediaControlConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaControlConfig.d.ts","sourceRoot":"","sources":["../src/mediaControlConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaControlConfig.js","sourceRoot":"","sources":["../src/mediaControlConfig.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Configures the media control information for the application. This information will be displayed\n * wherever current media information typically appears, such as the lock screen, in notifications, and\n * and inside the control center.\n */\nexport interface MediaControlConfig {\n /**\n * Enable the default behavior of displaying media information\n * on the lock screen, in notifications, and within the control center.\n *\n * Default is `true`.\n *\n * For a detailed list of the supported features in the **default behavior**,\n * check the **Default Supported Features** section.\n *\n * @remarks Enabling this flag will automatically treat {@link TweaksConfig.updatesNowPlayingInfoCenter} as `false`.\n *\n * ## Limitations\n * ---\n * - Android: If an app creates multiple player instances, the player shown in media controls is the latest one created having media controls enabled.\n * - At the moment, the current media information is disabled during casting.\n *\n * ## Known Issues\n * ---\n * **iOS**:\n * - There is unexpected behavior when using the IMA SDK. The Google IMA SDK adds its own commands\n * for play/pause as soon as the ad starts loading (not when it starts playing). Within this window\n * (approximately around 10 seconds), it is possible that both the ad and the main content are playing\n * at the same time when a user interacts with the media control feature.\n *\n * ## Default Supported Features\n * ---\n * Here is the list of features supported by the default behavior.\n *\n * ### Populated Metadata\n * - media type (to visualize the correct kind of data — _e.g. a waveform for audio files_)\n * - title\n * - artwork\n * - elapsed time\n * - duration\n *\n * **Android-only**\n * - source description\n *\n * **iOS-only**\n * - live or VOD status\n * - playback rate\n * - default playback rate\n *\n * ### Registered Commands\n * - toggle play/pause\n * - change playback position\n *\n * **iOS-only**\n * - skip forward\n * - skip backward\n * - play\n * - pause\n */\n isEnabled?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `MediaTrackRole` interface represents the role of a media track in a media stream.
|
|
3
|
+
*/
|
|
4
|
+
export interface MediaTrackRole {
|
|
5
|
+
/**
|
|
6
|
+
* The unique identifier for this role instance.
|
|
7
|
+
* - On Android: Corresponds to the native [`MediaTrackRole.id`](https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-media-track-role/id.html).
|
|
8
|
+
* May be undefined.
|
|
9
|
+
* - On iOS and tvOS: `undefined`, as HLS characteristics do not have inherent IDs in this context.
|
|
10
|
+
*/
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The URI identifying the scheme used for the role definition.
|
|
14
|
+
* - On Android: Corresponds to the native [`MediaTrackRole.schemeIdUri`](https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-media-track-role/scheme-id-uri.html)
|
|
15
|
+
* (e.g., "urn:mpeg:dash:role:2011").
|
|
16
|
+
* - On iOS and tvOS: predefined URN `urn:hls:characteristic` representing HLS characteristics.
|
|
17
|
+
*/
|
|
18
|
+
schemeIdUri: string;
|
|
19
|
+
/**
|
|
20
|
+
* The value of the role within the specified scheme.
|
|
21
|
+
* - On Android: Corresponds to the native [`MediaTrackRole.value`](https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-media-track-role/value.html)
|
|
22
|
+
* (e.g., "main", "caption", "description").
|
|
23
|
+
* - On iOS and tvOS: The raw HLS characteristic string (e.g., "public.accessibility.describes-music-and-sound",
|
|
24
|
+
* "public.accessibility.transcribes-spoken-dialog").
|
|
25
|
+
*/
|
|
26
|
+
value?: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=mediaTrackRole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaTrackRole.d.ts","sourceRoot":"","sources":["../src/mediaTrackRole.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediaTrackRole.js","sourceRoot":"","sources":["../src/mediaTrackRole.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The `MediaTrackRole` interface represents the role of a media track in a media stream.\n */\nexport interface MediaTrackRole {\n /**\n * The unique identifier for this role instance.\n * - On Android: Corresponds to the native [`MediaTrackRole.id`](https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-media-track-role/id.html).\n * May be undefined.\n * - On iOS and tvOS: `undefined`, as HLS characteristics do not have inherent IDs in this context.\n */\n id?: string;\n\n /**\n * The URI identifying the scheme used for the role definition.\n * - On Android: Corresponds to the native [`MediaTrackRole.schemeIdUri`](https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-media-track-role/scheme-id-uri.html)\n * (e.g., \"urn:mpeg:dash:role:2011\").\n * - On iOS and tvOS: predefined URN `urn:hls:characteristic` representing HLS characteristics.\n */\n schemeIdUri: string;\n\n /**\n * The value of the role within the specified scheme.\n * - On Android: Corresponds to the native [`MediaTrackRole.value`](https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-media-track-role/value.html)\n * (e.g., \"main\", \"caption\", \"description\").\n * - On iOS and tvOS: The raw HLS characteristic string (e.g., \"public.accessibility.describes-music-and-sound\",\n * \"public.accessibility.transcribes-spoken-dialog\").\n */\n value?: string;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
|
+
export type AudioSessionModuleEvents = Record<string, any>;
|
|
3
|
+
declare class AudioSessionModule extends NativeModule<AudioSessionModuleEvents> {
|
|
4
|
+
setCategory(category: string): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: AudioSessionModule | null;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=AudioSessionModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioSessionModule.d.ts","sourceRoot":"","sources":["../../src/modules/AudioSessionModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAGtE,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE3D,OAAO,OAAO,kBAAmB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IAC7E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAC7C;;AAGD,wBAES"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioSessionModule.js","sourceRoot":"","sources":["../../src/modules/AudioSessionModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQxC,kBAAkB;AAClB,eAAe,QAAQ,CAAC,EAAE,KAAK,KAAK;IAClC,CAAC,CAAC,mBAAmB,CAAqB,oBAAoB,CAAC;IAC/D,CAAC,CAAC,IAAI,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nexport type AudioSessionModuleEvents = Record<string, any>;\n\ndeclare class AudioSessionModule extends NativeModule<AudioSessionModuleEvents> {\n setCategory(category: string): Promise<void>;\n}\n\n// iOS-only module\nexport default Platform.OS === 'ios'\n ? requireNativeModule<AudioSessionModule>('AudioSessionModule')\n : null;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
|
+
export type BitmovinCastManagerModuleEvents = Record<string, any>;
|
|
3
|
+
declare class BitmovinCastManagerModule extends NativeModule<BitmovinCastManagerModuleEvents> {
|
|
4
|
+
isInitialized(): Promise<boolean>;
|
|
5
|
+
initializeCastManager(options?: Record<string, any>): Promise<void>;
|
|
6
|
+
sendMessage(message: string, messageNamespace?: string): Promise<void>;
|
|
7
|
+
updateContext?(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: BitmovinCastManagerModule;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=BitmovinCastManagerModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitmovinCastManagerModule.d.ts","sourceRoot":"","sources":["../../src/modules/BitmovinCastManagerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAElE,OAAO,OAAO,yBAA0B,SAAQ,YAAY,CAAC,+BAA+B,CAAC;IAC3F,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IACjC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IACnE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IACtE,aAAa,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;CAChC;;AAED,wBAEE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitmovinCastManagerModule.js","sourceRoot":"","sources":["../../src/modules/BitmovinCastManagerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAWtE,eAAe,mBAAmB,CAChC,2BAA2B,CAC5B,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\n\nexport type BitmovinCastManagerModuleEvents = Record<string, any>;\n\ndeclare class BitmovinCastManagerModule extends NativeModule<BitmovinCastManagerModuleEvents> {\n isInitialized(): Promise<boolean>;\n initializeCastManager(options?: Record<string, any>): Promise<void>;\n sendMessage(message: string, messageNamespace?: string): Promise<void>;\n updateContext?(): Promise<void>; // Android only\n}\n\nexport default requireNativeModule<BitmovinCastManagerModule>(\n 'BitmovinCastManagerModule'\n);\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
|
+
import { BufferLevels } from '../bufferApi';
|
|
3
|
+
export type BufferModuleEvents = Record<string, any>;
|
|
4
|
+
declare class BufferModule extends NativeModule<BufferModuleEvents> {
|
|
5
|
+
/**
|
|
6
|
+
* Get buffer level for the specified player and buffer type.
|
|
7
|
+
*/
|
|
8
|
+
getLevel(playerId: string, type: string): Promise<BufferLevels>;
|
|
9
|
+
/**
|
|
10
|
+
* Set target level for the specified player and buffer type.
|
|
11
|
+
*/
|
|
12
|
+
setTargetLevel(playerId: string, type: string, value: number): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: BufferModule;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=BufferModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BufferModule.d.ts","sourceRoot":"","sources":["../../src/modules/BufferModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErD,OAAO,OAAO,YAAa,SAAQ,YAAY,CAAC,kBAAkB,CAAC;IACjE;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAE/D;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAC7E;;AAED,wBAAiE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BufferModule.js","sourceRoot":"","sources":["../../src/modules/BufferModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAiBtE,eAAe,mBAAmB,CAAe,cAAc,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\nimport { BufferLevels } from '../bufferApi';\n\nexport type BufferModuleEvents = Record<string, any>;\n\ndeclare class BufferModule extends NativeModule<BufferModuleEvents> {\n /**\n * Get buffer level for the specified player and buffer type.\n */\n getLevel(playerId: string, type: string): Promise<BufferLevels>;\n\n /**\n * Set target level for the specified player and buffer type.\n */\n setTargetLevel(playerId: string, type: string, value: number): Promise<void>;\n}\n\nexport default requireNativeModule<BufferModule>('BufferModule');\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NativeModule } from 'expo-modules-core';
|
|
2
|
+
export type DebugModuleEvents = Record<string, any>;
|
|
3
|
+
declare class DebugModule extends NativeModule<DebugModuleEvents> {
|
|
4
|
+
setDebugLoggingEnabled(enabled: boolean): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: DebugModule;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=DebugModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugModule.d.ts","sourceRoot":"","sources":["../../src/modules/DebugModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEpD,OAAO,OAAO,WAAY,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAC/D,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CACxD;;AAED,wBAA+D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugModule.js","sourceRoot":"","sources":["../../src/modules/DebugModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQtE,eAAe,mBAAmB,CAAc,aAAa,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\n\nexport type DebugModuleEvents = Record<string, any>;\n\ndeclare class DebugModule extends NativeModule<DebugModuleEvents> {\n setDebugLoggingEnabled(enabled: boolean): Promise<void>;\n}\n\nexport default requireNativeModule<DebugModule>('DebugModule');\n"]}
|