@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,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_TimedMetadata.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "TimedMetadata.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JTimedMetadata.hpp"
|
|
17
|
+
#include "TimedMetadataObject.hpp"
|
|
18
|
+
#include <vector>
|
|
19
|
+
#include "JTimedMetadataObject.hpp"
|
|
20
|
+
#include <string>
|
|
21
|
+
|
|
22
|
+
namespace margelo::nitro::video {
|
|
23
|
+
|
|
24
|
+
using namespace facebook;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents the Java/Kotlin callback `(data: TimedMetadata) -> Unit`.
|
|
28
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
29
|
+
*/
|
|
30
|
+
struct JFunc_void_TimedMetadata: public jni::JavaClass<JFunc_void_TimedMetadata> {
|
|
31
|
+
public:
|
|
32
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_TimedMetadata;";
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
/**
|
|
36
|
+
* Invokes the function this `JFunc_void_TimedMetadata` instance holds through JNI.
|
|
37
|
+
*/
|
|
38
|
+
void invoke(const TimedMetadata& data) const {
|
|
39
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JTimedMetadata> /* data */)>("invoke");
|
|
40
|
+
method(self(), JTimedMetadata::fromCpp(data));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* An implementation of Func_void_TimedMetadata that is backed by a C++ implementation (using `std::function<...>`)
|
|
46
|
+
*/
|
|
47
|
+
class JFunc_void_TimedMetadata_cxx final: public jni::HybridClass<JFunc_void_TimedMetadata_cxx, JFunc_void_TimedMetadata> {
|
|
48
|
+
public:
|
|
49
|
+
static jni::local_ref<JFunc_void_TimedMetadata::javaobject> fromCpp(const std::function<void(const TimedMetadata& /* data */)>& func) {
|
|
50
|
+
return JFunc_void_TimedMetadata_cxx::newObjectCxxArgs(func);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public:
|
|
54
|
+
/**
|
|
55
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_TimedMetadata_cxx` instance holds.
|
|
56
|
+
*/
|
|
57
|
+
void invoke_cxx(jni::alias_ref<JTimedMetadata> data) {
|
|
58
|
+
_func(data->toCpp());
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
[[nodiscard]]
|
|
63
|
+
inline const std::function<void(const TimedMetadata& /* data */)>& getFunction() const {
|
|
64
|
+
return _func;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_TimedMetadata_cxx;";
|
|
69
|
+
static void registerNatives() {
|
|
70
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_TimedMetadata_cxx::invoke_cxx)});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private:
|
|
74
|
+
explicit JFunc_void_TimedMetadata_cxx(const std::function<void(const TimedMetadata& /* data */)>& func): _func(func) { }
|
|
75
|
+
|
|
76
|
+
private:
|
|
77
|
+
friend HybridBase;
|
|
78
|
+
std::function<void(const TimedMetadata& /* data */)> _func;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_VideoPlayerStatus.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "VideoPlayerStatus.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JVideoPlayerStatus.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::video {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the Java/Kotlin callback `(status: VideoPlayerStatus) -> Unit`.
|
|
24
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
25
|
+
*/
|
|
26
|
+
struct JFunc_void_VideoPlayerStatus: public jni::JavaClass<JFunc_void_VideoPlayerStatus> {
|
|
27
|
+
public:
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_VideoPlayerStatus;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Invokes the function this `JFunc_void_VideoPlayerStatus` instance holds through JNI.
|
|
33
|
+
*/
|
|
34
|
+
void invoke(VideoPlayerStatus status) const {
|
|
35
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JVideoPlayerStatus> /* status */)>("invoke");
|
|
36
|
+
method(self(), JVideoPlayerStatus::fromCpp(status));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An implementation of Func_void_VideoPlayerStatus that is backed by a C++ implementation (using `std::function<...>`)
|
|
42
|
+
*/
|
|
43
|
+
class JFunc_void_VideoPlayerStatus_cxx final: public jni::HybridClass<JFunc_void_VideoPlayerStatus_cxx, JFunc_void_VideoPlayerStatus> {
|
|
44
|
+
public:
|
|
45
|
+
static jni::local_ref<JFunc_void_VideoPlayerStatus::javaobject> fromCpp(const std::function<void(VideoPlayerStatus /* status */)>& func) {
|
|
46
|
+
return JFunc_void_VideoPlayerStatus_cxx::newObjectCxxArgs(func);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_VideoPlayerStatus_cxx` instance holds.
|
|
52
|
+
*/
|
|
53
|
+
void invoke_cxx(jni::alias_ref<JVideoPlayerStatus> status) {
|
|
54
|
+
_func(status->toCpp());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
[[nodiscard]]
|
|
59
|
+
inline const std::function<void(VideoPlayerStatus /* status */)>& getFunction() const {
|
|
60
|
+
return _func;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_VideoPlayerStatus_cxx;";
|
|
65
|
+
static void registerNatives() {
|
|
66
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_VideoPlayerStatus_cxx::invoke_cxx)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
explicit JFunc_void_VideoPlayerStatus_cxx(const std::function<void(VideoPlayerStatus /* status */)>& func): _func(func) { }
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend HybridBase;
|
|
74
|
+
std::function<void(VideoPlayerStatus /* status */)> _func;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_bool.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <functional>
|
|
14
|
+
#include <NitroModules/JNICallable.hpp>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::video {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents the Java/Kotlin callback `(isInPictureInPicture: Boolean) -> Unit`.
|
|
22
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
23
|
+
*/
|
|
24
|
+
struct JFunc_void_bool: public jni::JavaClass<JFunc_void_bool> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_bool;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Invokes the function this `JFunc_void_bool` instance holds through JNI.
|
|
31
|
+
*/
|
|
32
|
+
void invoke(bool isInPictureInPicture) const {
|
|
33
|
+
static const auto method = javaClassStatic()->getMethod<void(jboolean /* isInPictureInPicture */)>("invoke");
|
|
34
|
+
method(self(), isInPictureInPicture);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An implementation of Func_void_bool that is backed by a C++ implementation (using `std::function<...>`)
|
|
40
|
+
*/
|
|
41
|
+
class JFunc_void_bool_cxx final: public jni::HybridClass<JFunc_void_bool_cxx, JFunc_void_bool> {
|
|
42
|
+
public:
|
|
43
|
+
static jni::local_ref<JFunc_void_bool::javaobject> fromCpp(const std::function<void(bool /* isInPictureInPicture */)>& func) {
|
|
44
|
+
return JFunc_void_bool_cxx::newObjectCxxArgs(func);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_bool_cxx` instance holds.
|
|
50
|
+
*/
|
|
51
|
+
void invoke_cxx(jboolean isInPictureInPicture) {
|
|
52
|
+
_func(static_cast<bool>(isInPictureInPicture));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
[[nodiscard]]
|
|
57
|
+
inline const std::function<void(bool /* isInPictureInPicture */)>& getFunction() const {
|
|
58
|
+
return _func;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_bool_cxx;";
|
|
63
|
+
static void registerNatives() {
|
|
64
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_bool_cxx::invoke_cxx)});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private:
|
|
68
|
+
explicit JFunc_void_bool_cxx(const std::function<void(bool /* isInPictureInPicture */)>& func): _func(func) { }
|
|
69
|
+
|
|
70
|
+
private:
|
|
71
|
+
friend HybridBase;
|
|
72
|
+
std::function<void(bool /* isInPictureInPicture */)> _func;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_double.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <functional>
|
|
14
|
+
#include <NitroModules/JNICallable.hpp>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::video {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents the Java/Kotlin callback `(rate: Double) -> Unit`.
|
|
22
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
23
|
+
*/
|
|
24
|
+
struct JFunc_void_double: public jni::JavaClass<JFunc_void_double> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_double;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Invokes the function this `JFunc_void_double` instance holds through JNI.
|
|
31
|
+
*/
|
|
32
|
+
void invoke(double rate) const {
|
|
33
|
+
static const auto method = javaClassStatic()->getMethod<void(double /* rate */)>("invoke");
|
|
34
|
+
method(self(), rate);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An implementation of Func_void_double that is backed by a C++ implementation (using `std::function<...>`)
|
|
40
|
+
*/
|
|
41
|
+
class JFunc_void_double_cxx final: public jni::HybridClass<JFunc_void_double_cxx, JFunc_void_double> {
|
|
42
|
+
public:
|
|
43
|
+
static jni::local_ref<JFunc_void_double::javaobject> fromCpp(const std::function<void(double /* rate */)>& func) {
|
|
44
|
+
return JFunc_void_double_cxx::newObjectCxxArgs(func);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_double_cxx` instance holds.
|
|
50
|
+
*/
|
|
51
|
+
void invoke_cxx(double rate) {
|
|
52
|
+
_func(rate);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
[[nodiscard]]
|
|
57
|
+
inline const std::function<void(double /* rate */)>& getFunction() const {
|
|
58
|
+
return _func;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_double_cxx;";
|
|
63
|
+
static void registerNatives() {
|
|
64
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_double_cxx::invoke_cxx)});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private:
|
|
68
|
+
explicit JFunc_void_double_cxx(const std::function<void(double /* rate */)>& func): _func(func) { }
|
|
69
|
+
|
|
70
|
+
private:
|
|
71
|
+
friend HybridBase;
|
|
72
|
+
std::function<void(double /* rate */)> _func;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_onLoadData.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "onLoadData.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JonLoadData.hpp"
|
|
17
|
+
#include "VideoOrientation.hpp"
|
|
18
|
+
#include "JVideoOrientation.hpp"
|
|
19
|
+
#include "AllPlayerTracks.hpp"
|
|
20
|
+
#include "JAllPlayerTracks.hpp"
|
|
21
|
+
#include "PlayerTrack.hpp"
|
|
22
|
+
#include <vector>
|
|
23
|
+
#include "JPlayerTrack.hpp"
|
|
24
|
+
#include <string>
|
|
25
|
+
#include <optional>
|
|
26
|
+
#include "VideoPlayerTrack.hpp"
|
|
27
|
+
#include "JVideoPlayerTrack.hpp"
|
|
28
|
+
|
|
29
|
+
namespace margelo::nitro::video {
|
|
30
|
+
|
|
31
|
+
using namespace facebook;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Represents the Java/Kotlin callback `(data: onLoadData) -> Unit`.
|
|
35
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
36
|
+
*/
|
|
37
|
+
struct JFunc_void_onLoadData: public jni::JavaClass<JFunc_void_onLoadData> {
|
|
38
|
+
public:
|
|
39
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onLoadData;";
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
/**
|
|
43
|
+
* Invokes the function this `JFunc_void_onLoadData` instance holds through JNI.
|
|
44
|
+
*/
|
|
45
|
+
void invoke(const onLoadData& data) const {
|
|
46
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JonLoadData> /* data */)>("invoke");
|
|
47
|
+
method(self(), JonLoadData::fromCpp(data));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* An implementation of Func_void_onLoadData that is backed by a C++ implementation (using `std::function<...>`)
|
|
53
|
+
*/
|
|
54
|
+
class JFunc_void_onLoadData_cxx final: public jni::HybridClass<JFunc_void_onLoadData_cxx, JFunc_void_onLoadData> {
|
|
55
|
+
public:
|
|
56
|
+
static jni::local_ref<JFunc_void_onLoadData::javaobject> fromCpp(const std::function<void(const onLoadData& /* data */)>& func) {
|
|
57
|
+
return JFunc_void_onLoadData_cxx::newObjectCxxArgs(func);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
/**
|
|
62
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_onLoadData_cxx` instance holds.
|
|
63
|
+
*/
|
|
64
|
+
void invoke_cxx(jni::alias_ref<JonLoadData> data) {
|
|
65
|
+
_func(data->toCpp());
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public:
|
|
69
|
+
[[nodiscard]]
|
|
70
|
+
inline const std::function<void(const onLoadData& /* data */)>& getFunction() const {
|
|
71
|
+
return _func;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public:
|
|
75
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onLoadData_cxx;";
|
|
76
|
+
static void registerNatives() {
|
|
77
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_onLoadData_cxx::invoke_cxx)});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private:
|
|
81
|
+
explicit JFunc_void_onLoadData_cxx(const std::function<void(const onLoadData& /* data */)>& func): _func(func) { }
|
|
82
|
+
|
|
83
|
+
private:
|
|
84
|
+
friend HybridBase;
|
|
85
|
+
std::function<void(const onLoadData& /* data */)> _func;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_onLoadStartData.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "onLoadStartData.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JonLoadStartData.hpp"
|
|
17
|
+
#include "SourceType.hpp"
|
|
18
|
+
#include "JSourceType.hpp"
|
|
19
|
+
#include <memory>
|
|
20
|
+
#include "HybridVideoPlayerSourceSpec.hpp"
|
|
21
|
+
#include "JHybridVideoPlayerSourceSpec.hpp"
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::video {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Represents the Java/Kotlin callback `(data: onLoadStartData) -> Unit`.
|
|
29
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
30
|
+
*/
|
|
31
|
+
struct JFunc_void_onLoadStartData: public jni::JavaClass<JFunc_void_onLoadStartData> {
|
|
32
|
+
public:
|
|
33
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onLoadStartData;";
|
|
34
|
+
|
|
35
|
+
public:
|
|
36
|
+
/**
|
|
37
|
+
* Invokes the function this `JFunc_void_onLoadStartData` instance holds through JNI.
|
|
38
|
+
*/
|
|
39
|
+
void invoke(const onLoadStartData& data) const {
|
|
40
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JonLoadStartData> /* data */)>("invoke");
|
|
41
|
+
method(self(), JonLoadStartData::fromCpp(data));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* An implementation of Func_void_onLoadStartData that is backed by a C++ implementation (using `std::function<...>`)
|
|
47
|
+
*/
|
|
48
|
+
class JFunc_void_onLoadStartData_cxx final: public jni::HybridClass<JFunc_void_onLoadStartData_cxx, JFunc_void_onLoadStartData> {
|
|
49
|
+
public:
|
|
50
|
+
static jni::local_ref<JFunc_void_onLoadStartData::javaobject> fromCpp(const std::function<void(const onLoadStartData& /* data */)>& func) {
|
|
51
|
+
return JFunc_void_onLoadStartData_cxx::newObjectCxxArgs(func);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
/**
|
|
56
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_onLoadStartData_cxx` instance holds.
|
|
57
|
+
*/
|
|
58
|
+
void invoke_cxx(jni::alias_ref<JonLoadStartData> data) {
|
|
59
|
+
_func(data->toCpp());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
[[nodiscard]]
|
|
64
|
+
inline const std::function<void(const onLoadStartData& /* data */)>& getFunction() const {
|
|
65
|
+
return _func;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public:
|
|
69
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onLoadStartData_cxx;";
|
|
70
|
+
static void registerNatives() {
|
|
71
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_onLoadStartData_cxx::invoke_cxx)});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private:
|
|
75
|
+
explicit JFunc_void_onLoadStartData_cxx(const std::function<void(const onLoadStartData& /* data */)>& func): _func(func) { }
|
|
76
|
+
|
|
77
|
+
private:
|
|
78
|
+
friend HybridBase;
|
|
79
|
+
std::function<void(const onLoadStartData& /* data */)> _func;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_onPlaybackStateChangeData.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "onPlaybackStateChangeData.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JonPlaybackStateChangeData.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::video {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the Java/Kotlin callback `(data: onPlaybackStateChangeData) -> Unit`.
|
|
24
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
25
|
+
*/
|
|
26
|
+
struct JFunc_void_onPlaybackStateChangeData: public jni::JavaClass<JFunc_void_onPlaybackStateChangeData> {
|
|
27
|
+
public:
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onPlaybackStateChangeData;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Invokes the function this `JFunc_void_onPlaybackStateChangeData` instance holds through JNI.
|
|
33
|
+
*/
|
|
34
|
+
void invoke(const onPlaybackStateChangeData& data) const {
|
|
35
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JonPlaybackStateChangeData> /* data */)>("invoke");
|
|
36
|
+
method(self(), JonPlaybackStateChangeData::fromCpp(data));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An implementation of Func_void_onPlaybackStateChangeData that is backed by a C++ implementation (using `std::function<...>`)
|
|
42
|
+
*/
|
|
43
|
+
class JFunc_void_onPlaybackStateChangeData_cxx final: public jni::HybridClass<JFunc_void_onPlaybackStateChangeData_cxx, JFunc_void_onPlaybackStateChangeData> {
|
|
44
|
+
public:
|
|
45
|
+
static jni::local_ref<JFunc_void_onPlaybackStateChangeData::javaobject> fromCpp(const std::function<void(const onPlaybackStateChangeData& /* data */)>& func) {
|
|
46
|
+
return JFunc_void_onPlaybackStateChangeData_cxx::newObjectCxxArgs(func);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_onPlaybackStateChangeData_cxx` instance holds.
|
|
52
|
+
*/
|
|
53
|
+
void invoke_cxx(jni::alias_ref<JonPlaybackStateChangeData> data) {
|
|
54
|
+
_func(data->toCpp());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
[[nodiscard]]
|
|
59
|
+
inline const std::function<void(const onPlaybackStateChangeData& /* data */)>& getFunction() const {
|
|
60
|
+
return _func;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onPlaybackStateChangeData_cxx;";
|
|
65
|
+
static void registerNatives() {
|
|
66
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_onPlaybackStateChangeData_cxx::invoke_cxx)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
explicit JFunc_void_onPlaybackStateChangeData_cxx(const std::function<void(const onPlaybackStateChangeData& /* data */)>& func): _func(func) { }
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend HybridBase;
|
|
74
|
+
std::function<void(const onPlaybackStateChangeData& /* data */)> _func;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::video
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_onProgressData.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "onProgressData.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JonProgressData.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::video {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the Java/Kotlin callback `(data: onProgressData) -> Unit`.
|
|
24
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
25
|
+
*/
|
|
26
|
+
struct JFunc_void_onProgressData: public jni::JavaClass<JFunc_void_onProgressData> {
|
|
27
|
+
public:
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onProgressData;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Invokes the function this `JFunc_void_onProgressData` instance holds through JNI.
|
|
33
|
+
*/
|
|
34
|
+
void invoke(const onProgressData& data) const {
|
|
35
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JonProgressData> /* data */)>("invoke");
|
|
36
|
+
method(self(), JonProgressData::fromCpp(data));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An implementation of Func_void_onProgressData that is backed by a C++ implementation (using `std::function<...>`)
|
|
42
|
+
*/
|
|
43
|
+
class JFunc_void_onProgressData_cxx final: public jni::HybridClass<JFunc_void_onProgressData_cxx, JFunc_void_onProgressData> {
|
|
44
|
+
public:
|
|
45
|
+
static jni::local_ref<JFunc_void_onProgressData::javaobject> fromCpp(const std::function<void(const onProgressData& /* data */)>& func) {
|
|
46
|
+
return JFunc_void_onProgressData_cxx::newObjectCxxArgs(func);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_onProgressData_cxx` instance holds.
|
|
52
|
+
*/
|
|
53
|
+
void invoke_cxx(jni::alias_ref<JonProgressData> data) {
|
|
54
|
+
_func(data->toCpp());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
[[nodiscard]]
|
|
59
|
+
inline const std::function<void(const onProgressData& /* data */)>& getFunction() const {
|
|
60
|
+
return _func;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/video/Func_void_onProgressData_cxx;";
|
|
65
|
+
static void registerNatives() {
|
|
66
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_onProgressData_cxx::invoke_cxx)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
explicit JFunc_void_onProgressData_cxx(const std::function<void(const onProgressData& /* data */)>& func): _func(func) { }
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend HybridBase;
|
|
74
|
+
std::function<void(const onProgressData& /* data */)> _func;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::video
|