spactureai-mobile-player 1.0.30
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 +474 -0
- package/UnifiedPlayer.podspec +51 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +249 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +15 -0
- package/android/src/main/AndroidManifest.xml +10 -0
- package/android/src/main/AndroidManifestNew.xml +9 -0
- package/android/src/main/cpp/cpp-adapter.cpp +9 -0
- package/android/src/main/java/com/unifiedplayer/core/AudioFocusManager.kt +233 -0
- package/android/src/main/java/com/unifiedplayer/core/VideoError.kt +105 -0
- package/android/src/main/java/com/unifiedplayer/core/VideoManager.kt +292 -0
- package/android/src/main/java/com/unifiedplayer/core/extensions/ResizeMode+AspectRatioFrameLayout.kt +20 -0
- package/android/src/main/java/com/unifiedplayer/core/extensions/SubtitleType+toString.kt +14 -0
- package/android/src/main/java/com/unifiedplayer/core/extensions/VideoPlaybackService+ServiceManagment.kt +59 -0
- package/android/src/main/java/com/unifiedplayer/core/fragments/FullscreenVideoFragment.kt +346 -0
- package/android/src/main/java/com/unifiedplayer/core/fragments/PictureInPictureHelperFragment.kt +85 -0
- package/android/src/main/java/com/unifiedplayer/core/player/DRMManagerSpec.kt +23 -0
- package/android/src/main/java/com/unifiedplayer/core/player/DataSourceFactoryUtils.kt +93 -0
- package/android/src/main/java/com/unifiedplayer/core/player/MediaItemUtils.kt +141 -0
- package/android/src/main/java/com/unifiedplayer/core/player/MediaSourceUtils.kt +134 -0
- package/android/src/main/java/com/unifiedplayer/core/player/OnAudioFocusChangedListener.kt +25 -0
- package/android/src/main/java/com/unifiedplayer/core/plugins/PluginsRegistry.kt +223 -0
- package/android/src/main/java/com/unifiedplayer/core/plugins/ReactNativeVideoPlugin.kt +173 -0
- package/android/src/main/java/com/unifiedplayer/core/recivers/AudioBecomingNoisyReceiver.kt +38 -0
- package/android/src/main/java/com/unifiedplayer/core/services/playback/CustomMediaNotificationProvider.kt +151 -0
- package/android/src/main/java/com/unifiedplayer/core/services/playback/VideoPlaybackCallback.kt +96 -0
- package/android/src/main/java/com/unifiedplayer/core/services/playback/VideoPlaybackService.kt +219 -0
- package/android/src/main/java/com/unifiedplayer/core/services/playback/VideoPlaybackServiceConnection.kt +59 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/PictureInPictureUtils.kt +153 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/SmallVideoPlayerOptimizer.kt +157 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/SourceLoader.kt +48 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/TextTrackUtils.kt +175 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/Threading.kt +75 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/VideoFileHelper.kt +51 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/VideoInformationUtils.kt +67 -0
- package/android/src/main/java/com/unifiedplayer/core/utils/VideoOrientationUtils.kt +30 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoplayer/HybridVideoPlayer.kt +732 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoplayer/HybridVideoPlayerFactory.kt +16 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoplayereventemitter/HybridVideoPlayerEventEmitter.kt +180 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoplayersource/HybridVideoPlayerSource.kt +67 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoplayersource/HybridVideoPlayerSourceFactory.kt +58 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoviewviewmanager/HybridVideoViewViewManager.kt +187 -0
- package/android/src/main/java/com/unifiedplayer/hybrids/videoviewviewmanager/HybridVideoViewViewManagerFactory.kt +13 -0
- package/android/src/main/java/com/unifiedplayer/react/VideoPackage.kt +25 -0
- package/android/src/main/java/com/unifiedplayer/react/VideoViewViewManager.kt +78 -0
- package/android/src/main/java/com/unifiedplayer/view/VideoView.kt +565 -0
- package/android/src/main/res/layout/custom_player_control_view.xml +82 -0
- package/android/src/main/res/layout/player_view_surface.xml +13 -0
- package/android/src/main/res/layout/player_view_texture.xml +13 -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/ios/RNCVideoViewManager.mm +39 -0
- package/ios/Video-Bridging-Header.h +2 -0
- package/ios/core/HLSAuthProxy.swift +428 -0
- package/ios/core/VideoError.swift +164 -0
- package/ios/core/VideoManager.swift +219 -0
- package/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift +697 -0
- package/ios/hybrids/VideoPlayer/HybridVideoPlayerFactory.swift +15 -0
- package/ios/hybrids/VideoPlayer/VLCPlaybackDelegates.swift +58 -0
- package/ios/hybrids/VideoPlayerEmitter/HybridVideoPlayerEventEmitter.swift +203 -0
- package/ios/hybrids/VideoPlayerSource/HybridVideoPlayerSource.swift +55 -0
- package/ios/hybrids/VideoPlayerSource/HybridVideoPlayerSourceFactory.swift +29 -0
- package/ios/hybrids/VideoViewViewManager/HybridVideoViewViewManager.swift +266 -0
- package/ios/hybrids/VideoViewViewManager/HybridVideoViewViewManagerFactory.swift +14 -0
- package/ios/view/VideoComponentView.swift +196 -0
- package/ios/view/VideoComponentViewObserver.swift +48 -0
- package/lib/module/core/VideoPlayer.js +287 -0
- package/lib/module/core/VideoPlayer.js.map +1 -0
- package/lib/module/core/VideoPlayerEvents.js +84 -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/ResizeMode.js +2 -0
- package/lib/module/core/types/ResizeMode.js.map +1 -0
- package/lib/module/core/types/TextTrack.js +2 -0
- package/lib/module/core/types/TextTrack.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.tsx +18 -0
- package/lib/module/core/video-view/VideoView.js +261 -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 +8 -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/drm-plugin/src/PluginManager.nitro.d.ts +10 -0
- package/lib/typescript/drm-plugin/src/PluginManager.nitro.d.ts.map +1 -0
- package/lib/typescript/drm-plugin/src/index.d.ts +4 -0
- package/lib/typescript/drm-plugin/src/index.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/core/VideoPlayer.d.ts +88 -0
- package/lib/typescript/src/core/VideoPlayer.d.ts.map +1 -0
- package/lib/typescript/src/core/VideoPlayerEvents.d.ts +22 -0
- package/lib/typescript/src/core/VideoPlayerEvents.d.ts.map +1 -0
- package/lib/typescript/src/core/hooks/useEvent.d.ts +11 -0
- package/lib/typescript/src/core/hooks/useEvent.d.ts.map +1 -0
- package/lib/typescript/src/core/hooks/useManagedInstance.d.ts +19 -0
- package/lib/typescript/src/core/hooks/useManagedInstance.d.ts.map +1 -0
- package/lib/typescript/src/core/hooks/useVideoPlayer.d.ts +16 -0
- package/lib/typescript/src/core/hooks/useVideoPlayer.d.ts.map +1 -0
- package/lib/typescript/src/core/types/BufferConfig.d.ts +97 -0
- package/lib/typescript/src/core/types/BufferConfig.d.ts.map +1 -0
- package/lib/typescript/src/core/types/DrmParams.d.ts +64 -0
- package/lib/typescript/src/core/types/DrmParams.d.ts.map +1 -0
- package/lib/typescript/src/core/types/Events.d.ts +224 -0
- package/lib/typescript/src/core/types/Events.d.ts.map +1 -0
- package/lib/typescript/src/core/types/IgnoreSilentSwitchMode.d.ts +2 -0
- package/lib/typescript/src/core/types/IgnoreSilentSwitchMode.d.ts.map +1 -0
- package/lib/typescript/src/core/types/MixAudioMode.d.ts +2 -0
- package/lib/typescript/src/core/types/MixAudioMode.d.ts.map +1 -0
- package/lib/typescript/src/core/types/ResizeMode.d.ts +10 -0
- package/lib/typescript/src/core/types/ResizeMode.d.ts.map +1 -0
- package/lib/typescript/src/core/types/TextTrack.d.ts +20 -0
- package/lib/typescript/src/core/types/TextTrack.d.ts.map +1 -0
- package/lib/typescript/src/core/types/Utils.d.ts +2 -0
- package/lib/typescript/src/core/types/Utils.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoConfig.d.ts +138 -0
- package/lib/typescript/src/core/types/VideoConfig.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoError.d.ts +31 -0
- package/lib/typescript/src/core/types/VideoError.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoInformation.d.ts +38 -0
- package/lib/typescript/src/core/types/VideoInformation.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoOrientation.d.ts +2 -0
- package/lib/typescript/src/core/types/VideoOrientation.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoPlayerBase.d.ts +155 -0
- package/lib/typescript/src/core/types/VideoPlayerBase.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoPlayerSourceBase.d.ts +17 -0
- package/lib/typescript/src/core/types/VideoPlayerSourceBase.d.ts.map +1 -0
- package/lib/typescript/src/core/types/VideoPlayerStatus.d.ts +9 -0
- package/lib/typescript/src/core/types/VideoPlayerStatus.d.ts.map +1 -0
- package/lib/typescript/src/core/utils/playerFactory.d.ts +12 -0
- package/lib/typescript/src/core/utils/playerFactory.d.ts.map +1 -0
- package/lib/typescript/src/core/utils/sourceFactory.d.ts +29 -0
- package/lib/typescript/src/core/utils/sourceFactory.d.ts.map +1 -0
- package/lib/typescript/src/core/video-view/NativeVideoView.d.ts +2 -0
- package/lib/typescript/src/core/video-view/NativeVideoView.d.ts.map +1 -0
- package/lib/typescript/src/core/video-view/VideoView.d.ts +104 -0
- package/lib/typescript/src/core/video-view/VideoView.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +13 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/spec/fabric/VideoViewNativeComponent.d.ts +13 -0
- package/lib/typescript/src/spec/fabric/VideoViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/spec/nitro/VideoPlayer.nitro.d.ts +55 -0
- package/lib/typescript/src/spec/nitro/VideoPlayer.nitro.d.ts.map +1 -0
- package/lib/typescript/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts +150 -0
- package/lib/typescript/src/spec/nitro/VideoPlayerEventEmitter.nitro.d.ts.map +1 -0
- package/lib/typescript/src/spec/nitro/VideoPlayerSource.nitro.d.ts +21 -0
- package/lib/typescript/src/spec/nitro/VideoPlayerSource.nitro.d.ts.map +1 -0
- package/lib/typescript/src/spec/nitro/VideoViewViewManager.nitro.d.ts +75 -0
- package/lib/typescript/src/spec/nitro/VideoViewViewManager.nitro.d.ts.map +1 -0
- package/nitro.json +47 -0
- package/nitrogen/generated/android/UnifiedPlayer+autolinking.cmake +95 -0
- package/nitrogen/generated/android/UnifiedPlayer+autolinking.gradle +27 -0
- package/nitrogen/generated/android/UnifiedPlayerOnLoad.cpp +122 -0
- package/nitrogen/generated/android/UnifiedPlayerOnLoad.hpp +34 -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++/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 +79 -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__optional_std__variant_nitro__NullType__TextTrack__.hpp +83 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp +95 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp +224 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp +82 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp +60 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp +106 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp +124 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp +300 -0
- package/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp +98 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp +56 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp +185 -0
- package/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp +87 -0
- package/nitrogen/generated/android/c++/JIgnoreSilentSwitchMode.hpp +61 -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 +64 -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 +136 -0
- package/nitrogen/generated/android/c++/JOnGetLicensePayload.hpp +69 -0
- package/nitrogen/generated/android/c++/JResizeMode.hpp +64 -0
- package/nitrogen/generated/android/c++/JResolution.hpp +61 -0
- package/nitrogen/generated/android/c++/JSourceType.hpp +58 -0
- package/nitrogen/generated/android/c++/JSubtitleType.hpp +67 -0
- package/nitrogen/generated/android/c++/JSurfaceType.hpp +58 -0
- package/nitrogen/generated/android/c++/JTextTrack.hpp +70 -0
- package/nitrogen/generated/android/c++/JTimedMetadata.hpp +78 -0
- package/nitrogen/generated/android/c++/JTimedMetadataObject.hpp +61 -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++/JVariant_NullType_TextTrack.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_TextTrack.hpp +73 -0
- package/nitrogen/generated/android/c++/JVideoInformation.hpp +86 -0
- package/nitrogen/generated/android/c++/JVideoOrientation.hpp +73 -0
- package/nitrogen/generated/android/c++/JVideoPlayerStatus.hpp +64 -0
- package/nitrogen/generated/android/c++/JonLoadData.hpp +74 -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/unifiedplayer/BandwidthData.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/BufferConfig.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/CustomVideoMetadata.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_BandwidthData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_TimedMetadata.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_VideoPlayerStatus.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_double.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onLoadData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onLoadStartData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onPlaybackStateChangeData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onProgressData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_onVolumeChangeData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_std__optional_std__variant_nitro__NullType__TextTrack__.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Func_void_std__vector_std__string_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerEventEmitterSpec.kt +226 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerFactorySpec.kt +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerSourceFactorySpec.kt +58 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerSourceSpec.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoPlayerSpec.kt +178 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoViewViewManagerFactorySpec.kt +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/HybridVideoViewViewManagerSpec.kt +168 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/IgnoreSilentSwitchMode.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/ListenerSubscription.kt +55 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/LivePlaybackParams.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/MixAudioMode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/NativeDrmParams.kt +85 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/NativeExternalSubtitle.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/NativeVideoConfig.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/OnGetLicensePayload.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/ResizeMode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Resolution.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/SourceType.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/SubtitleType.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/SurfaceType.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/TextTrack.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/TimedMetadata.kt +51 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/TimedMetadataObject.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/UnifiedPlayerOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Variant_NullType_HybridVideoPlayerSourceSpec.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/Variant_NullType_TextTrack.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/VideoInformation.kt +86 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/VideoOrientation.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/VideoPlayerStatus.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onLoadData.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onLoadStartData.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onPlaybackStateChangeData.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onProgressData.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unifiedplayer/onVolumeChangeData.kt +56 -0
- package/nitrogen/generated/ios/UnifiedPlayer+autolinking.rb +62 -0
- package/nitrogen/generated/ios/UnifiedPlayer-Swift-Cxx-Bridge.cpp +280 -0
- package/nitrogen/generated/ios/UnifiedPlayer-Swift-Cxx-Bridge.hpp +1106 -0
- package/nitrogen/generated/ios/UnifiedPlayer-Swift-Cxx-Umbrella.hpp +162 -0
- package/nitrogen/generated/ios/UnifiedPlayerAutolinking.mm +49 -0
- package/nitrogen/generated/ios/UnifiedPlayerAutolinking.swift +50 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp +279 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp +87 -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 +256 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp +84 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp +217 -0
- package/nitrogen/generated/ios/swift/BandwidthData.swift +65 -0
- package/nitrogen/generated/ios/swift/BufferConfig.swift +201 -0
- package/nitrogen/generated/ios/swift/CustomVideoMetadata.swift +114 -0
- package/nitrogen/generated/ios/swift/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.swift +61 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_onLoadData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_onProgressData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__variant_nitro__NullType__TextTrack__.swift +65 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_Promise_std__string__.swift +66 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift +74 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift +479 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift +145 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift +156 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift +157 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift +80 -0
- package/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift +490 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift +141 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift +72 -0
- package/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift +390 -0
- package/nitrogen/generated/ios/swift/IgnoreSilentSwitchMode.swift +44 -0
- package/nitrogen/generated/ios/swift/ListenerSubscription.swift +37 -0
- package/nitrogen/generated/ios/swift/LivePlaybackParams.swift +114 -0
- package/nitrogen/generated/ios/swift/MixAudioMode.swift +48 -0
- package/nitrogen/generated/ios/swift/NativeDrmParams.swift +193 -0
- package/nitrogen/generated/ios/swift/NativeExternalSubtitle.swift +44 -0
- package/nitrogen/generated/ios/swift/NativeVideoConfig.swift +136 -0
- package/nitrogen/generated/ios/swift/OnGetLicensePayload.swift +44 -0
- package/nitrogen/generated/ios/swift/ResizeMode.swift +48 -0
- package/nitrogen/generated/ios/swift/Resolution.swift +34 -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/TextTrack.swift +57 -0
- package/nitrogen/generated/ios/swift/TimedMetadata.swift +35 -0
- package/nitrogen/generated/ios/swift/TimedMetadataObject.swift +34 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_TextTrack.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType__any_HybridVideoPlayerSourceSpec_.swift +30 -0
- package/nitrogen/generated/ios/swift/VideoInformation.swift +64 -0
- package/nitrogen/generated/ios/swift/VideoOrientation.swift +60 -0
- package/nitrogen/generated/ios/swift/VideoPlayerStatus.swift +48 -0
- package/nitrogen/generated/ios/swift/onLoadData.swift +49 -0
- package/nitrogen/generated/ios/swift/onLoadStartData.swift +41 -0
- package/nitrogen/generated/ios/swift/onPlaybackStateChangeData.swift +34 -0
- package/nitrogen/generated/ios/swift/onProgressData.swift +39 -0
- package/nitrogen/generated/ios/swift/onVolumeChangeData.swift +34 -0
- package/nitrogen/generated/shared/c++/BandwidthData.hpp +91 -0
- package/nitrogen/generated/shared/c++/BufferConfig.hpp +128 -0
- package/nitrogen/generated/shared/c++/CustomVideoMetadata.hpp +100 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp +115 -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 +57 -0
- package/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp +120 -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 +83 -0
- package/nitrogen/generated/shared/c++/LivePlaybackParams.hpp +99 -0
- package/nitrogen/generated/shared/c++/MixAudioMode.hpp +84 -0
- package/nitrogen/generated/shared/c++/NativeDrmParams.hpp +113 -0
- package/nitrogen/generated/shared/c++/NativeExternalSubtitle.hpp +97 -0
- package/nitrogen/generated/shared/c++/NativeVideoConfig.hpp +121 -0
- package/nitrogen/generated/shared/c++/OnGetLicensePayload.hpp +95 -0
- package/nitrogen/generated/shared/c++/ResizeMode.hpp +84 -0
- package/nitrogen/generated/shared/c++/Resolution.hpp +87 -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++/TextTrack.hpp +96 -0
- package/nitrogen/generated/shared/c++/TimedMetadata.hpp +85 -0
- package/nitrogen/generated/shared/c++/TimedMetadataObject.hpp +87 -0
- package/nitrogen/generated/shared/c++/VideoInformation.hpp +112 -0
- package/nitrogen/generated/shared/c++/VideoOrientation.hpp +96 -0
- package/nitrogen/generated/shared/c++/VideoPlayerStatus.hpp +84 -0
- package/nitrogen/generated/shared/c++/onLoadData.hpp +100 -0
- package/nitrogen/generated/shared/c++/onLoadStartData.hpp +92 -0
- package/nitrogen/generated/shared/c++/onPlaybackStateChangeData.hpp +87 -0
- package/nitrogen/generated/shared/c++/onProgressData.hpp +91 -0
- package/nitrogen/generated/shared/c++/onVolumeChangeData.hpp +87 -0
- package/package.json +180 -0
- package/react-native.config.js +10 -0
- package/src/core/VideoPlayer.ts +357 -0
- package/src/core/VideoPlayerEvents.ts +146 -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 +283 -0
- package/src/core/types/IgnoreSilentSwitchMode.ts +1 -0
- package/src/core/types/MixAudioMode.ts +1 -0
- package/src/core/types/ResizeMode.ts +9 -0
- package/src/core/types/TextTrack.ts +22 -0
- package/src/core/types/Utils.ts +1 -0
- package/src/core/types/VideoConfig.ts +150 -0
- package/src/core/types/VideoError.ts +174 -0
- package/src/core/types/VideoInformation.ts +45 -0
- package/src/core/types/VideoOrientation.ts +8 -0
- package/src/core/types/VideoPlayerBase.ts +181 -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 +492 -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 +29 -0
- package/src/spec/fabric/VideoViewNativeComponent.ts +17 -0
- package/src/spec/nitro/VideoPlayer.nitro.ts +62 -0
- package/src/spec/nitro/VideoPlayerEventEmitter.nitro.ts +207 -0
- package/src/spec/nitro/VideoPlayerSource.nitro.ts +18 -0
- package/src/spec/nitro/VideoViewViewManager.nitro.ts +92 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVideoInformation.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "VideoInformation.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JVideoOrientation.hpp"
|
|
14
|
+
#include "VideoOrientation.hpp"
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::unifiedplayer {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "VideoInformation" and the the Kotlin data class "VideoInformation".
|
|
22
|
+
*/
|
|
23
|
+
struct JVideoInformation final: public jni::JavaClass<JVideoInformation> {
|
|
24
|
+
public:
|
|
25
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/VideoInformation;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct VideoInformation by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
VideoInformation toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldBitrate = clazz->getField<double>("bitrate");
|
|
36
|
+
double bitrate = this->getFieldValue(fieldBitrate);
|
|
37
|
+
static const auto fieldWidth = clazz->getField<double>("width");
|
|
38
|
+
double width = this->getFieldValue(fieldWidth);
|
|
39
|
+
static const auto fieldHeight = clazz->getField<double>("height");
|
|
40
|
+
double height = this->getFieldValue(fieldHeight);
|
|
41
|
+
static const auto fieldDuration = clazz->getField<int64_t>("duration");
|
|
42
|
+
int64_t duration = this->getFieldValue(fieldDuration);
|
|
43
|
+
static const auto fieldFileSize = clazz->getField<int64_t>("fileSize");
|
|
44
|
+
int64_t fileSize = this->getFieldValue(fieldFileSize);
|
|
45
|
+
static const auto fieldIsHDR = clazz->getField<jboolean>("isHDR");
|
|
46
|
+
jboolean isHDR = this->getFieldValue(fieldIsHDR);
|
|
47
|
+
static const auto fieldIsLive = clazz->getField<jboolean>("isLive");
|
|
48
|
+
jboolean isLive = this->getFieldValue(fieldIsLive);
|
|
49
|
+
static const auto fieldOrientation = clazz->getField<JVideoOrientation>("orientation");
|
|
50
|
+
jni::local_ref<JVideoOrientation> orientation = this->getFieldValue(fieldOrientation);
|
|
51
|
+
return VideoInformation(
|
|
52
|
+
bitrate,
|
|
53
|
+
width,
|
|
54
|
+
height,
|
|
55
|
+
duration,
|
|
56
|
+
fileSize,
|
|
57
|
+
static_cast<bool>(isHDR),
|
|
58
|
+
static_cast<bool>(isLive),
|
|
59
|
+
orientation->toCpp()
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
/**
|
|
65
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
66
|
+
*/
|
|
67
|
+
[[maybe_unused]]
|
|
68
|
+
static jni::local_ref<JVideoInformation::javaobject> fromCpp(const VideoInformation& value) {
|
|
69
|
+
using JSignature = JVideoInformation(double, double, double, int64_t, int64_t, jboolean, jboolean, jni::alias_ref<JVideoOrientation>);
|
|
70
|
+
static const auto clazz = javaClassStatic();
|
|
71
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
72
|
+
return create(
|
|
73
|
+
clazz,
|
|
74
|
+
value.bitrate,
|
|
75
|
+
value.width,
|
|
76
|
+
value.height,
|
|
77
|
+
value.duration,
|
|
78
|
+
value.fileSize,
|
|
79
|
+
value.isHDR,
|
|
80
|
+
value.isLive,
|
|
81
|
+
JVideoOrientation::fromCpp(value.orientation)
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVideoOrientation.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "VideoOrientation.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::unifiedplayer {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "VideoOrientation" and the the Kotlin enum "VideoOrientation".
|
|
19
|
+
*/
|
|
20
|
+
struct JVideoOrientation final: public jni::JavaClass<JVideoOrientation> {
|
|
21
|
+
public:
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/VideoOrientation;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum VideoOrientation.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
VideoOrientation toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<VideoOrientation>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JVideoOrientation> fromCpp(VideoOrientation value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
switch (value) {
|
|
45
|
+
case VideoOrientation::PORTRAIT:
|
|
46
|
+
static const auto fieldPORTRAIT = clazz->getStaticField<JVideoOrientation>("PORTRAIT");
|
|
47
|
+
return clazz->getStaticFieldValue(fieldPORTRAIT);
|
|
48
|
+
case VideoOrientation::LANDSCAPE:
|
|
49
|
+
static const auto fieldLANDSCAPE = clazz->getStaticField<JVideoOrientation>("LANDSCAPE");
|
|
50
|
+
return clazz->getStaticFieldValue(fieldLANDSCAPE);
|
|
51
|
+
case VideoOrientation::PORTRAIT_UPSIDE_DOWN:
|
|
52
|
+
static const auto fieldPORTRAIT_UPSIDE_DOWN = clazz->getStaticField<JVideoOrientation>("PORTRAIT_UPSIDE_DOWN");
|
|
53
|
+
return clazz->getStaticFieldValue(fieldPORTRAIT_UPSIDE_DOWN);
|
|
54
|
+
case VideoOrientation::LANDSCAPE_LEFT:
|
|
55
|
+
static const auto fieldLANDSCAPE_LEFT = clazz->getStaticField<JVideoOrientation>("LANDSCAPE_LEFT");
|
|
56
|
+
return clazz->getStaticFieldValue(fieldLANDSCAPE_LEFT);
|
|
57
|
+
case VideoOrientation::LANDSCAPE_RIGHT:
|
|
58
|
+
static const auto fieldLANDSCAPE_RIGHT = clazz->getStaticField<JVideoOrientation>("LANDSCAPE_RIGHT");
|
|
59
|
+
return clazz->getStaticFieldValue(fieldLANDSCAPE_RIGHT);
|
|
60
|
+
case VideoOrientation::SQUARE:
|
|
61
|
+
static const auto fieldSQUARE = clazz->getStaticField<JVideoOrientation>("SQUARE");
|
|
62
|
+
return clazz->getStaticFieldValue(fieldSQUARE);
|
|
63
|
+
case VideoOrientation::UNKNOWN:
|
|
64
|
+
static const auto fieldUNKNOWN = clazz->getStaticField<JVideoOrientation>("UNKNOWN");
|
|
65
|
+
return clazz->getStaticFieldValue(fieldUNKNOWN);
|
|
66
|
+
default:
|
|
67
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
68
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVideoPlayerStatus.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "VideoPlayerStatus.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::unifiedplayer {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "VideoPlayerStatus" and the the Kotlin enum "VideoPlayerStatus".
|
|
19
|
+
*/
|
|
20
|
+
struct JVideoPlayerStatus final: public jni::JavaClass<JVideoPlayerStatus> {
|
|
21
|
+
public:
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/VideoPlayerStatus;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum VideoPlayerStatus.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
VideoPlayerStatus toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<VideoPlayerStatus>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JVideoPlayerStatus> fromCpp(VideoPlayerStatus value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
switch (value) {
|
|
45
|
+
case VideoPlayerStatus::IDLE:
|
|
46
|
+
static const auto fieldIDLE = clazz->getStaticField<JVideoPlayerStatus>("IDLE");
|
|
47
|
+
return clazz->getStaticFieldValue(fieldIDLE);
|
|
48
|
+
case VideoPlayerStatus::LOADING:
|
|
49
|
+
static const auto fieldLOADING = clazz->getStaticField<JVideoPlayerStatus>("LOADING");
|
|
50
|
+
return clazz->getStaticFieldValue(fieldLOADING);
|
|
51
|
+
case VideoPlayerStatus::READYTOPLAY:
|
|
52
|
+
static const auto fieldREADYTOPLAY = clazz->getStaticField<JVideoPlayerStatus>("READYTOPLAY");
|
|
53
|
+
return clazz->getStaticFieldValue(fieldREADYTOPLAY);
|
|
54
|
+
case VideoPlayerStatus::ERROR:
|
|
55
|
+
static const auto fieldERROR = clazz->getStaticField<JVideoPlayerStatus>("ERROR");
|
|
56
|
+
return clazz->getStaticFieldValue(fieldERROR);
|
|
57
|
+
default:
|
|
58
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
59
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JonLoadData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "onLoadData.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JVideoOrientation.hpp"
|
|
14
|
+
#include "VideoOrientation.hpp"
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::unifiedplayer {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "onLoadData" and the the Kotlin data class "onLoadData".
|
|
22
|
+
*/
|
|
23
|
+
struct JonLoadData final: public jni::JavaClass<JonLoadData> {
|
|
24
|
+
public:
|
|
25
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/onLoadData;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct onLoadData by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
onLoadData toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldCurrentTime = clazz->getField<double>("currentTime");
|
|
36
|
+
double currentTime = this->getFieldValue(fieldCurrentTime);
|
|
37
|
+
static const auto fieldDuration = clazz->getField<double>("duration");
|
|
38
|
+
double duration = this->getFieldValue(fieldDuration);
|
|
39
|
+
static const auto fieldHeight = clazz->getField<double>("height");
|
|
40
|
+
double height = this->getFieldValue(fieldHeight);
|
|
41
|
+
static const auto fieldWidth = clazz->getField<double>("width");
|
|
42
|
+
double width = this->getFieldValue(fieldWidth);
|
|
43
|
+
static const auto fieldOrientation = clazz->getField<JVideoOrientation>("orientation");
|
|
44
|
+
jni::local_ref<JVideoOrientation> orientation = this->getFieldValue(fieldOrientation);
|
|
45
|
+
return onLoadData(
|
|
46
|
+
currentTime,
|
|
47
|
+
duration,
|
|
48
|
+
height,
|
|
49
|
+
width,
|
|
50
|
+
orientation->toCpp()
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
/**
|
|
56
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
57
|
+
*/
|
|
58
|
+
[[maybe_unused]]
|
|
59
|
+
static jni::local_ref<JonLoadData::javaobject> fromCpp(const onLoadData& value) {
|
|
60
|
+
using JSignature = JonLoadData(double, double, double, double, jni::alias_ref<JVideoOrientation>);
|
|
61
|
+
static const auto clazz = javaClassStatic();
|
|
62
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
63
|
+
return create(
|
|
64
|
+
clazz,
|
|
65
|
+
value.currentTime,
|
|
66
|
+
value.duration,
|
|
67
|
+
value.height,
|
|
68
|
+
value.width,
|
|
69
|
+
JVideoOrientation::fromCpp(value.orientation)
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JonLoadStartData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "onLoadStartData.hpp"
|
|
12
|
+
|
|
13
|
+
#include "HybridVideoPlayerSourceSpec.hpp"
|
|
14
|
+
#include "JHybridVideoPlayerSourceSpec.hpp"
|
|
15
|
+
#include "JSourceType.hpp"
|
|
16
|
+
#include "SourceType.hpp"
|
|
17
|
+
#include <memory>
|
|
18
|
+
|
|
19
|
+
namespace margelo::nitro::unifiedplayer {
|
|
20
|
+
|
|
21
|
+
using namespace facebook;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The C++ JNI bridge between the C++ struct "onLoadStartData" and the the Kotlin data class "onLoadStartData".
|
|
25
|
+
*/
|
|
26
|
+
struct JonLoadStartData final: public jni::JavaClass<JonLoadStartData> {
|
|
27
|
+
public:
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/onLoadStartData;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Convert this Java/Kotlin-based struct to the C++ struct onLoadStartData by copying all values to C++.
|
|
33
|
+
*/
|
|
34
|
+
[[maybe_unused]]
|
|
35
|
+
[[nodiscard]]
|
|
36
|
+
onLoadStartData toCpp() const {
|
|
37
|
+
static const auto clazz = javaClassStatic();
|
|
38
|
+
static const auto fieldSourceType = clazz->getField<JSourceType>("sourceType");
|
|
39
|
+
jni::local_ref<JSourceType> sourceType = this->getFieldValue(fieldSourceType);
|
|
40
|
+
static const auto fieldSource = clazz->getField<JHybridVideoPlayerSourceSpec::JavaPart>("source");
|
|
41
|
+
jni::local_ref<JHybridVideoPlayerSourceSpec::JavaPart> source = this->getFieldValue(fieldSource);
|
|
42
|
+
return onLoadStartData(
|
|
43
|
+
sourceType->toCpp(),
|
|
44
|
+
source->getJHybridVideoPlayerSourceSpec()
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
51
|
+
*/
|
|
52
|
+
[[maybe_unused]]
|
|
53
|
+
static jni::local_ref<JonLoadStartData::javaobject> fromCpp(const onLoadStartData& value) {
|
|
54
|
+
using JSignature = JonLoadStartData(jni::alias_ref<JSourceType>, jni::alias_ref<JHybridVideoPlayerSourceSpec::JavaPart>);
|
|
55
|
+
static const auto clazz = javaClassStatic();
|
|
56
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
57
|
+
return create(
|
|
58
|
+
clazz,
|
|
59
|
+
JSourceType::fromCpp(value.sourceType),
|
|
60
|
+
std::dynamic_pointer_cast<JHybridVideoPlayerSourceSpec>(value.source)->getJavaPart()
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JonPlaybackStateChangeData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "onPlaybackStateChangeData.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::unifiedplayer {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "onPlaybackStateChangeData" and the the Kotlin data class "onPlaybackStateChangeData".
|
|
21
|
+
*/
|
|
22
|
+
struct JonPlaybackStateChangeData final: public jni::JavaClass<JonPlaybackStateChangeData> {
|
|
23
|
+
public:
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/onPlaybackStateChangeData;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct onPlaybackStateChangeData by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
onPlaybackStateChangeData toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldIsPlaying = clazz->getField<jboolean>("isPlaying");
|
|
35
|
+
jboolean isPlaying = this->getFieldValue(fieldIsPlaying);
|
|
36
|
+
static const auto fieldIsBuffering = clazz->getField<jboolean>("isBuffering");
|
|
37
|
+
jboolean isBuffering = this->getFieldValue(fieldIsBuffering);
|
|
38
|
+
return onPlaybackStateChangeData(
|
|
39
|
+
static_cast<bool>(isPlaying),
|
|
40
|
+
static_cast<bool>(isBuffering)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
/**
|
|
46
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
47
|
+
*/
|
|
48
|
+
[[maybe_unused]]
|
|
49
|
+
static jni::local_ref<JonPlaybackStateChangeData::javaobject> fromCpp(const onPlaybackStateChangeData& value) {
|
|
50
|
+
using JSignature = JonPlaybackStateChangeData(jboolean, jboolean);
|
|
51
|
+
static const auto clazz = javaClassStatic();
|
|
52
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
53
|
+
return create(
|
|
54
|
+
clazz,
|
|
55
|
+
value.isPlaying,
|
|
56
|
+
value.isBuffering
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JonProgressData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "onProgressData.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::unifiedplayer {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "onProgressData" and the the Kotlin data class "onProgressData".
|
|
21
|
+
*/
|
|
22
|
+
struct JonProgressData final: public jni::JavaClass<JonProgressData> {
|
|
23
|
+
public:
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/onProgressData;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct onProgressData by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
onProgressData toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldCurrentTime = clazz->getField<double>("currentTime");
|
|
35
|
+
double currentTime = this->getFieldValue(fieldCurrentTime);
|
|
36
|
+
static const auto fieldDuration = clazz->getField<double>("duration");
|
|
37
|
+
double duration = this->getFieldValue(fieldDuration);
|
|
38
|
+
static const auto fieldBufferDuration = clazz->getField<double>("bufferDuration");
|
|
39
|
+
double bufferDuration = this->getFieldValue(fieldBufferDuration);
|
|
40
|
+
return onProgressData(
|
|
41
|
+
currentTime,
|
|
42
|
+
duration,
|
|
43
|
+
bufferDuration
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
50
|
+
*/
|
|
51
|
+
[[maybe_unused]]
|
|
52
|
+
static jni::local_ref<JonProgressData::javaobject> fromCpp(const onProgressData& value) {
|
|
53
|
+
using JSignature = JonProgressData(double, double, double);
|
|
54
|
+
static const auto clazz = javaClassStatic();
|
|
55
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
56
|
+
return create(
|
|
57
|
+
clazz,
|
|
58
|
+
value.currentTime,
|
|
59
|
+
value.duration,
|
|
60
|
+
value.bufferDuration
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JonVolumeChangeData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "onVolumeChangeData.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::unifiedplayer {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "onVolumeChangeData" and the the Kotlin data class "onVolumeChangeData".
|
|
21
|
+
*/
|
|
22
|
+
struct JonVolumeChangeData final: public jni::JavaClass<JonVolumeChangeData> {
|
|
23
|
+
public:
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/unifiedplayer/onVolumeChangeData;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct onVolumeChangeData by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
onVolumeChangeData toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldVolume = clazz->getField<double>("volume");
|
|
35
|
+
double volume = this->getFieldValue(fieldVolume);
|
|
36
|
+
static const auto fieldMuted = clazz->getField<jboolean>("muted");
|
|
37
|
+
jboolean muted = this->getFieldValue(fieldMuted);
|
|
38
|
+
return onVolumeChangeData(
|
|
39
|
+
volume,
|
|
40
|
+
static_cast<bool>(muted)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
/**
|
|
46
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
47
|
+
*/
|
|
48
|
+
[[maybe_unused]]
|
|
49
|
+
static jni::local_ref<JonVolumeChangeData::javaobject> fromCpp(const onVolumeChangeData& value) {
|
|
50
|
+
using JSignature = JonVolumeChangeData(double, jboolean);
|
|
51
|
+
static const auto clazz = javaClassStatic();
|
|
52
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
53
|
+
return create(
|
|
54
|
+
clazz,
|
|
55
|
+
value.volume,
|
|
56
|
+
value.muted
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace margelo::nitro::unifiedplayer
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BandwidthData.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.unifiedplayer
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "BandwidthData".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class BandwidthData(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val bitrate: Double,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val width: Double?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val height: Double?
|
|
30
|
+
) {
|
|
31
|
+
/* primary constructor */
|
|
32
|
+
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is BandwidthData) return false
|
|
36
|
+
return Objects.deepEquals(this.bitrate, other.bitrate)
|
|
37
|
+
&& Objects.deepEquals(this.width, other.width)
|
|
38
|
+
&& Objects.deepEquals(this.height, other.height)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf(
|
|
43
|
+
bitrate,
|
|
44
|
+
width,
|
|
45
|
+
height
|
|
46
|
+
).contentDeepHashCode()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
companion object {
|
|
50
|
+
/**
|
|
51
|
+
* Constructor called from C++
|
|
52
|
+
*/
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
@Keep
|
|
55
|
+
@Suppress("unused")
|
|
56
|
+
@JvmStatic
|
|
57
|
+
private fun fromCpp(bitrate: Double, width: Double?, height: Double?): BandwidthData {
|
|
58
|
+
return BandwidthData(bitrate, width, height)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|