@pigeonmal/react-native-video 7.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +163 -0
- package/ReactNativeVideo.podspec +59 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +255 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +13 -0
- package/android/media3-ffmpeg-decoder/build.gradle +2 -0
- package/android/media3-ffmpeg-decoder/ffmpeg.aar +0 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/twg/video/core/AudioFocusManager.kt +233 -0
- package/android/src/main/java/com/twg/video/core/VideoError.kt +105 -0
- package/android/src/main/java/com/twg/video/core/VideoManager.kt +284 -0
- package/android/src/main/java/com/twg/video/core/custom/MyRenderersFactory.java +78 -0
- package/android/src/main/java/com/twg/video/core/custom/MyTextRenderer.java +121 -0
- package/android/src/main/java/com/twg/video/core/custom/TextFilter.java +6 -0
- package/android/src/main/java/com/twg/video/core/custom/TextSynchronizer.java +7 -0
- package/android/src/main/java/com/twg/video/core/extensions/ResizeMode+AspectRatioFrameLayout.kt +20 -0
- package/android/src/main/java/com/twg/video/core/extensions/SubtitleType+toString.kt +14 -0
- package/android/src/main/java/com/twg/video/core/extensions/VideoPlaybackService+ServiceManagment.kt +59 -0
- package/android/src/main/java/com/twg/video/core/fragments/FullscreenVideoFragment.kt +265 -0
- package/android/src/main/java/com/twg/video/core/fragments/PictureInPictureHelperFragment.kt +85 -0
- package/android/src/main/java/com/twg/video/core/player/DRMManagerSpec.kt +23 -0
- package/android/src/main/java/com/twg/video/core/player/DataSourceFactoryUtils.kt +80 -0
- package/android/src/main/java/com/twg/video/core/player/MediaItemUtils.kt +152 -0
- package/android/src/main/java/com/twg/video/core/player/MediaSourceUtils.kt +85 -0
- package/android/src/main/java/com/twg/video/core/player/OnAudioFocusChangedListener.kt +25 -0
- package/android/src/main/java/com/twg/video/core/plugins/PluginsRegistry.kt +223 -0
- package/android/src/main/java/com/twg/video/core/plugins/ReactNativeVideoPlugin.kt +173 -0
- package/android/src/main/java/com/twg/video/core/recivers/AudioBecomingNoisyReceiver.kt +38 -0
- package/android/src/main/java/com/twg/video/core/services/playback/CustomMediaNotificationProvider.kt +151 -0
- package/android/src/main/java/com/twg/video/core/services/playback/VideoPlaybackCallback.kt +96 -0
- package/android/src/main/java/com/twg/video/core/services/playback/VideoPlaybackService.kt +219 -0
- package/android/src/main/java/com/twg/video/core/services/playback/VideoPlaybackServiceConnection.kt +59 -0
- package/android/src/main/java/com/twg/video/core/utils/PictureInPictureUtils.kt +153 -0
- package/android/src/main/java/com/twg/video/core/utils/SmallVideoPlayerOptimizer.kt +157 -0
- package/android/src/main/java/com/twg/video/core/utils/SourceLoader.kt +48 -0
- package/android/src/main/java/com/twg/video/core/utils/Threading.kt +75 -0
- package/android/src/main/java/com/twg/video/core/utils/TrackUtils.kt +305 -0
- package/android/src/main/java/com/twg/video/core/utils/VideoFileHelper.kt +51 -0
- package/android/src/main/java/com/twg/video/core/utils/VideoInformationUtils.kt +67 -0
- package/android/src/main/java/com/twg/video/core/utils/VideoOrientationUtils.kt +30 -0
- package/android/src/main/java/com/twg/video/hybrids/videoplayer/HybridVideoPlayer.kt +630 -0
- package/android/src/main/java/com/twg/video/hybrids/videoplayer/HybridVideoPlayerFactory.kt +16 -0
- package/android/src/main/java/com/twg/video/hybrids/videoplayereventemitter/HybridVideoPlayerEventEmitter.kt +154 -0
- package/android/src/main/java/com/twg/video/hybrids/videoplayersource/HybridVideoPlayerSource.kt +67 -0
- package/android/src/main/java/com/twg/video/hybrids/videoplayersource/HybridVideoPlayerSourceFactory.kt +31 -0
- package/android/src/main/java/com/twg/video/hybrids/videoviewviewmanager/HybridVideoViewViewManager.kt +187 -0
- package/android/src/main/java/com/twg/video/hybrids/videoviewviewmanager/HybridVideoViewViewManagerFactory.kt +13 -0
- package/android/src/main/java/com/twg/video/react/VideoPackage.kt +26 -0
- package/android/src/main/java/com/twg/video/react/VideoViewViewManager.kt +78 -0
- package/android/src/main/java/com/twg/video/view/VideoView.kt +565 -0
- package/android/src/main/res/layout/player_view_surface.xml +14 -0
- package/android/src/main/res/layout/player_view_texture.xml +15 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNCVideoViewManagerDelegate.java +32 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNCVideoViewManagerInterface.java +16 -0
- package/android/src/stubs/dash/androidx/media3/exoplayer/dash/DashMediaSource.kt +35 -0
- package/android/src/stubs/dash/androidx/media3/exoplayer/dash/DashUtil.kt +11 -0
- package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/AdaptationSet.kt +9 -0
- package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/DashManifest.kt +10 -0
- package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/Period.kt +7 -0
- package/android/src/stubs/dash/androidx/media3/exoplayer/dash/manifest/Representation.kt +8 -0
- package/android/src/stubs/hls/androidx/media3/exoplayer/hls/HlsMediaSource.kt +33 -0
- package/android/src/stubs/subs/androidx/media3/exoplayer/text/NonFinalTextRenderer.java +583 -0
- package/app.plugin.js +1 -0
- package/ios/Video-Bridging-Header.h +1 -0
- package/ios/core/Extensions/AVAsset+estimatedMemoryUsage.swift +51 -0
- package/ios/core/Extensions/AVAssetTrack+orientation.swift +41 -0
- package/ios/core/Extensions/AVPlayerItem+externalSubtitles.swift +35 -0
- package/ios/core/Extensions/AVPlayerItem+getBufferedDurration.swift +34 -0
- package/ios/core/Extensions/AVPlayerItem+setBufferConfig.swift +37 -0
- package/ios/core/Extensions/AVPlayerViewController+Fullscreen.swift +21 -0
- package/ios/core/Extensions/AVPlayerViewController+PictureInPicture.swift +24 -0
- package/ios/core/Extensions/AVURLAsset+getAssetInformation.swift +68 -0
- package/ios/core/Extensions/NSObject+PerformIfResponds.swift +30 -0
- package/ios/core/Extensions/ResizeMode+VideoGravity.swift +24 -0
- package/ios/core/HLSSubtitleInjector.swift +381 -0
- package/ios/core/NowPlayingInfoCenterManager.swift +323 -0
- package/ios/core/Plugins/PluginsRegistry.swift +102 -0
- package/ios/core/Plugins/ReactNativeVideoPlugin.swift +91 -0
- package/ios/core/Spec/DRMManagerSpec.swift +14 -0
- package/ios/core/Spec/NativeVideoPlayerSourceSpec.swift +36 -0
- package/ios/core/Spec/NativeVideoPlayerSpec.swift +42 -0
- package/ios/core/Utils/ExternalSubtitlesUtils.swift +119 -0
- package/ios/core/Utils/HLSManifestParser.swift +170 -0
- package/ios/core/Utils/Weak.swift +26 -0
- package/ios/core/VideoError.swift +169 -0
- package/ios/core/VideoFileHelper.swift +48 -0
- package/ios/core/VideoManager.swift +412 -0
- package/ios/core/VideoPlayerObserver.swift +294 -0
- package/ios/hybrids/VideoPlayer/HybridVideoPlayer+Events.swift +198 -0
- package/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift +555 -0
- package/ios/hybrids/VideoPlayer/HybridVideoPlayerFactory.swift +15 -0
- package/ios/hybrids/VideoPlayerEmitter/HybridVideoPlayerEventEmitter.swift +203 -0
- package/ios/hybrids/VideoPlayerSource/HybridVideoPlayerSource.swift +166 -0
- package/ios/hybrids/VideoPlayerSource/HybridVideoPlayerSourceFactory.swift +30 -0
- package/ios/hybrids/VideoPlayerSource/SourceLoader.swift +83 -0
- package/ios/hybrids/VideoViewViewManager/HybridVideoViewViewManager.swift +266 -0
- package/ios/hybrids/VideoViewViewManager/HybridVideoViewViewManagerFactory.swift +14 -0
- package/ios/view/VideoComponentView.swift +274 -0
- package/ios/view/VideoComponentViewObserver.swift +144 -0
- package/ios/view/fabric/RCTVideoViewComponentView.h +10 -0
- package/ios/view/fabric/RCTVideoViewComponentView.mm +94 -0
- package/ios/view/fabric/RCTVideoViewViewManager.mm +14 -0
- package/ios/view/paper/RCTVideoViewComponentView.h +9 -0
- package/ios/view/paper/RCTVideoViewComponentView.mm +45 -0
- package/ios/view/paper/RCTVideoViewViewManager.m +18 -0
- package/lib/commonjs/core/VideoPlayer.js +276 -0
- package/lib/commonjs/core/VideoPlayer.js.map +1 -0
- package/lib/commonjs/core/VideoPlayerEvents.js +87 -0
- package/lib/commonjs/core/VideoPlayerEvents.js.map +1 -0
- package/lib/commonjs/core/hooks/useEvent.js +24 -0
- package/lib/commonjs/core/hooks/useEvent.js.map +1 -0
- package/lib/commonjs/core/hooks/useManagedInstance.js +79 -0
- package/lib/commonjs/core/hooks/useManagedInstance.js.map +1 -0
- package/lib/commonjs/core/hooks/useVideoPlayer.js +62 -0
- package/lib/commonjs/core/hooks/useVideoPlayer.js.map +1 -0
- package/lib/commonjs/core/types/BufferConfig.js +2 -0
- package/lib/commonjs/core/types/BufferConfig.js.map +1 -0
- package/lib/commonjs/core/types/DrmParams.js +2 -0
- package/lib/commonjs/core/types/DrmParams.js.map +1 -0
- package/lib/commonjs/core/types/Events.js +14 -0
- package/lib/commonjs/core/types/Events.js.map +1 -0
- package/lib/commonjs/core/types/IgnoreSilentSwitchMode.js +2 -0
- package/lib/commonjs/core/types/IgnoreSilentSwitchMode.js.map +1 -0
- package/lib/commonjs/core/types/MixAudioMode.js +2 -0
- package/lib/commonjs/core/types/MixAudioMode.js.map +1 -0
- package/lib/commonjs/core/types/PlayerTrack.js +13 -0
- package/lib/commonjs/core/types/PlayerTrack.js.map +1 -0
- package/lib/commonjs/core/types/ResizeMode.js +2 -0
- package/lib/commonjs/core/types/ResizeMode.js.map +1 -0
- package/lib/commonjs/core/types/Utils.js +2 -0
- package/lib/commonjs/core/types/Utils.js.map +1 -0
- package/lib/commonjs/core/types/VideoConfig.js +6 -0
- package/lib/commonjs/core/types/VideoConfig.js.map +1 -0
- package/lib/commonjs/core/types/VideoError.js +108 -0
- package/lib/commonjs/core/types/VideoError.js.map +1 -0
- package/lib/commonjs/core/types/VideoInformation.js +6 -0
- package/lib/commonjs/core/types/VideoInformation.js.map +1 -0
- package/lib/commonjs/core/types/VideoOrientation.js +2 -0
- package/lib/commonjs/core/types/VideoOrientation.js.map +1 -0
- package/lib/commonjs/core/types/VideoPlayerBase.js +6 -0
- package/lib/commonjs/core/types/VideoPlayerBase.js.map +1 -0
- package/lib/commonjs/core/types/VideoPlayerSourceBase.js +6 -0
- package/lib/commonjs/core/types/VideoPlayerSourceBase.js.map +1 -0
- package/lib/commonjs/core/types/VideoPlayerStatus.js +2 -0
- package/lib/commonjs/core/types/VideoPlayerStatus.js.map +1 -0
- package/lib/commonjs/core/utils/playerFactory.js +30 -0
- package/lib/commonjs/core/utils/playerFactory.js.map +1 -0
- package/lib/commonjs/core/utils/sourceFactory.js +146 -0
- package/lib/commonjs/core/utils/sourceFactory.js.map +1 -0
- package/lib/commonjs/core/video-view/NativeVideoView.js +18 -0
- package/lib/commonjs/core/video-view/NativeVideoView.js.map +1 -0
- package/lib/commonjs/core/video-view/VideoView.js +208 -0
- package/lib/commonjs/core/video-view/VideoView.js.map +1 -0
- package/lib/commonjs/expo-plugins/@types.js +2 -0
- package/lib/commonjs/expo-plugins/@types.js.map +1 -0
- package/lib/commonjs/expo-plugins/getPackageInfo.js +27 -0
- package/lib/commonjs/expo-plugins/getPackageInfo.js.map +1 -0
- package/lib/commonjs/expo-plugins/withAndroidExtensions.js +40 -0
- package/lib/commonjs/expo-plugins/withAndroidExtensions.js.map +1 -0
- package/lib/commonjs/expo-plugins/withAndroidNotificationControls.js +34 -0
- package/lib/commonjs/expo-plugins/withAndroidNotificationControls.js.map +1 -0
- package/lib/commonjs/expo-plugins/withAndroidPictureInPicture.js +23 -0
- package/lib/commonjs/expo-plugins/withAndroidPictureInPicture.js.map +1 -0
- package/lib/commonjs/expo-plugins/withBackgroundAudio.js +26 -0
- package/lib/commonjs/expo-plugins/withBackgroundAudio.js.map +1 -0
- package/lib/commonjs/expo-plugins/withReactNativeVideo.js +31 -0
- package/lib/commonjs/expo-plugins/withReactNativeVideo.js.map +1 -0
- package/lib/commonjs/expo-plugins/writeToPodfile.js +59 -0
- package/lib/commonjs/expo-plugins/writeToPodfile.js.map +1 -0
- package/lib/commonjs/index.js +61 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/spec/fabric/VideoViewNativeComponent.ts +17 -0
- package/lib/commonjs/spec/nitro/VideoPlayer.nitro.js +6 -0
- package/lib/commonjs/spec/nitro/VideoPlayer.nitro.js.map +1 -0
- package/lib/commonjs/spec/nitro/VideoPlayerEventEmitter.nitro.js +6 -0
- package/lib/commonjs/spec/nitro/VideoPlayerEventEmitter.nitro.js.map +1 -0
- package/lib/commonjs/spec/nitro/VideoPlayerSource.nitro.js +6 -0
- package/lib/commonjs/spec/nitro/VideoPlayerSource.nitro.js.map +1 -0
- package/lib/commonjs/spec/nitro/VideoViewViewManager.nitro.js +6 -0
- package/lib/commonjs/spec/nitro/VideoViewViewManager.nitro.js.map +1 -0
- package/lib/module/core/VideoPlayer.js +272 -0
- package/lib/module/core/VideoPlayer.js.map +1 -0
- package/lib/module/core/VideoPlayerEvents.js +82 -0
- package/lib/module/core/VideoPlayerEvents.js.map +1 -0
- package/lib/module/core/hooks/useEvent.js +19 -0
- package/lib/module/core/hooks/useEvent.js.map +1 -0
- package/lib/module/core/hooks/useManagedInstance.js +75 -0
- package/lib/module/core/hooks/useManagedInstance.js.map +1 -0
- package/lib/module/core/hooks/useVideoPlayer.js +57 -0
- package/lib/module/core/hooks/useVideoPlayer.js.map +1 -0
- package/lib/module/core/types/BufferConfig.js +2 -0
- package/lib/module/core/types/BufferConfig.js.map +1 -0
- package/lib/module/core/types/DrmParams.js +2 -0
- package/lib/module/core/types/DrmParams.js.map +1 -0
- package/lib/module/core/types/Events.js +10 -0
- package/lib/module/core/types/Events.js.map +1 -0
- package/lib/module/core/types/IgnoreSilentSwitchMode.js +2 -0
- package/lib/module/core/types/IgnoreSilentSwitchMode.js.map +1 -0
- package/lib/module/core/types/MixAudioMode.js +2 -0
- package/lib/module/core/types/MixAudioMode.js.map +1 -0
- package/lib/module/core/types/PlayerTrack.js +9 -0
- package/lib/module/core/types/PlayerTrack.js.map +1 -0
- package/lib/module/core/types/ResizeMode.js +2 -0
- package/lib/module/core/types/ResizeMode.js.map +1 -0
- package/lib/module/core/types/Utils.js +2 -0
- package/lib/module/core/types/Utils.js.map +1 -0
- package/lib/module/core/types/VideoConfig.js +4 -0
- package/lib/module/core/types/VideoConfig.js.map +1 -0
- package/lib/module/core/types/VideoError.js +100 -0
- package/lib/module/core/types/VideoError.js.map +1 -0
- package/lib/module/core/types/VideoInformation.js +4 -0
- package/lib/module/core/types/VideoInformation.js.map +1 -0
- package/lib/module/core/types/VideoOrientation.js +2 -0
- package/lib/module/core/types/VideoOrientation.js.map +1 -0
- package/lib/module/core/types/VideoPlayerBase.js +4 -0
- package/lib/module/core/types/VideoPlayerBase.js.map +1 -0
- package/lib/module/core/types/VideoPlayerSourceBase.js +4 -0
- package/lib/module/core/types/VideoPlayerSourceBase.js.map +1 -0
- package/lib/module/core/types/VideoPlayerStatus.js +2 -0
- package/lib/module/core/types/VideoPlayerStatus.js.map +1 -0
- package/lib/module/core/utils/playerFactory.js +25 -0
- package/lib/module/core/utils/playerFactory.js.map +1 -0
- package/lib/module/core/utils/sourceFactory.js +138 -0
- package/lib/module/core/utils/sourceFactory.js.map +1 -0
- package/lib/module/core/video-view/NativeVideoView.js +13 -0
- package/lib/module/core/video-view/NativeVideoView.js.map +1 -0
- package/lib/module/core/video-view/VideoView.js +203 -0
- package/lib/module/core/video-view/VideoView.js.map +1 -0
- package/lib/module/expo-plugins/@types.js +2 -0
- package/lib/module/expo-plugins/@types.js.map +1 -0
- package/lib/module/expo-plugins/getPackageInfo.js +23 -0
- package/lib/module/expo-plugins/getPackageInfo.js.map +1 -0
- package/lib/module/expo-plugins/withAndroidExtensions.js +35 -0
- package/lib/module/expo-plugins/withAndroidExtensions.js.map +1 -0
- package/lib/module/expo-plugins/withAndroidNotificationControls.js +29 -0
- package/lib/module/expo-plugins/withAndroidNotificationControls.js.map +1 -0
- package/lib/module/expo-plugins/withAndroidPictureInPicture.js +18 -0
- package/lib/module/expo-plugins/withAndroidPictureInPicture.js.map +1 -0
- package/lib/module/expo-plugins/withBackgroundAudio.js +22 -0
- package/lib/module/expo-plugins/withBackgroundAudio.js.map +1 -0
- package/lib/module/expo-plugins/withReactNativeVideo.js +27 -0
- package/lib/module/expo-plugins/withReactNativeVideo.js.map +1 -0
- package/lib/module/expo-plugins/writeToPodfile.js +53 -0
- package/lib/module/expo-plugins/writeToPodfile.js.map +1 -0
- package/lib/module/index.js +9 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/spec/fabric/VideoViewNativeComponent.ts +17 -0
- package/lib/module/spec/nitro/VideoPlayer.nitro.js +4 -0
- package/lib/module/spec/nitro/VideoPlayer.nitro.js.map +1 -0
- package/lib/module/spec/nitro/VideoPlayerEventEmitter.nitro.js +4 -0
- package/lib/module/spec/nitro/VideoPlayerEventEmitter.nitro.js.map +1 -0
- package/lib/module/spec/nitro/VideoPlayerSource.nitro.js +4 -0
- package/lib/module/spec/nitro/VideoPlayerSource.nitro.js.map +1 -0
- package/lib/module/spec/nitro/VideoViewViewManager.nitro.js +4 -0
- package/lib/module/spec/nitro/VideoViewViewManager.nitro.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/core/VideoPlayer.d.ts +61 -0
- package/lib/typescript/commonjs/src/core/VideoPlayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/VideoPlayerEvents.d.ts +22 -0
- package/lib/typescript/commonjs/src/core/VideoPlayerEvents.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/hooks/useEvent.d.ts +11 -0
- package/lib/typescript/commonjs/src/core/hooks/useEvent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/hooks/useManagedInstance.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/hooks/useManagedInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/hooks/useVideoPlayer.d.ts +16 -0
- package/lib/typescript/commonjs/src/core/hooks/useVideoPlayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/BufferConfig.d.ts +97 -0
- package/lib/typescript/commonjs/src/core/types/BufferConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/DrmParams.d.ts +64 -0
- package/lib/typescript/commonjs/src/core/types/DrmParams.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/Events.d.ts +218 -0
- package/lib/typescript/commonjs/src/core/types/Events.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/IgnoreSilentSwitchMode.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/types/IgnoreSilentSwitchMode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/MixAudioMode.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/types/MixAudioMode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/PlayerTrack.d.ts +34 -0
- package/lib/typescript/commonjs/src/core/types/PlayerTrack.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/ResizeMode.d.ts +10 -0
- package/lib/typescript/commonjs/src/core/types/ResizeMode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/Utils.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/types/Utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoConfig.d.ts +137 -0
- package/lib/typescript/commonjs/src/core/types/VideoConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoError.d.ts +27 -0
- package/lib/typescript/commonjs/src/core/types/VideoError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoInformation.d.ts +37 -0
- package/lib/typescript/commonjs/src/core/types/VideoInformation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoOrientation.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/types/VideoOrientation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoPlayerBase.d.ts +165 -0
- package/lib/typescript/commonjs/src/core/types/VideoPlayerBase.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoPlayerSourceBase.d.ts +17 -0
- package/lib/typescript/commonjs/src/core/types/VideoPlayerSourceBase.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/types/VideoPlayerStatus.d.ts +9 -0
- package/lib/typescript/commonjs/src/core/types/VideoPlayerStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/utils/playerFactory.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/utils/playerFactory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/utils/sourceFactory.d.ts +29 -0
- package/lib/typescript/commonjs/src/core/utils/sourceFactory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/video-view/NativeVideoView.d.ts +2 -0
- package/lib/typescript/commonjs/src/core/video-view/NativeVideoView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/video-view/VideoView.d.ts +85 -0
- package/lib/typescript/commonjs/src/core/video-view/VideoView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/@types.d.ts +34 -0
- package/lib/typescript/commonjs/src/expo-plugins/@types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/getPackageInfo.d.ts +5 -0
- package/lib/typescript/commonjs/src/expo-plugins/getPackageInfo.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/withAndroidExtensions.d.ts +8 -0
- package/lib/typescript/commonjs/src/expo-plugins/withAndroidExtensions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/withAndroidNotificationControls.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-plugins/withAndroidNotificationControls.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/withAndroidPictureInPicture.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-plugins/withAndroidPictureInPicture.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/withBackgroundAudio.d.ts +7 -0
- package/lib/typescript/commonjs/src/expo-plugins/withBackgroundAudio.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/withReactNativeVideo.d.ts +5 -0
- package/lib/typescript/commonjs/src/expo-plugins/withReactNativeVideo.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-plugins/writeToPodfile.d.ts +2 -0
- package/lib/typescript/commonjs/src/expo-plugins/writeToPodfile.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/spec/fabric/VideoViewNativeComponent.d.ts +12 -0
- package/lib/typescript/commonjs/src/spec/fabric/VideoViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoPlayer.nitro.d.ts +34 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoPlayer.nitro.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts +142 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoPlayerSource.nitro.d.ts +21 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoPlayerSource.nitro.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoViewViewManager.nitro.d.ts +2 -0
- package/lib/typescript/commonjs/src/spec/nitro/VideoViewViewManager.nitro.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/core/VideoPlayer.d.ts +61 -0
- package/lib/typescript/module/src/core/VideoPlayer.d.ts.map +1 -0
- package/lib/typescript/module/src/core/VideoPlayerEvents.d.ts +22 -0
- package/lib/typescript/module/src/core/VideoPlayerEvents.d.ts.map +1 -0
- package/lib/typescript/module/src/core/hooks/useEvent.d.ts +11 -0
- package/lib/typescript/module/src/core/hooks/useEvent.d.ts.map +1 -0
- package/lib/typescript/module/src/core/hooks/useManagedInstance.d.ts +2 -0
- package/lib/typescript/module/src/core/hooks/useManagedInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/core/hooks/useVideoPlayer.d.ts +16 -0
- package/lib/typescript/module/src/core/hooks/useVideoPlayer.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/BufferConfig.d.ts +97 -0
- package/lib/typescript/module/src/core/types/BufferConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/DrmParams.d.ts +64 -0
- package/lib/typescript/module/src/core/types/DrmParams.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/Events.d.ts +218 -0
- package/lib/typescript/module/src/core/types/Events.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/IgnoreSilentSwitchMode.d.ts +2 -0
- package/lib/typescript/module/src/core/types/IgnoreSilentSwitchMode.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/MixAudioMode.d.ts +2 -0
- package/lib/typescript/module/src/core/types/MixAudioMode.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/PlayerTrack.d.ts +34 -0
- package/lib/typescript/module/src/core/types/PlayerTrack.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/ResizeMode.d.ts +10 -0
- package/lib/typescript/module/src/core/types/ResizeMode.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/Utils.d.ts +2 -0
- package/lib/typescript/module/src/core/types/Utils.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoConfig.d.ts +137 -0
- package/lib/typescript/module/src/core/types/VideoConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoError.d.ts +27 -0
- package/lib/typescript/module/src/core/types/VideoError.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoInformation.d.ts +37 -0
- package/lib/typescript/module/src/core/types/VideoInformation.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoOrientation.d.ts +2 -0
- package/lib/typescript/module/src/core/types/VideoOrientation.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoPlayerBase.d.ts +165 -0
- package/lib/typescript/module/src/core/types/VideoPlayerBase.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoPlayerSourceBase.d.ts +17 -0
- package/lib/typescript/module/src/core/types/VideoPlayerSourceBase.d.ts.map +1 -0
- package/lib/typescript/module/src/core/types/VideoPlayerStatus.d.ts +9 -0
- package/lib/typescript/module/src/core/types/VideoPlayerStatus.d.ts.map +1 -0
- package/lib/typescript/module/src/core/utils/playerFactory.d.ts +2 -0
- package/lib/typescript/module/src/core/utils/playerFactory.d.ts.map +1 -0
- package/lib/typescript/module/src/core/utils/sourceFactory.d.ts +29 -0
- package/lib/typescript/module/src/core/utils/sourceFactory.d.ts.map +1 -0
- package/lib/typescript/module/src/core/video-view/NativeVideoView.d.ts +2 -0
- package/lib/typescript/module/src/core/video-view/NativeVideoView.d.ts.map +1 -0
- package/lib/typescript/module/src/core/video-view/VideoView.d.ts +85 -0
- package/lib/typescript/module/src/core/video-view/VideoView.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/@types.d.ts +34 -0
- package/lib/typescript/module/src/expo-plugins/@types.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/getPackageInfo.d.ts +5 -0
- package/lib/typescript/module/src/expo-plugins/getPackageInfo.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/withAndroidExtensions.d.ts +8 -0
- package/lib/typescript/module/src/expo-plugins/withAndroidExtensions.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/withAndroidNotificationControls.d.ts +3 -0
- package/lib/typescript/module/src/expo-plugins/withAndroidNotificationControls.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/withAndroidPictureInPicture.d.ts +3 -0
- package/lib/typescript/module/src/expo-plugins/withAndroidPictureInPicture.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/withBackgroundAudio.d.ts +7 -0
- package/lib/typescript/module/src/expo-plugins/withBackgroundAudio.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/withReactNativeVideo.d.ts +5 -0
- package/lib/typescript/module/src/expo-plugins/withReactNativeVideo.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-plugins/writeToPodfile.d.ts +2 -0
- package/lib/typescript/module/src/expo-plugins/writeToPodfile.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +14 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/spec/fabric/VideoViewNativeComponent.d.ts +12 -0
- package/lib/typescript/module/src/spec/fabric/VideoViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/spec/nitro/VideoPlayer.nitro.d.ts +34 -0
- package/lib/typescript/module/src/spec/nitro/VideoPlayer.nitro.d.ts.map +1 -0
- package/lib/typescript/module/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts +142 -0
- package/lib/typescript/module/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts.map +1 -0
- package/lib/typescript/module/src/spec/nitro/VideoPlayerSource.nitro.d.ts +21 -0
- package/lib/typescript/module/src/spec/nitro/VideoPlayerSource.nitro.d.ts.map +1 -0
- package/lib/typescript/module/src/spec/nitro/VideoViewViewManager.nitro.d.ts +2 -0
- package/lib/typescript/module/src/spec/nitro/VideoViewViewManager.nitro.d.ts.map +1 -0
- package/nitro.json +28 -0
- package/nitrogen/generated/android/ReactNativeVideo+autolinking.cmake +94 -0
- package/nitrogen/generated/android/ReactNativeVideo+autolinking.gradle +27 -0
- package/nitrogen/generated/android/ReactNativeVideoOnLoad.cpp +98 -0
- package/nitrogen/generated/android/ReactNativeVideoOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JAllPlayerTracks.hpp +125 -0
- package/nitrogen/generated/android/c++/JBandwidthData.hpp +65 -0
- package/nitrogen/generated/android/c++/JBufferConfig.hpp +101 -0
- package/nitrogen/generated/android/c++/JCustomVideoMetadata.hpp +74 -0
- package/nitrogen/generated/android/c++/JExternalAudio.hpp +80 -0
- package/nitrogen/generated/android/c++/JExternalForcedType.hpp +59 -0
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.hpp +126 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_BandwidthData.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_TimedMetadata.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_VideoPlayerStatus.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_double.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_onLoadData.hpp +88 -0
- package/nitrogen/generated/android/c++/JFunc_void_onLoadStartData.hpp +82 -0
- package/nitrogen/generated/android/c++/JFunc_void_onPlaybackStateChangeData.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_onProgressData.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_onVolumeChangeData.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp +95 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp +221 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp +83 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp +59 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp +65 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp +113 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp +131 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp +307 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp +102 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp +55 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp +65 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp +184 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp +89 -0
- package/nitrogen/generated/android/c++/JIgnoreSilentSwitchMode.hpp +62 -0
- package/nitrogen/generated/android/c++/JListenerSubscription.hpp +67 -0
- package/nitrogen/generated/android/c++/JLivePlaybackParams.hpp +73 -0
- package/nitrogen/generated/android/c++/JMixAudioMode.hpp +65 -0
- package/nitrogen/generated/android/c++/JNativeDrmParams.hpp +111 -0
- package/nitrogen/generated/android/c++/JNativeExternalSubtitle.hpp +71 -0
- package/nitrogen/generated/android/c++/JNativeVideoConfig.hpp +174 -0
- package/nitrogen/generated/android/c++/JOnGetLicensePayload.hpp +69 -0
- package/nitrogen/generated/android/c++/JPlayerTrack.hpp +70 -0
- package/nitrogen/generated/android/c++/JResizeMode.hpp +65 -0
- package/nitrogen/generated/android/c++/JResolution.hpp +61 -0
- package/nitrogen/generated/android/c++/JSourceType.hpp +59 -0
- package/nitrogen/generated/android/c++/JSubtitleType.hpp +68 -0
- package/nitrogen/generated/android/c++/JSurfaceType.hpp +59 -0
- package/nitrogen/generated/android/c++/JTimedMetadata.hpp +78 -0
- package/nitrogen/generated/android/c++/JTimedMetadataObject.hpp +61 -0
- package/nitrogen/generated/android/c++/JTrackType.hpp +62 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_HybridVideoPlayerSourceSpec.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_HybridVideoPlayerSourceSpec.hpp +72 -0
- package/nitrogen/generated/android/c++/JVideoInformation.hpp +86 -0
- package/nitrogen/generated/android/c++/JVideoOrientation.hpp +74 -0
- package/nitrogen/generated/android/c++/JVideoPlayerStatus.hpp +65 -0
- package/nitrogen/generated/android/c++/JVideoPlayerTrack.hpp +78 -0
- package/nitrogen/generated/android/c++/JonLoadData.hpp +87 -0
- package/nitrogen/generated/android/c++/JonLoadStartData.hpp +65 -0
- package/nitrogen/generated/android/c++/JonPlaybackStateChangeData.hpp +61 -0
- package/nitrogen/generated/android/c++/JonProgressData.hpp +61 -0
- package/nitrogen/generated/android/c++/JonVolumeChangeData.hpp +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/AllPlayerTracks.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/BandwidthData.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/BufferConfig.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/CustomVideoMetadata.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/ExternalAudio.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/ExternalForcedType.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_BandwidthData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_TimedMetadata.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_VideoPlayerStatus.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_double.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadStartData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onPlaybackStateChangeData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onProgressData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onVolumeChangeData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__vector_std__string_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerEventEmitterSpec.kt +219 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerFactorySpec.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSourceFactorySpec.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSourceSpec.kt +64 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSpec.kt +187 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoViewViewManagerFactorySpec.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoViewViewManagerSpec.kt +171 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/IgnoreSilentSwitchMode.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/ListenerSubscription.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/LivePlaybackParams.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/MixAudioMode.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeDrmParams.kt +60 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeExternalSubtitle.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeVideoConfig.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/OnGetLicensePayload.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/PlayerTrack.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/ReactNativeVideoOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/ResizeMode.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Resolution.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/SourceType.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/SubtitleType.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/SurfaceType.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadata.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadataObject.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TrackType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Variant_NullType_HybridVideoPlayerSourceSpec.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoInformation.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoOrientation.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoPlayerStatus.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoPlayerTrack.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadData.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadStartData.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onPlaybackStateChangeData.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onProgressData.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onVolumeChangeData.kt +41 -0
- package/nitrogen/generated/ios/ReactNativeVideo+autolinking.rb +60 -0
- package/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.cpp +272 -0
- package/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.hpp +1119 -0
- package/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Umbrella.hpp +177 -0
- package/nitrogen/generated/ios/ReactNativeVideoAutolinking.mm +49 -0
- package/nitrogen/generated/ios/ReactNativeVideoAutolinking.swift +55 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp +269 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp +81 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.hpp +125 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.hpp +125 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.hpp +265 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp +78 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp +211 -0
- package/nitrogen/generated/ios/swift/AllPlayerTracks.swift +94 -0
- package/nitrogen/generated/ios/swift/BandwidthData.swift +82 -0
- package/nitrogen/generated/ios/swift/BufferConfig.swift +278 -0
- package/nitrogen/generated/ios/swift/CustomVideoMetadata.swift +175 -0
- package/nitrogen/generated/ios/swift/ExternalAudio.swift +116 -0
- package/nitrogen/generated/ios/swift/ExternalForcedType.swift +40 -0
- package/nitrogen/generated/ios/swift/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.swift +62 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_onLoadData.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_onProgressData.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_Promise_std__string__.swift +67 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift +74 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift +442 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift +138 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift +149 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift +150 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift +82 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift +475 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift +134 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift +73 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift +383 -0
- package/nitrogen/generated/ios/swift/IgnoreSilentSwitchMode.swift +44 -0
- package/nitrogen/generated/ios/swift/ListenerSubscription.swift +47 -0
- package/nitrogen/generated/ios/swift/LivePlaybackParams.swift +140 -0
- package/nitrogen/generated/ios/swift/MixAudioMode.swift +48 -0
- package/nitrogen/generated/ios/swift/NativeDrmParams.swift +287 -0
- package/nitrogen/generated/ios/swift/NativeExternalSubtitle.swift +69 -0
- package/nitrogen/generated/ios/swift/NativeVideoConfig.swift +345 -0
- package/nitrogen/generated/ios/swift/OnGetLicensePayload.swift +69 -0
- package/nitrogen/generated/ios/swift/PlayerTrack.swift +88 -0
- package/nitrogen/generated/ios/swift/ResizeMode.swift +48 -0
- package/nitrogen/generated/ios/swift/Resolution.swift +47 -0
- package/nitrogen/generated/ios/swift/SourceType.swift +40 -0
- package/nitrogen/generated/ios/swift/SubtitleType.swift +52 -0
- package/nitrogen/generated/ios/swift/SurfaceType.swift +40 -0
- package/nitrogen/generated/ios/swift/TimedMetadata.swift +48 -0
- package/nitrogen/generated/ios/swift/TimedMetadataObject.swift +47 -0
- package/nitrogen/generated/ios/swift/TrackType.swift +44 -0
- package/nitrogen/generated/ios/swift/Variant_NullType__any_HybridVideoPlayerSourceSpec_.swift +18 -0
- package/nitrogen/generated/ios/swift/VideoInformation.swift +113 -0
- package/nitrogen/generated/ios/swift/VideoOrientation.swift +60 -0
- package/nitrogen/generated/ios/swift/VideoPlayerStatus.swift +48 -0
- package/nitrogen/generated/ios/swift/VideoPlayerTrack.swift +110 -0
- package/nitrogen/generated/ios/swift/onLoadData.swift +91 -0
- package/nitrogen/generated/ios/swift/onLoadStartData.swift +57 -0
- package/nitrogen/generated/ios/swift/onPlaybackStateChangeData.swift +47 -0
- package/nitrogen/generated/ios/swift/onProgressData.swift +47 -0
- package/nitrogen/generated/ios/swift/onVolumeChangeData.swift +47 -0
- package/nitrogen/generated/shared/c++/AllPlayerTracks.hpp +88 -0
- package/nitrogen/generated/shared/c++/BandwidthData.hpp +83 -0
- package/nitrogen/generated/shared/c++/BufferConfig.hpp +120 -0
- package/nitrogen/generated/shared/c++/CustomVideoMetadata.hpp +92 -0
- package/nitrogen/generated/shared/c++/ExternalAudio.hpp +85 -0
- package/nitrogen/generated/shared/c++/ExternalForcedType.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.cpp +39 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp +108 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerFactorySpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerFactorySpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceFactorySpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceFactorySpec.hpp +69 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.hpp +69 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp +128 -0
- package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerFactorySpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerFactorySpec.hpp +64 -0
- package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.hpp +99 -0
- package/nitrogen/generated/shared/c++/IgnoreSilentSwitchMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/ListenerSubscription.hpp +75 -0
- package/nitrogen/generated/shared/c++/LivePlaybackParams.hpp +91 -0
- package/nitrogen/generated/shared/c++/MixAudioMode.hpp +84 -0
- package/nitrogen/generated/shared/c++/NativeDrmParams.hpp +105 -0
- package/nitrogen/generated/shared/c++/NativeExternalSubtitle.hpp +89 -0
- package/nitrogen/generated/shared/c++/NativeVideoConfig.hpp +135 -0
- package/nitrogen/generated/shared/c++/OnGetLicensePayload.hpp +87 -0
- package/nitrogen/generated/shared/c++/PlayerTrack.hpp +88 -0
- package/nitrogen/generated/shared/c++/ResizeMode.hpp +84 -0
- package/nitrogen/generated/shared/c++/Resolution.hpp +79 -0
- package/nitrogen/generated/shared/c++/SourceType.hpp +76 -0
- package/nitrogen/generated/shared/c++/SubtitleType.hpp +88 -0
- package/nitrogen/generated/shared/c++/SurfaceType.hpp +76 -0
- package/nitrogen/generated/shared/c++/TimedMetadata.hpp +77 -0
- package/nitrogen/generated/shared/c++/TimedMetadataObject.hpp +79 -0
- package/nitrogen/generated/shared/c++/TrackType.hpp +63 -0
- package/nitrogen/generated/shared/c++/VideoInformation.hpp +104 -0
- package/nitrogen/generated/shared/c++/VideoOrientation.hpp +96 -0
- package/nitrogen/generated/shared/c++/VideoPlayerStatus.hpp +84 -0
- package/nitrogen/generated/shared/c++/VideoPlayerTrack.hpp +96 -0
- package/nitrogen/generated/shared/c++/onLoadData.hpp +99 -0
- package/nitrogen/generated/shared/c++/onLoadStartData.hpp +84 -0
- package/nitrogen/generated/shared/c++/onPlaybackStateChangeData.hpp +79 -0
- package/nitrogen/generated/shared/c++/onProgressData.hpp +79 -0
- package/nitrogen/generated/shared/c++/onVolumeChangeData.hpp +79 -0
- package/package.json +155 -0
- package/react-native.config.js +19 -0
- package/src/core/VideoPlayer.ts +326 -0
- package/src/core/VideoPlayerEvents.ts +142 -0
- package/src/core/hooks/useEvent.ts +24 -0
- package/src/core/hooks/useManagedInstance.ts +96 -0
- package/src/core/hooks/useVideoPlayer.ts +73 -0
- package/src/core/types/BufferConfig.ts +103 -0
- package/src/core/types/DrmParams.ts +65 -0
- package/src/core/types/Events.ts +276 -0
- package/src/core/types/IgnoreSilentSwitchMode.ts +1 -0
- package/src/core/types/MixAudioMode.ts +1 -0
- package/src/core/types/PlayerTrack.ts +39 -0
- package/src/core/types/ResizeMode.ts +9 -0
- package/src/core/types/Utils.ts +1 -0
- package/src/core/types/VideoConfig.ts +165 -0
- package/src/core/types/VideoError.ts +174 -0
- package/src/core/types/VideoInformation.ts +44 -0
- package/src/core/types/VideoOrientation.ts +8 -0
- package/src/core/types/VideoPlayerBase.ts +193 -0
- package/src/core/types/VideoPlayerSourceBase.ts +19 -0
- package/src/core/types/VideoPlayerStatus.ts +8 -0
- package/src/core/utils/playerFactory.ts +33 -0
- package/src/core/utils/sourceFactory.ts +171 -0
- package/src/core/video-view/NativeVideoView.tsx +18 -0
- package/src/core/video-view/VideoView.tsx +406 -0
- package/src/expo-plugins/@types.ts +37 -0
- package/src/expo-plugins/getPackageInfo.ts +23 -0
- package/src/expo-plugins/withAndroidExtensions.ts +46 -0
- package/src/expo-plugins/withAndroidNotificationControls.ts +43 -0
- package/src/expo-plugins/withAndroidPictureInPicture.ts +31 -0
- package/src/expo-plugins/withBackgroundAudio.ts +26 -0
- package/src/expo-plugins/withReactNativeVideo.ts +32 -0
- package/src/expo-plugins/writeToPodfile.ts +74 -0
- package/src/index.tsx +27 -0
- package/src/spec/fabric/VideoViewNativeComponent.ts +17 -0
- package/src/spec/nitro/VideoPlayer.nitro.ts +38 -0
- package/src/spec/nitro/VideoPlayerEventEmitter.nitro.ts +196 -0
- package/src/spec/nitro/VideoPlayerSource.nitro.ts +18 -0
- package/src/spec/nitro/VideoViewViewManager.nitro.ts +92 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVAsset+estimatedMemoryUsage.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 23/01/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import AVFoundation
|
|
9
|
+
import Foundation
|
|
10
|
+
|
|
11
|
+
extension AVAsset {
|
|
12
|
+
var estimatedMemoryUsage: Int {
|
|
13
|
+
if let urlAsset = self as? AVURLAsset, urlAsset.url.isFileURL {
|
|
14
|
+
let resourceValues = try? urlAsset.url.resourceValues(forKeys: [.fileSizeKey])
|
|
15
|
+
if let fileSize = resourceValues?.fileSize, fileSize > 0 {
|
|
16
|
+
return fileSize
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var estimatedSize = 0
|
|
21
|
+
|
|
22
|
+
let videoTracks = tracks(withMediaType: .video)
|
|
23
|
+
let audioTracks = tracks(withMediaType: .audio)
|
|
24
|
+
|
|
25
|
+
for track in videoTracks {
|
|
26
|
+
let size = track.naturalSize
|
|
27
|
+
let pixelCount = size.width * size.height
|
|
28
|
+
let duration = CMTimeGetSeconds(track.timeRange.duration)
|
|
29
|
+
|
|
30
|
+
if duration > 0 && !duration.isNaN && !duration.isInfinite {
|
|
31
|
+
let bitrate = track.estimatedDataRate > 0 ? track.estimatedDataRate : 2_000_000
|
|
32
|
+
estimatedSize += Int((bitrate * Float(duration)) / 8)
|
|
33
|
+
} else {
|
|
34
|
+
estimatedSize += Int(pixelCount * 4)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
for track in audioTracks {
|
|
39
|
+
let duration = CMTimeGetSeconds(track.timeRange.duration)
|
|
40
|
+
let bitrate = track.estimatedDataRate > 0 ? track.estimatedDataRate : 128_000
|
|
41
|
+
|
|
42
|
+
if duration > 0 && !duration.isNaN && !duration.isInfinite {
|
|
43
|
+
estimatedSize += Int((bitrate * Float(duration)) / 8)
|
|
44
|
+
} else {
|
|
45
|
+
estimatedSize += 1_000_000
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return estimatedSize > 0 ? estimatedSize : 0
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVAssetTrack+orientation.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 23/01/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import AVFoundation
|
|
9
|
+
|
|
10
|
+
extension AVAssetTrack {
|
|
11
|
+
var orientation: VideoOrientation {
|
|
12
|
+
let transform = preferredTransform
|
|
13
|
+
let size = naturalSize.applying(transform)
|
|
14
|
+
|
|
15
|
+
// Check if video is square
|
|
16
|
+
if size.width == size.height {
|
|
17
|
+
return .square
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Check if video is portrait or landscape
|
|
21
|
+
let isNaturalSizePortrait = size.width < size.height
|
|
22
|
+
|
|
23
|
+
// Calculate video rotation
|
|
24
|
+
let angle = atan2(Double(transform.b), Double(transform.a))
|
|
25
|
+
let degrees = angle * 180 / .pi
|
|
26
|
+
let rotation = degrees < 0 ? degrees + 360 : degrees
|
|
27
|
+
|
|
28
|
+
switch rotation {
|
|
29
|
+
case 0:
|
|
30
|
+
return isNaturalSizePortrait ? .portrait : .landscapeRight
|
|
31
|
+
case 90, -270:
|
|
32
|
+
return .portrait
|
|
33
|
+
case 180, -180:
|
|
34
|
+
return isNaturalSizePortrait ? .portraitUpsideDown : .landscapeLeft
|
|
35
|
+
case 270, -90:
|
|
36
|
+
return .portraitUpsideDown
|
|
37
|
+
default:
|
|
38
|
+
return isNaturalSizePortrait ? .portrait : .landscape
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVPlayerItem+externalSubtitles.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 08/05/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import AVFoundation
|
|
9
|
+
import Foundation
|
|
10
|
+
|
|
11
|
+
extension AVPlayerItem {
|
|
12
|
+
static func withExternalSubtitles(for asset: AVURLAsset, config: NativeVideoConfig) async throws
|
|
13
|
+
-> AVPlayerItem
|
|
14
|
+
{
|
|
15
|
+
if config.externalSubtitles?.isEmpty != false {
|
|
16
|
+
return AVPlayerItem(asset: asset)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if asset.url.pathExtension == "m3u8" {
|
|
20
|
+
let supportedExternalSubtitles = config.externalSubtitles?.filter { subtitle in
|
|
21
|
+
ExternalSubtitlesUtils.isSubtitleTypeSupported(subtitle: subtitle)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if supportedExternalSubtitles?.isEmpty == true {
|
|
25
|
+
return AVPlayerItem(asset: asset)
|
|
26
|
+
} else {
|
|
27
|
+
return try await ExternalSubtitlesUtils.modifyStreamManifestWithExternalSubtitles(
|
|
28
|
+
for: asset, config: config)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return try await ExternalSubtitlesUtils.createCompositionWithExternalSubtitles(
|
|
33
|
+
for: asset, config: config)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVPlayerItem+getBufferedPosition.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 06/05/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import AVFoundation
|
|
10
|
+
|
|
11
|
+
extension AVPlayerItem {
|
|
12
|
+
|
|
13
|
+
// Duration that can be played using only the buffer (seconds)
|
|
14
|
+
func getbufferDuration() -> Double {
|
|
15
|
+
var effectiveTimeRange: CMTimeRange?
|
|
16
|
+
|
|
17
|
+
for value in loadedTimeRanges {
|
|
18
|
+
let timeRange: CMTimeRange = value.timeRangeValue
|
|
19
|
+
if CMTimeRangeContainsTime(timeRange, time: currentTime()) {
|
|
20
|
+
effectiveTimeRange = timeRange
|
|
21
|
+
break
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if let effectiveTimeRange {
|
|
26
|
+
let playableDuration: Float64 = CMTimeGetSeconds(CMTimeRangeGetEnd(effectiveTimeRange))
|
|
27
|
+
if playableDuration > 0 {
|
|
28
|
+
return playableDuration
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return 0
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVPlayerItem+setBufferConfig.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 13/09/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import AVFoundation
|
|
10
|
+
|
|
11
|
+
extension AVPlayerItem {
|
|
12
|
+
func setBufferConfig(config: BufferConfig) {
|
|
13
|
+
if let forwardBufferDurationMs = config.preferredForwardBufferDurationMs {
|
|
14
|
+
preferredForwardBufferDuration = TimeInterval(forwardBufferDurationMs / 1000.0)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if let peakBitRate = config.preferredPeakBitRate {
|
|
18
|
+
preferredPeakBitRate = Double(peakBitRate)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if let maximumResolution = config.preferredMaximumResolution {
|
|
22
|
+
preferredMaximumResolution = CGSize(width: maximumResolution.width, height: maximumResolution.height)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if let peakBitRateForExpensiveNetworks = config.preferredPeakBitRateForExpensiveNetworks {
|
|
26
|
+
preferredPeakBitRateForExpensiveNetworks = Double(peakBitRateForExpensiveNetworks)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if let maximumResolutionForExpensiveNetworks = config.preferredMaximumResolutionForExpensiveNetworks {
|
|
30
|
+
preferredMaximumResolutionForExpensiveNetworks = CGSize(width: maximumResolutionForExpensiveNetworks.width, height: maximumResolutionForExpensiveNetworks.height)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if let liveTargetOffsetMs = config.livePlayback?.targetOffsetMs {
|
|
34
|
+
configuredTimeOffsetFromLive = CMTime(seconds: Double(liveTargetOffsetMs) / 1000.0, preferredTimescale: 1000)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVPlayerViewController+Fullscreen.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 27/04/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import AVKit
|
|
10
|
+
|
|
11
|
+
extension AVPlayerViewController {
|
|
12
|
+
// https://stackoverflow.com/a/64466924
|
|
13
|
+
|
|
14
|
+
func enterFullscreen(animated: Bool) {
|
|
15
|
+
performIfResponds(NSSelectorFromString("enterFullScreenAnimated:completionHandler:"), with: animated, with: nil)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
func exitFullscreen(animated: Bool) {
|
|
19
|
+
performIfResponds(NSSelectorFromString("exitFullScreenAnimated:completionHandler:"), with: animated, with: nil)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AVPlayerViewController+PictureInPicture.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 27/04/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import AVKit
|
|
10
|
+
|
|
11
|
+
extension AVPlayerViewController {
|
|
12
|
+
// https://github.com/expo/expo/blob/d37ae17df23c58011a3c5b9f5dedd563bf8e6521/packages/expo-video/ios/VideoView.swift#L110
|
|
13
|
+
func startPictureInPicture() throws {
|
|
14
|
+
guard AVPictureInPictureController.isPictureInPictureSupported() else {
|
|
15
|
+
throw VideoViewError.pictureInPictureNotSupported.error()
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
performIfResponds(NSSelectorFromString("startPictureInPicture"))
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
func stopPictureInPicture() {
|
|
22
|
+
performIfResponds(NSSelectorFromString("stopPictureInPicture"))
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import AVFoundation
|
|
2
|
+
|
|
3
|
+
extension AVURLAsset {
|
|
4
|
+
func getAssetInformation() async throws -> VideoInformation {
|
|
5
|
+
// Initialize with default values
|
|
6
|
+
var videoInformation = VideoInformation(
|
|
7
|
+
bitrate: Double.nan,
|
|
8
|
+
width: Double.nan,
|
|
9
|
+
height: Double.nan,
|
|
10
|
+
duration: -1,
|
|
11
|
+
fileSize: -1,
|
|
12
|
+
isHDR: false,
|
|
13
|
+
isLive: false,
|
|
14
|
+
orientation: .unknown
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
videoInformation.fileSize = try await VideoFileHelper.getFileSize(for: url)
|
|
18
|
+
|
|
19
|
+
// Check if asset is live stream
|
|
20
|
+
if duration.flags.contains(.indefinite) {
|
|
21
|
+
videoInformation.duration = -1
|
|
22
|
+
videoInformation.isLive = true
|
|
23
|
+
} else {
|
|
24
|
+
videoInformation.duration = Int64(CMTimeGetSeconds(duration))
|
|
25
|
+
videoInformation.isLive = false
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if let videoTrack = tracks(withMediaType: .video).first {
|
|
29
|
+
let size = videoTrack.naturalSize.applying(videoTrack.preferredTransform)
|
|
30
|
+
videoInformation.width = size.width
|
|
31
|
+
videoInformation.height = size.height
|
|
32
|
+
|
|
33
|
+
videoInformation.bitrate = Double(videoTrack.estimatedDataRate)
|
|
34
|
+
|
|
35
|
+
videoInformation.orientation = videoTrack.orientation
|
|
36
|
+
|
|
37
|
+
if #available(iOS 14.0, tvOS 14.0, visionOS 1.0, *) {
|
|
38
|
+
videoInformation.isHDR = videoTrack.hasMediaCharacteristic(.containsHDRVideo)
|
|
39
|
+
}
|
|
40
|
+
} else if url.pathExtension == "m3u8" {
|
|
41
|
+
// For HLS streams, we cannot get video track information directly
|
|
42
|
+
// So we download manifest and try to extract video information from it
|
|
43
|
+
|
|
44
|
+
let manifestContent = try await HLSManifestParser.downloadManifest(from: url)
|
|
45
|
+
let manifestInfo = try HLSManifestParser.parseM3U8Manifest(manifestContent)
|
|
46
|
+
|
|
47
|
+
if let videoStream = manifestInfo.streams.first {
|
|
48
|
+
videoInformation.width = Double(videoStream.width ?? Int(Double.nan))
|
|
49
|
+
videoInformation.height = Double(videoStream.height ?? Int(Double.nan))
|
|
50
|
+
videoInformation.bitrate = Double(videoStream.bandwidth ?? Int(Double.nan))
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if videoInformation.width > 0 && videoInformation.height > 0 {
|
|
54
|
+
if videoInformation.width == videoInformation.height {
|
|
55
|
+
videoInformation.orientation = .square
|
|
56
|
+
} else if videoInformation.width > videoInformation.height {
|
|
57
|
+
videoInformation.orientation = .landscapeRight
|
|
58
|
+
} else if videoInformation.width < videoInformation.height {
|
|
59
|
+
videoInformation.orientation = .portrait
|
|
60
|
+
} else {
|
|
61
|
+
videoInformation.orientation = .unknown
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return videoInformation
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// NSObject+PerformIfResponds.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created by Krzysztof Moch on 27/04/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
|
|
10
|
+
extension NSObject {
|
|
11
|
+
// Safe perform methods for Objective-C selectors
|
|
12
|
+
|
|
13
|
+
func performIfResponds(_ selector: Selector) {
|
|
14
|
+
if self.responds(to: selector) {
|
|
15
|
+
self.perform(selector)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
func performIfResponds(_ selector: Selector, with object: Any?) {
|
|
20
|
+
if self.responds(to: selector) {
|
|
21
|
+
self.perform(selector, with: object)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func performIfResponds(_ selector: Selector, with object1: Any?, with object2: Any?) {
|
|
26
|
+
if self.responds(to: selector) {
|
|
27
|
+
self.perform(selector, with: object1, with: object2)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ResizeMode.swift
|
|
3
|
+
// ReactNativeVideo
|
|
4
|
+
//
|
|
5
|
+
// Created for resizeMode feature
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import AVFoundation
|
|
10
|
+
|
|
11
|
+
public extension ResizeMode {
|
|
12
|
+
func toVideoGravity() -> AVLayerVideoGravity {
|
|
13
|
+
switch self {
|
|
14
|
+
case .contain:
|
|
15
|
+
return .resizeAspect
|
|
16
|
+
case .cover:
|
|
17
|
+
return .resizeAspectFill
|
|
18
|
+
case .stretch:
|
|
19
|
+
return .resize
|
|
20
|
+
case .none:
|
|
21
|
+
return .resizeAspect // Default to aspect ratio if none specified
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|