@pigeonmal/react-native-video 7.0.0-beta.10
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 +38 -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 +292 -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 +670 -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 +168 -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 +62 -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 +313 -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 +27 -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 +309 -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 +22 -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 +66 -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 +222 -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 +138 -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 +194 -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 +15 -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 +66 -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 +222 -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 +138 -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 +194 -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 +15 -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 +60 -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 +324 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp +106 -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 +178 -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 +65 -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 +201 -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 +71 -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 +44 -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 +1134 -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 +82 -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 +283 -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 +145 -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 +85 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift +508 -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 +368 -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 +58 -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 +68 -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 +63 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp +132 -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 +139 -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 +83 -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 +377 -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 +280 -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 +166 -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 +224 -0
- package/src/core/types/VideoPlayerSourceBase.ts +19 -0
- package/src/core/types/VideoPlayerStatus.ts +8 -0
- package/src/core/utils/playerFactory.ts +35 -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 +34 -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,84 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// MixAudioMode.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::video {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (MixAudioMode).
|
|
30
|
+
*/
|
|
31
|
+
enum class MixAudioMode {
|
|
32
|
+
MIXWITHOTHERS SWIFT_NAME(mixwithothers) = 0,
|
|
33
|
+
DONOTMIX SWIFT_NAME(donotmix) = 1,
|
|
34
|
+
DUCKOTHERS SWIFT_NAME(duckothers) = 2,
|
|
35
|
+
AUTO SWIFT_NAME(auto) = 3,
|
|
36
|
+
} CLOSED_ENUM;
|
|
37
|
+
|
|
38
|
+
} // namespace margelo::nitro::video
|
|
39
|
+
|
|
40
|
+
namespace margelo::nitro {
|
|
41
|
+
|
|
42
|
+
// C++ MixAudioMode <> JS MixAudioMode (union)
|
|
43
|
+
template <>
|
|
44
|
+
struct JSIConverter<margelo::nitro::video::MixAudioMode> final {
|
|
45
|
+
static inline margelo::nitro::video::MixAudioMode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
46
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
47
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
48
|
+
case hashString("mixWithOthers"): return margelo::nitro::video::MixAudioMode::MIXWITHOTHERS;
|
|
49
|
+
case hashString("doNotMix"): return margelo::nitro::video::MixAudioMode::DONOTMIX;
|
|
50
|
+
case hashString("duckOthers"): return margelo::nitro::video::MixAudioMode::DUCKOTHERS;
|
|
51
|
+
case hashString("auto"): return margelo::nitro::video::MixAudioMode::AUTO;
|
|
52
|
+
default: [[unlikely]]
|
|
53
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum MixAudioMode - invalid value!");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::video::MixAudioMode arg) {
|
|
57
|
+
switch (arg) {
|
|
58
|
+
case margelo::nitro::video::MixAudioMode::MIXWITHOTHERS: return JSIConverter<std::string>::toJSI(runtime, "mixWithOthers");
|
|
59
|
+
case margelo::nitro::video::MixAudioMode::DONOTMIX: return JSIConverter<std::string>::toJSI(runtime, "doNotMix");
|
|
60
|
+
case margelo::nitro::video::MixAudioMode::DUCKOTHERS: return JSIConverter<std::string>::toJSI(runtime, "duckOthers");
|
|
61
|
+
case margelo::nitro::video::MixAudioMode::AUTO: return JSIConverter<std::string>::toJSI(runtime, "auto");
|
|
62
|
+
default: [[unlikely]]
|
|
63
|
+
throw std::invalid_argument("Cannot convert MixAudioMode to JS - invalid value: "
|
|
64
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isString()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
72
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
73
|
+
case hashString("mixWithOthers"):
|
|
74
|
+
case hashString("doNotMix"):
|
|
75
|
+
case hashString("duckOthers"):
|
|
76
|
+
case hashString("auto"):
|
|
77
|
+
return true;
|
|
78
|
+
default:
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NativeDrmParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
// Forward declaration of `OnGetLicensePayload` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::video { struct OnGetLicensePayload; }
|
|
28
|
+
|
|
29
|
+
#include <string>
|
|
30
|
+
#include <optional>
|
|
31
|
+
#include <unordered_map>
|
|
32
|
+
#include <NitroModules/Promise.hpp>
|
|
33
|
+
#include "OnGetLicensePayload.hpp"
|
|
34
|
+
#include <functional>
|
|
35
|
+
|
|
36
|
+
namespace margelo::nitro::video {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A struct which can be represented as a JavaScript object (NativeDrmParams).
|
|
40
|
+
*/
|
|
41
|
+
struct NativeDrmParams {
|
|
42
|
+
public:
|
|
43
|
+
std::optional<std::string> type SWIFT_PRIVATE;
|
|
44
|
+
std::optional<std::string> licenseUrl SWIFT_PRIVATE;
|
|
45
|
+
std::optional<std::string> certificateUrl SWIFT_PRIVATE;
|
|
46
|
+
std::optional<std::string> contentId SWIFT_PRIVATE;
|
|
47
|
+
std::optional<std::unordered_map<std::string, std::string>> licenseHeaders SWIFT_PRIVATE;
|
|
48
|
+
std::optional<bool> multiSession SWIFT_PRIVATE;
|
|
49
|
+
std::optional<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>(const OnGetLicensePayload& /* payload */)>> getLicense SWIFT_PRIVATE;
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
NativeDrmParams() = default;
|
|
53
|
+
explicit NativeDrmParams(std::optional<std::string> type, std::optional<std::string> licenseUrl, std::optional<std::string> certificateUrl, std::optional<std::string> contentId, std::optional<std::unordered_map<std::string, std::string>> licenseHeaders, std::optional<bool> multiSession, std::optional<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>(const OnGetLicensePayload& /* payload */)>> getLicense): type(type), licenseUrl(licenseUrl), certificateUrl(certificateUrl), contentId(contentId), licenseHeaders(licenseHeaders), multiSession(multiSession), getLicense(getLicense) {}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
} // namespace margelo::nitro::video
|
|
57
|
+
|
|
58
|
+
namespace margelo::nitro {
|
|
59
|
+
|
|
60
|
+
// C++ NativeDrmParams <> JS NativeDrmParams (object)
|
|
61
|
+
template <>
|
|
62
|
+
struct JSIConverter<margelo::nitro::video::NativeDrmParams> final {
|
|
63
|
+
static inline margelo::nitro::video::NativeDrmParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
64
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
65
|
+
return margelo::nitro::video::NativeDrmParams(
|
|
66
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "type")),
|
|
67
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "licenseUrl")),
|
|
68
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "certificateUrl")),
|
|
69
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "contentId")),
|
|
70
|
+
JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, "licenseHeaders")),
|
|
71
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "multiSession")),
|
|
72
|
+
JSIConverter<std::optional<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>(const margelo::nitro::video::OnGetLicensePayload&)>>>::fromJSI(runtime, obj.getProperty(runtime, "getLicense"))
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::video::NativeDrmParams& arg) {
|
|
76
|
+
jsi::Object obj(runtime);
|
|
77
|
+
obj.setProperty(runtime, "type", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.type));
|
|
78
|
+
obj.setProperty(runtime, "licenseUrl", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.licenseUrl));
|
|
79
|
+
obj.setProperty(runtime, "certificateUrl", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.certificateUrl));
|
|
80
|
+
obj.setProperty(runtime, "contentId", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.contentId));
|
|
81
|
+
obj.setProperty(runtime, "licenseHeaders", JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::toJSI(runtime, arg.licenseHeaders));
|
|
82
|
+
obj.setProperty(runtime, "multiSession", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.multiSession));
|
|
83
|
+
obj.setProperty(runtime, "getLicense", JSIConverter<std::optional<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>(const margelo::nitro::video::OnGetLicensePayload&)>>>::toJSI(runtime, arg.getLicense));
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
87
|
+
if (!value.isObject()) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
jsi::Object obj = value.getObject(runtime);
|
|
91
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
|
|
95
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "licenseUrl"))) return false;
|
|
96
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "certificateUrl"))) return false;
|
|
97
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "contentId"))) return false;
|
|
98
|
+
if (!JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::canConvert(runtime, obj.getProperty(runtime, "licenseHeaders"))) return false;
|
|
99
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "multiSession"))) return false;
|
|
100
|
+
if (!JSIConverter<std::optional<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>(const margelo::nitro::video::OnGetLicensePayload&)>>>::canConvert(runtime, obj.getProperty(runtime, "getLicense"))) return false;
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NativeExternalSubtitle.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
// Forward declaration of `SubtitleType` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::video { enum class SubtitleType; }
|
|
28
|
+
|
|
29
|
+
#include <string>
|
|
30
|
+
#include "SubtitleType.hpp"
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::video {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A struct which can be represented as a JavaScript object (NativeExternalSubtitle).
|
|
36
|
+
*/
|
|
37
|
+
struct NativeExternalSubtitle {
|
|
38
|
+
public:
|
|
39
|
+
std::string uri SWIFT_PRIVATE;
|
|
40
|
+
std::string label SWIFT_PRIVATE;
|
|
41
|
+
SubtitleType type SWIFT_PRIVATE;
|
|
42
|
+
std::string language SWIFT_PRIVATE;
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
NativeExternalSubtitle() = default;
|
|
46
|
+
explicit NativeExternalSubtitle(std::string uri, std::string label, SubtitleType type, std::string language): uri(uri), label(label), type(type), language(language) {}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
} // namespace margelo::nitro::video
|
|
50
|
+
|
|
51
|
+
namespace margelo::nitro {
|
|
52
|
+
|
|
53
|
+
// C++ NativeExternalSubtitle <> JS NativeExternalSubtitle (object)
|
|
54
|
+
template <>
|
|
55
|
+
struct JSIConverter<margelo::nitro::video::NativeExternalSubtitle> final {
|
|
56
|
+
static inline margelo::nitro::video::NativeExternalSubtitle fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
58
|
+
return margelo::nitro::video::NativeExternalSubtitle(
|
|
59
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uri")),
|
|
60
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "label")),
|
|
61
|
+
JSIConverter<margelo::nitro::video::SubtitleType>::fromJSI(runtime, obj.getProperty(runtime, "type")),
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "language"))
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::video::NativeExternalSubtitle& arg) {
|
|
66
|
+
jsi::Object obj(runtime);
|
|
67
|
+
obj.setProperty(runtime, "uri", JSIConverter<std::string>::toJSI(runtime, arg.uri));
|
|
68
|
+
obj.setProperty(runtime, "label", JSIConverter<std::string>::toJSI(runtime, arg.label));
|
|
69
|
+
obj.setProperty(runtime, "type", JSIConverter<margelo::nitro::video::SubtitleType>::toJSI(runtime, arg.type));
|
|
70
|
+
obj.setProperty(runtime, "language", JSIConverter<std::string>::toJSI(runtime, arg.language));
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
+
if (!value.isObject()) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
jsi::Object obj = value.getObject(runtime);
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uri"))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "label"))) return false;
|
|
83
|
+
if (!JSIConverter<margelo::nitro::video::SubtitleType>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
|
|
84
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "language"))) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NativeVideoConfig.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
// Forward declaration of `NativeExternalSubtitle` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::video { struct NativeExternalSubtitle; }
|
|
28
|
+
// Forward declaration of `NativeDrmParams` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::video { struct NativeDrmParams; }
|
|
30
|
+
// Forward declaration of `BufferConfig` to properly resolve imports.
|
|
31
|
+
namespace margelo::nitro::video { struct BufferConfig; }
|
|
32
|
+
// Forward declaration of `CustomVideoMetadata` to properly resolve imports.
|
|
33
|
+
namespace margelo::nitro::video { struct CustomVideoMetadata; }
|
|
34
|
+
// Forward declaration of `ExternalAudio` to properly resolve imports.
|
|
35
|
+
namespace margelo::nitro::video { struct ExternalAudio; }
|
|
36
|
+
// Forward declaration of `ExternalForcedType` to properly resolve imports.
|
|
37
|
+
namespace margelo::nitro::video { enum class ExternalForcedType; }
|
|
38
|
+
|
|
39
|
+
#include <string>
|
|
40
|
+
#include "NativeExternalSubtitle.hpp"
|
|
41
|
+
#include <vector>
|
|
42
|
+
#include <optional>
|
|
43
|
+
#include "NativeDrmParams.hpp"
|
|
44
|
+
#include <unordered_map>
|
|
45
|
+
#include "BufferConfig.hpp"
|
|
46
|
+
#include "CustomVideoMetadata.hpp"
|
|
47
|
+
#include "ExternalAudio.hpp"
|
|
48
|
+
#include "ExternalForcedType.hpp"
|
|
49
|
+
|
|
50
|
+
namespace margelo::nitro::video {
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A struct which can be represented as a JavaScript object (NativeVideoConfig).
|
|
54
|
+
*/
|
|
55
|
+
struct NativeVideoConfig {
|
|
56
|
+
public:
|
|
57
|
+
std::string uri SWIFT_PRIVATE;
|
|
58
|
+
std::optional<std::vector<NativeExternalSubtitle>> externalSubtitles SWIFT_PRIVATE;
|
|
59
|
+
std::optional<NativeDrmParams> drm SWIFT_PRIVATE;
|
|
60
|
+
std::optional<std::unordered_map<std::string, std::string>> headers SWIFT_PRIVATE;
|
|
61
|
+
std::optional<BufferConfig> bufferConfig SWIFT_PRIVATE;
|
|
62
|
+
std::optional<CustomVideoMetadata> metadata SWIFT_PRIVATE;
|
|
63
|
+
std::optional<std::vector<ExternalAudio>> externalAudios SWIFT_PRIVATE;
|
|
64
|
+
std::optional<int64_t> initialSubtitleDelay SWIFT_PRIVATE;
|
|
65
|
+
std::optional<bool> forceOkhttp SWIFT_PRIVATE;
|
|
66
|
+
std::optional<int64_t> startPosition SWIFT_PRIVATE;
|
|
67
|
+
std::optional<bool> initializeOnCreation SWIFT_PRIVATE;
|
|
68
|
+
std::optional<ExternalForcedType> forceType SWIFT_PRIVATE;
|
|
69
|
+
|
|
70
|
+
public:
|
|
71
|
+
NativeVideoConfig() = default;
|
|
72
|
+
explicit NativeVideoConfig(std::string uri, std::optional<std::vector<NativeExternalSubtitle>> externalSubtitles, std::optional<NativeDrmParams> drm, std::optional<std::unordered_map<std::string, std::string>> headers, std::optional<BufferConfig> bufferConfig, std::optional<CustomVideoMetadata> metadata, std::optional<std::vector<ExternalAudio>> externalAudios, std::optional<int64_t> initialSubtitleDelay, std::optional<bool> forceOkhttp, std::optional<int64_t> startPosition, std::optional<bool> initializeOnCreation, std::optional<ExternalForcedType> forceType): uri(uri), externalSubtitles(externalSubtitles), drm(drm), headers(headers), bufferConfig(bufferConfig), metadata(metadata), externalAudios(externalAudios), initialSubtitleDelay(initialSubtitleDelay), forceOkhttp(forceOkhttp), startPosition(startPosition), initializeOnCreation(initializeOnCreation), forceType(forceType) {}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::video
|
|
76
|
+
|
|
77
|
+
namespace margelo::nitro {
|
|
78
|
+
|
|
79
|
+
// C++ NativeVideoConfig <> JS NativeVideoConfig (object)
|
|
80
|
+
template <>
|
|
81
|
+
struct JSIConverter<margelo::nitro::video::NativeVideoConfig> final {
|
|
82
|
+
static inline margelo::nitro::video::NativeVideoConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
83
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
84
|
+
return margelo::nitro::video::NativeVideoConfig(
|
|
85
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uri")),
|
|
86
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::video::NativeExternalSubtitle>>>::fromJSI(runtime, obj.getProperty(runtime, "externalSubtitles")),
|
|
87
|
+
JSIConverter<std::optional<margelo::nitro::video::NativeDrmParams>>::fromJSI(runtime, obj.getProperty(runtime, "drm")),
|
|
88
|
+
JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::fromJSI(runtime, obj.getProperty(runtime, "headers")),
|
|
89
|
+
JSIConverter<std::optional<margelo::nitro::video::BufferConfig>>::fromJSI(runtime, obj.getProperty(runtime, "bufferConfig")),
|
|
90
|
+
JSIConverter<std::optional<margelo::nitro::video::CustomVideoMetadata>>::fromJSI(runtime, obj.getProperty(runtime, "metadata")),
|
|
91
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::video::ExternalAudio>>>::fromJSI(runtime, obj.getProperty(runtime, "externalAudios")),
|
|
92
|
+
JSIConverter<std::optional<int64_t>>::fromJSI(runtime, obj.getProperty(runtime, "initialSubtitleDelay")),
|
|
93
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "forceOkhttp")),
|
|
94
|
+
JSIConverter<std::optional<int64_t>>::fromJSI(runtime, obj.getProperty(runtime, "startPosition")),
|
|
95
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "initializeOnCreation")),
|
|
96
|
+
JSIConverter<std::optional<margelo::nitro::video::ExternalForcedType>>::fromJSI(runtime, obj.getProperty(runtime, "forceType"))
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::video::NativeVideoConfig& arg) {
|
|
100
|
+
jsi::Object obj(runtime);
|
|
101
|
+
obj.setProperty(runtime, "uri", JSIConverter<std::string>::toJSI(runtime, arg.uri));
|
|
102
|
+
obj.setProperty(runtime, "externalSubtitles", JSIConverter<std::optional<std::vector<margelo::nitro::video::NativeExternalSubtitle>>>::toJSI(runtime, arg.externalSubtitles));
|
|
103
|
+
obj.setProperty(runtime, "drm", JSIConverter<std::optional<margelo::nitro::video::NativeDrmParams>>::toJSI(runtime, arg.drm));
|
|
104
|
+
obj.setProperty(runtime, "headers", JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::toJSI(runtime, arg.headers));
|
|
105
|
+
obj.setProperty(runtime, "bufferConfig", JSIConverter<std::optional<margelo::nitro::video::BufferConfig>>::toJSI(runtime, arg.bufferConfig));
|
|
106
|
+
obj.setProperty(runtime, "metadata", JSIConverter<std::optional<margelo::nitro::video::CustomVideoMetadata>>::toJSI(runtime, arg.metadata));
|
|
107
|
+
obj.setProperty(runtime, "externalAudios", JSIConverter<std::optional<std::vector<margelo::nitro::video::ExternalAudio>>>::toJSI(runtime, arg.externalAudios));
|
|
108
|
+
obj.setProperty(runtime, "initialSubtitleDelay", JSIConverter<std::optional<int64_t>>::toJSI(runtime, arg.initialSubtitleDelay));
|
|
109
|
+
obj.setProperty(runtime, "forceOkhttp", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.forceOkhttp));
|
|
110
|
+
obj.setProperty(runtime, "startPosition", JSIConverter<std::optional<int64_t>>::toJSI(runtime, arg.startPosition));
|
|
111
|
+
obj.setProperty(runtime, "initializeOnCreation", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.initializeOnCreation));
|
|
112
|
+
obj.setProperty(runtime, "forceType", JSIConverter<std::optional<margelo::nitro::video::ExternalForcedType>>::toJSI(runtime, arg.forceType));
|
|
113
|
+
return obj;
|
|
114
|
+
}
|
|
115
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
116
|
+
if (!value.isObject()) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
jsi::Object obj = value.getObject(runtime);
|
|
120
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uri"))) return false;
|
|
124
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::video::NativeExternalSubtitle>>>::canConvert(runtime, obj.getProperty(runtime, "externalSubtitles"))) return false;
|
|
125
|
+
if (!JSIConverter<std::optional<margelo::nitro::video::NativeDrmParams>>::canConvert(runtime, obj.getProperty(runtime, "drm"))) return false;
|
|
126
|
+
if (!JSIConverter<std::optional<std::unordered_map<std::string, std::string>>>::canConvert(runtime, obj.getProperty(runtime, "headers"))) return false;
|
|
127
|
+
if (!JSIConverter<std::optional<margelo::nitro::video::BufferConfig>>::canConvert(runtime, obj.getProperty(runtime, "bufferConfig"))) return false;
|
|
128
|
+
if (!JSIConverter<std::optional<margelo::nitro::video::CustomVideoMetadata>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
|
|
129
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::video::ExternalAudio>>>::canConvert(runtime, obj.getProperty(runtime, "externalAudios"))) return false;
|
|
130
|
+
if (!JSIConverter<std::optional<int64_t>>::canConvert(runtime, obj.getProperty(runtime, "initialSubtitleDelay"))) return false;
|
|
131
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "forceOkhttp"))) return false;
|
|
132
|
+
if (!JSIConverter<std::optional<int64_t>>::canConvert(runtime, obj.getProperty(runtime, "startPosition"))) return false;
|
|
133
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "initializeOnCreation"))) return false;
|
|
134
|
+
if (!JSIConverter<std::optional<margelo::nitro::video::ExternalForcedType>>::canConvert(runtime, obj.getProperty(runtime, "forceType"))) return false;
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// OnGetLicensePayload.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::video {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (OnGetLicensePayload).
|
|
34
|
+
*/
|
|
35
|
+
struct OnGetLicensePayload {
|
|
36
|
+
public:
|
|
37
|
+
std::string contentId SWIFT_PRIVATE;
|
|
38
|
+
std::string licenseUrl SWIFT_PRIVATE;
|
|
39
|
+
std::string keyUrl SWIFT_PRIVATE;
|
|
40
|
+
std::string spc SWIFT_PRIVATE;
|
|
41
|
+
|
|
42
|
+
public:
|
|
43
|
+
OnGetLicensePayload() = default;
|
|
44
|
+
explicit OnGetLicensePayload(std::string contentId, std::string licenseUrl, std::string keyUrl, std::string spc): contentId(contentId), licenseUrl(licenseUrl), keyUrl(keyUrl), spc(spc) {}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
} // namespace margelo::nitro::video
|
|
48
|
+
|
|
49
|
+
namespace margelo::nitro {
|
|
50
|
+
|
|
51
|
+
// C++ OnGetLicensePayload <> JS OnGetLicensePayload (object)
|
|
52
|
+
template <>
|
|
53
|
+
struct JSIConverter<margelo::nitro::video::OnGetLicensePayload> final {
|
|
54
|
+
static inline margelo::nitro::video::OnGetLicensePayload fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
56
|
+
return margelo::nitro::video::OnGetLicensePayload(
|
|
57
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "contentId")),
|
|
58
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "licenseUrl")),
|
|
59
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "keyUrl")),
|
|
60
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "spc"))
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::video::OnGetLicensePayload& arg) {
|
|
64
|
+
jsi::Object obj(runtime);
|
|
65
|
+
obj.setProperty(runtime, "contentId", JSIConverter<std::string>::toJSI(runtime, arg.contentId));
|
|
66
|
+
obj.setProperty(runtime, "licenseUrl", JSIConverter<std::string>::toJSI(runtime, arg.licenseUrl));
|
|
67
|
+
obj.setProperty(runtime, "keyUrl", JSIConverter<std::string>::toJSI(runtime, arg.keyUrl));
|
|
68
|
+
obj.setProperty(runtime, "spc", JSIConverter<std::string>::toJSI(runtime, arg.spc));
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
72
|
+
if (!value.isObject()) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
jsi::Object obj = value.getObject(runtime);
|
|
76
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "contentId"))) return false;
|
|
80
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "licenseUrl"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "keyUrl"))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "spc"))) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PlayerTrack.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <optional>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::video {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A struct which can be represented as a JavaScript object (PlayerTrack).
|
|
35
|
+
*/
|
|
36
|
+
struct PlayerTrack {
|
|
37
|
+
public:
|
|
38
|
+
std::string id SWIFT_PRIVATE;
|
|
39
|
+
std::string label SWIFT_PRIVATE;
|
|
40
|
+
std::optional<std::string> language SWIFT_PRIVATE;
|
|
41
|
+
bool selected SWIFT_PRIVATE;
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
PlayerTrack() = default;
|
|
45
|
+
explicit PlayerTrack(std::string id, std::string label, std::optional<std::string> language, bool selected): id(id), label(label), language(language), selected(selected) {}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
} // namespace margelo::nitro::video
|
|
49
|
+
|
|
50
|
+
namespace margelo::nitro {
|
|
51
|
+
|
|
52
|
+
// C++ PlayerTrack <> JS PlayerTrack (object)
|
|
53
|
+
template <>
|
|
54
|
+
struct JSIConverter<margelo::nitro::video::PlayerTrack> final {
|
|
55
|
+
static inline margelo::nitro::video::PlayerTrack fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
57
|
+
return margelo::nitro::video::PlayerTrack(
|
|
58
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
59
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "label")),
|
|
60
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "language")),
|
|
61
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "selected"))
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::video::PlayerTrack& arg) {
|
|
65
|
+
jsi::Object obj(runtime);
|
|
66
|
+
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
67
|
+
obj.setProperty(runtime, "label", JSIConverter<std::string>::toJSI(runtime, arg.label));
|
|
68
|
+
obj.setProperty(runtime, "language", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.language));
|
|
69
|
+
obj.setProperty(runtime, "selected", JSIConverter<bool>::toJSI(runtime, arg.selected));
|
|
70
|
+
return obj;
|
|
71
|
+
}
|
|
72
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
73
|
+
if (!value.isObject()) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
jsi::Object obj = value.getObject(runtime);
|
|
77
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "label"))) return false;
|
|
82
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "language"))) return false;
|
|
83
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "selected"))) return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
} // namespace margelo::nitro
|