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,72 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridVideoViewViewManagerSpec.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/// See ``HybridVideoViewViewManagerSpec``
|
|
11
|
+
public protocol HybridVideoViewViewManagerSpec_protocol: HybridObject {
|
|
12
|
+
// Properties
|
|
13
|
+
var player: (any HybridVideoPlayerSpec)? { get set }
|
|
14
|
+
var controls: Bool { get set }
|
|
15
|
+
var pictureInPicture: Bool { get set }
|
|
16
|
+
var autoEnterPictureInPicture: Bool { get set }
|
|
17
|
+
var resizeMode: ResizeMode { get set }
|
|
18
|
+
var keepScreenAwake: Bool { get set }
|
|
19
|
+
var surfaceType: SurfaceType { get set }
|
|
20
|
+
|
|
21
|
+
// Methods
|
|
22
|
+
func enterFullscreen() throws -> Void
|
|
23
|
+
func exitFullscreen() throws -> Void
|
|
24
|
+
func enterPictureInPicture() throws -> Void
|
|
25
|
+
func exitPictureInPicture() throws -> Void
|
|
26
|
+
func canEnterPictureInPicture() throws -> Bool
|
|
27
|
+
func addOnPictureInPictureChangeListener(listener: @escaping (_ isInPictureInPicture: Bool) -> Void) throws -> ListenerSubscription
|
|
28
|
+
func addOnFullscreenChangeListener(listener: @escaping (_ fullscreen: Bool) -> Void) throws -> ListenerSubscription
|
|
29
|
+
func addWillEnterFullscreenListener(listener: @escaping () -> Void) throws -> ListenerSubscription
|
|
30
|
+
func addWillExitFullscreenListener(listener: @escaping () -> Void) throws -> ListenerSubscription
|
|
31
|
+
func addWillEnterPictureInPictureListener(listener: @escaping () -> Void) throws -> ListenerSubscription
|
|
32
|
+
func addWillExitPictureInPictureListener(listener: @escaping () -> Void) throws -> ListenerSubscription
|
|
33
|
+
func clearAllListeners() throws -> Void
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public extension HybridVideoViewViewManagerSpec_protocol {
|
|
37
|
+
/// Default implementation of ``HybridObject.toString``
|
|
38
|
+
func toString() -> String {
|
|
39
|
+
return "[HybridObject VideoViewViewManager]"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// See ``HybridVideoViewViewManagerSpec``
|
|
44
|
+
open class HybridVideoViewViewManagerSpec_base {
|
|
45
|
+
private weak var cxxWrapper: HybridVideoViewViewManagerSpec_cxx? = nil
|
|
46
|
+
public init() { }
|
|
47
|
+
public func getCxxWrapper() -> HybridVideoViewViewManagerSpec_cxx {
|
|
48
|
+
#if DEBUG
|
|
49
|
+
guard self is any HybridVideoViewViewManagerSpec else {
|
|
50
|
+
fatalError("`self` is not a `HybridVideoViewViewManagerSpec`! Did you accidentally inherit from `HybridVideoViewViewManagerSpec_base` instead of `HybridVideoViewViewManagerSpec`?")
|
|
51
|
+
}
|
|
52
|
+
#endif
|
|
53
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
54
|
+
return cxxWrapper
|
|
55
|
+
} else {
|
|
56
|
+
let cxxWrapper = HybridVideoViewViewManagerSpec_cxx(self as! any HybridVideoViewViewManagerSpec)
|
|
57
|
+
self.cxxWrapper = cxxWrapper
|
|
58
|
+
return cxxWrapper
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A Swift base-protocol representing the VideoViewViewManager HybridObject.
|
|
65
|
+
* Implement this protocol to create Swift-based instances of VideoViewViewManager.
|
|
66
|
+
* ```swift
|
|
67
|
+
* class HybridVideoViewViewManager : HybridVideoViewViewManagerSpec {
|
|
68
|
+
* // ...
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
public typealias HybridVideoViewViewManagerSpec = HybridVideoViewViewManagerSpec_protocol & HybridVideoViewViewManagerSpec_base
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridVideoViewViewManagerSpec_cxx.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A class implementation that bridges HybridVideoViewViewManagerSpec over to C++.
|
|
12
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
13
|
+
*
|
|
14
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
15
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
16
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
17
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
18
|
+
*/
|
|
19
|
+
open class HybridVideoViewViewManagerSpec_cxx {
|
|
20
|
+
/**
|
|
21
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::unifiedplayer::bridge::swift`)
|
|
22
|
+
* from `UnifiedPlayer-Swift-Cxx-Bridge.hpp`.
|
|
23
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
24
|
+
*/
|
|
25
|
+
public typealias bridge = margelo.nitro.unifiedplayer.bridge.swift
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Holds an instance of the `HybridVideoViewViewManagerSpec` Swift protocol.
|
|
29
|
+
*/
|
|
30
|
+
private var __implementation: any HybridVideoViewViewManagerSpec
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
34
|
+
*/
|
|
35
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridVideoViewViewManagerSpec_
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a new `HybridVideoViewViewManagerSpec_cxx` that wraps the given `HybridVideoViewViewManagerSpec`.
|
|
39
|
+
* All properties and methods bridge to C++ types.
|
|
40
|
+
*/
|
|
41
|
+
public init(_ implementation: any HybridVideoViewViewManagerSpec) {
|
|
42
|
+
self.__implementation = implementation
|
|
43
|
+
self.__cxxPart = .init()
|
|
44
|
+
/* no base class */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the actual `HybridVideoViewViewManagerSpec` instance this class wraps.
|
|
49
|
+
*/
|
|
50
|
+
@inline(__always)
|
|
51
|
+
public func getHybridVideoViewViewManagerSpec() -> any HybridVideoViewViewManagerSpec {
|
|
52
|
+
return __implementation
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
57
|
+
* This acquires one additional strong reference on the object!
|
|
58
|
+
*/
|
|
59
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
60
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Casts an unsafe pointer to a `HybridVideoViewViewManagerSpec_cxx`.
|
|
65
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridVideoViewViewManagerSpec_cxx>`.
|
|
66
|
+
* This removes one strong reference from the object!
|
|
67
|
+
*/
|
|
68
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridVideoViewViewManagerSpec_cxx {
|
|
69
|
+
return Unmanaged<HybridVideoViewViewManagerSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
74
|
+
* The C++ part is a `std::shared_ptr<HybridVideoViewViewManagerSpec>`.
|
|
75
|
+
*/
|
|
76
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridVideoViewViewManagerSpec_ {
|
|
77
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
78
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
79
|
+
return cachedCxxPart
|
|
80
|
+
} else {
|
|
81
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridVideoViewViewManagerSpec_(self.toUnsafe())
|
|
82
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridVideoViewViewManagerSpec_(newCxxPart)
|
|
83
|
+
return newCxxPart
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
91
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
92
|
+
*/
|
|
93
|
+
@inline(__always)
|
|
94
|
+
public var memorySize: Int {
|
|
95
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridVideoViewViewManagerSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Call dispose() on the Swift class.
|
|
108
|
+
* This _may_ be called manually from JS.
|
|
109
|
+
*/
|
|
110
|
+
@inline(__always)
|
|
111
|
+
public func dispose() {
|
|
112
|
+
self.__implementation.dispose()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Call toString() on the Swift class.
|
|
117
|
+
*/
|
|
118
|
+
@inline(__always)
|
|
119
|
+
public func toString() -> String {
|
|
120
|
+
return self.__implementation.toString()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Properties
|
|
124
|
+
public final var player: bridge.std__optional_std__shared_ptr_HybridVideoPlayerSpec__ {
|
|
125
|
+
@inline(__always)
|
|
126
|
+
get {
|
|
127
|
+
return { () -> bridge.std__optional_std__shared_ptr_HybridVideoPlayerSpec__ in
|
|
128
|
+
if let __unwrappedValue = self.__implementation.player {
|
|
129
|
+
return bridge.create_std__optional_std__shared_ptr_HybridVideoPlayerSpec__({ () -> bridge.std__shared_ptr_HybridVideoPlayerSpec_ in
|
|
130
|
+
let __cxxWrapped = __unwrappedValue.getCxxWrapper()
|
|
131
|
+
return __cxxWrapped.getCxxPart()
|
|
132
|
+
}())
|
|
133
|
+
} else {
|
|
134
|
+
return .init()
|
|
135
|
+
}
|
|
136
|
+
}()
|
|
137
|
+
}
|
|
138
|
+
@inline(__always)
|
|
139
|
+
set {
|
|
140
|
+
self.__implementation.player = { () -> (any HybridVideoPlayerSpec)? in
|
|
141
|
+
if bridge.has_value_std__optional_std__shared_ptr_HybridVideoPlayerSpec__(newValue) {
|
|
142
|
+
let __unwrapped = bridge.get_std__optional_std__shared_ptr_HybridVideoPlayerSpec__(newValue)
|
|
143
|
+
return { () -> any HybridVideoPlayerSpec in
|
|
144
|
+
let __unsafePointer = bridge.get_std__shared_ptr_HybridVideoPlayerSpec_(__unwrapped)
|
|
145
|
+
let __instance = HybridVideoPlayerSpec_cxx.fromUnsafe(__unsafePointer)
|
|
146
|
+
return __instance.getHybridVideoPlayerSpec()
|
|
147
|
+
}()
|
|
148
|
+
} else {
|
|
149
|
+
return nil
|
|
150
|
+
}
|
|
151
|
+
}()
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public final var controls: Bool {
|
|
156
|
+
@inline(__always)
|
|
157
|
+
get {
|
|
158
|
+
return self.__implementation.controls
|
|
159
|
+
}
|
|
160
|
+
@inline(__always)
|
|
161
|
+
set {
|
|
162
|
+
self.__implementation.controls = newValue
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
public final var pictureInPicture: Bool {
|
|
167
|
+
@inline(__always)
|
|
168
|
+
get {
|
|
169
|
+
return self.__implementation.pictureInPicture
|
|
170
|
+
}
|
|
171
|
+
@inline(__always)
|
|
172
|
+
set {
|
|
173
|
+
self.__implementation.pictureInPicture = newValue
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
public final var autoEnterPictureInPicture: Bool {
|
|
178
|
+
@inline(__always)
|
|
179
|
+
get {
|
|
180
|
+
return self.__implementation.autoEnterPictureInPicture
|
|
181
|
+
}
|
|
182
|
+
@inline(__always)
|
|
183
|
+
set {
|
|
184
|
+
self.__implementation.autoEnterPictureInPicture = newValue
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public final var resizeMode: Int32 {
|
|
189
|
+
@inline(__always)
|
|
190
|
+
get {
|
|
191
|
+
return self.__implementation.resizeMode.rawValue
|
|
192
|
+
}
|
|
193
|
+
@inline(__always)
|
|
194
|
+
set {
|
|
195
|
+
self.__implementation.resizeMode = margelo.nitro.unifiedplayer.ResizeMode(rawValue: newValue)!
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public final var keepScreenAwake: Bool {
|
|
200
|
+
@inline(__always)
|
|
201
|
+
get {
|
|
202
|
+
return self.__implementation.keepScreenAwake
|
|
203
|
+
}
|
|
204
|
+
@inline(__always)
|
|
205
|
+
set {
|
|
206
|
+
self.__implementation.keepScreenAwake = newValue
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
public final var surfaceType: Int32 {
|
|
211
|
+
@inline(__always)
|
|
212
|
+
get {
|
|
213
|
+
return self.__implementation.surfaceType.rawValue
|
|
214
|
+
}
|
|
215
|
+
@inline(__always)
|
|
216
|
+
set {
|
|
217
|
+
self.__implementation.surfaceType = margelo.nitro.unifiedplayer.SurfaceType(rawValue: newValue)!
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Methods
|
|
222
|
+
@inline(__always)
|
|
223
|
+
public final func enterFullscreen() -> bridge.Result_void_ {
|
|
224
|
+
do {
|
|
225
|
+
try self.__implementation.enterFullscreen()
|
|
226
|
+
return bridge.create_Result_void_()
|
|
227
|
+
} catch (let __error) {
|
|
228
|
+
let __exceptionPtr = __error.toCpp()
|
|
229
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@inline(__always)
|
|
234
|
+
public final func exitFullscreen() -> bridge.Result_void_ {
|
|
235
|
+
do {
|
|
236
|
+
try self.__implementation.exitFullscreen()
|
|
237
|
+
return bridge.create_Result_void_()
|
|
238
|
+
} catch (let __error) {
|
|
239
|
+
let __exceptionPtr = __error.toCpp()
|
|
240
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@inline(__always)
|
|
245
|
+
public final func enterPictureInPicture() -> bridge.Result_void_ {
|
|
246
|
+
do {
|
|
247
|
+
try self.__implementation.enterPictureInPicture()
|
|
248
|
+
return bridge.create_Result_void_()
|
|
249
|
+
} catch (let __error) {
|
|
250
|
+
let __exceptionPtr = __error.toCpp()
|
|
251
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@inline(__always)
|
|
256
|
+
public final func exitPictureInPicture() -> bridge.Result_void_ {
|
|
257
|
+
do {
|
|
258
|
+
try self.__implementation.exitPictureInPicture()
|
|
259
|
+
return bridge.create_Result_void_()
|
|
260
|
+
} catch (let __error) {
|
|
261
|
+
let __exceptionPtr = __error.toCpp()
|
|
262
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@inline(__always)
|
|
267
|
+
public final func canEnterPictureInPicture() -> bridge.Result_bool_ {
|
|
268
|
+
do {
|
|
269
|
+
let __result = try self.__implementation.canEnterPictureInPicture()
|
|
270
|
+
let __resultCpp = __result
|
|
271
|
+
return bridge.create_Result_bool_(__resultCpp)
|
|
272
|
+
} catch (let __error) {
|
|
273
|
+
let __exceptionPtr = __error.toCpp()
|
|
274
|
+
return bridge.create_Result_bool_(__exceptionPtr)
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@inline(__always)
|
|
279
|
+
public final func addOnPictureInPictureChangeListener(listener: bridge.Func_void_bool) -> bridge.Result_ListenerSubscription_ {
|
|
280
|
+
do {
|
|
281
|
+
let __result = try self.__implementation.addOnPictureInPictureChangeListener(listener: { () -> (Bool) -> Void in
|
|
282
|
+
let __wrappedFunction = bridge.wrap_Func_void_bool(listener)
|
|
283
|
+
return { (__isInPictureInPicture: Bool) -> Void in
|
|
284
|
+
__wrappedFunction.call(__isInPictureInPicture)
|
|
285
|
+
}
|
|
286
|
+
}())
|
|
287
|
+
let __resultCpp = __result
|
|
288
|
+
return bridge.create_Result_ListenerSubscription_(__resultCpp)
|
|
289
|
+
} catch (let __error) {
|
|
290
|
+
let __exceptionPtr = __error.toCpp()
|
|
291
|
+
return bridge.create_Result_ListenerSubscription_(__exceptionPtr)
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@inline(__always)
|
|
296
|
+
public final func addOnFullscreenChangeListener(listener: bridge.Func_void_bool) -> bridge.Result_ListenerSubscription_ {
|
|
297
|
+
do {
|
|
298
|
+
let __result = try self.__implementation.addOnFullscreenChangeListener(listener: { () -> (Bool) -> Void in
|
|
299
|
+
let __wrappedFunction = bridge.wrap_Func_void_bool(listener)
|
|
300
|
+
return { (__fullscreen: Bool) -> Void in
|
|
301
|
+
__wrappedFunction.call(__fullscreen)
|
|
302
|
+
}
|
|
303
|
+
}())
|
|
304
|
+
let __resultCpp = __result
|
|
305
|
+
return bridge.create_Result_ListenerSubscription_(__resultCpp)
|
|
306
|
+
} catch (let __error) {
|
|
307
|
+
let __exceptionPtr = __error.toCpp()
|
|
308
|
+
return bridge.create_Result_ListenerSubscription_(__exceptionPtr)
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
@inline(__always)
|
|
313
|
+
public final func addWillEnterFullscreenListener(listener: bridge.Func_void) -> bridge.Result_ListenerSubscription_ {
|
|
314
|
+
do {
|
|
315
|
+
let __result = try self.__implementation.addWillEnterFullscreenListener(listener: { () -> () -> Void in
|
|
316
|
+
let __wrappedFunction = bridge.wrap_Func_void(listener)
|
|
317
|
+
return { () -> Void in
|
|
318
|
+
__wrappedFunction.call()
|
|
319
|
+
}
|
|
320
|
+
}())
|
|
321
|
+
let __resultCpp = __result
|
|
322
|
+
return bridge.create_Result_ListenerSubscription_(__resultCpp)
|
|
323
|
+
} catch (let __error) {
|
|
324
|
+
let __exceptionPtr = __error.toCpp()
|
|
325
|
+
return bridge.create_Result_ListenerSubscription_(__exceptionPtr)
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@inline(__always)
|
|
330
|
+
public final func addWillExitFullscreenListener(listener: bridge.Func_void) -> bridge.Result_ListenerSubscription_ {
|
|
331
|
+
do {
|
|
332
|
+
let __result = try self.__implementation.addWillExitFullscreenListener(listener: { () -> () -> Void in
|
|
333
|
+
let __wrappedFunction = bridge.wrap_Func_void(listener)
|
|
334
|
+
return { () -> Void in
|
|
335
|
+
__wrappedFunction.call()
|
|
336
|
+
}
|
|
337
|
+
}())
|
|
338
|
+
let __resultCpp = __result
|
|
339
|
+
return bridge.create_Result_ListenerSubscription_(__resultCpp)
|
|
340
|
+
} catch (let __error) {
|
|
341
|
+
let __exceptionPtr = __error.toCpp()
|
|
342
|
+
return bridge.create_Result_ListenerSubscription_(__exceptionPtr)
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@inline(__always)
|
|
347
|
+
public final func addWillEnterPictureInPictureListener(listener: bridge.Func_void) -> bridge.Result_ListenerSubscription_ {
|
|
348
|
+
do {
|
|
349
|
+
let __result = try self.__implementation.addWillEnterPictureInPictureListener(listener: { () -> () -> Void in
|
|
350
|
+
let __wrappedFunction = bridge.wrap_Func_void(listener)
|
|
351
|
+
return { () -> Void in
|
|
352
|
+
__wrappedFunction.call()
|
|
353
|
+
}
|
|
354
|
+
}())
|
|
355
|
+
let __resultCpp = __result
|
|
356
|
+
return bridge.create_Result_ListenerSubscription_(__resultCpp)
|
|
357
|
+
} catch (let __error) {
|
|
358
|
+
let __exceptionPtr = __error.toCpp()
|
|
359
|
+
return bridge.create_Result_ListenerSubscription_(__exceptionPtr)
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@inline(__always)
|
|
364
|
+
public final func addWillExitPictureInPictureListener(listener: bridge.Func_void) -> bridge.Result_ListenerSubscription_ {
|
|
365
|
+
do {
|
|
366
|
+
let __result = try self.__implementation.addWillExitPictureInPictureListener(listener: { () -> () -> Void in
|
|
367
|
+
let __wrappedFunction = bridge.wrap_Func_void(listener)
|
|
368
|
+
return { () -> Void in
|
|
369
|
+
__wrappedFunction.call()
|
|
370
|
+
}
|
|
371
|
+
}())
|
|
372
|
+
let __resultCpp = __result
|
|
373
|
+
return bridge.create_Result_ListenerSubscription_(__resultCpp)
|
|
374
|
+
} catch (let __error) {
|
|
375
|
+
let __exceptionPtr = __error.toCpp()
|
|
376
|
+
return bridge.create_Result_ListenerSubscription_(__exceptionPtr)
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
@inline(__always)
|
|
381
|
+
public final func clearAllListeners() -> bridge.Result_void_ {
|
|
382
|
+
do {
|
|
383
|
+
try self.__implementation.clearAllListeners()
|
|
384
|
+
return bridge.create_Result_void_()
|
|
385
|
+
} catch (let __error) {
|
|
386
|
+
let __exceptionPtr = __error.toCpp()
|
|
387
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// IgnoreSilentSwitchMode.swift
|
|
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
|
+
/**
|
|
9
|
+
* Represents the JS union `IgnoreSilentSwitchMode`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias IgnoreSilentSwitchMode = margelo.nitro.unifiedplayer.IgnoreSilentSwitchMode
|
|
12
|
+
|
|
13
|
+
public extension IgnoreSilentSwitchMode {
|
|
14
|
+
/**
|
|
15
|
+
* Get a IgnoreSilentSwitchMode for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "auto":
|
|
21
|
+
self = .auto
|
|
22
|
+
case "ignore":
|
|
23
|
+
self = .ignore
|
|
24
|
+
case "obey":
|
|
25
|
+
self = .obey
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this IgnoreSilentSwitchMode represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .auto:
|
|
37
|
+
return "auto"
|
|
38
|
+
case .ignore:
|
|
39
|
+
return "ignore"
|
|
40
|
+
case .obey:
|
|
41
|
+
return "obey"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ListenerSubscription.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `ListenerSubscription`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias ListenerSubscription = margelo.nitro.unifiedplayer.ListenerSubscription
|
|
14
|
+
|
|
15
|
+
public extension ListenerSubscription {
|
|
16
|
+
private typealias bridge = margelo.nitro.unifiedplayer.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `ListenerSubscription`.
|
|
20
|
+
*/
|
|
21
|
+
init(remove: @escaping () -> Void) {
|
|
22
|
+
self.init({ () -> bridge.Func_void in
|
|
23
|
+
let __closureWrapper = Func_void(remove)
|
|
24
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
25
|
+
}())
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@inline(__always)
|
|
29
|
+
var remove: () -> Void {
|
|
30
|
+
return { () -> () -> Void in
|
|
31
|
+
let __wrappedFunction = bridge.wrap_Func_void(self.__remove)
|
|
32
|
+
return { () -> Void in
|
|
33
|
+
__wrappedFunction.call()
|
|
34
|
+
}
|
|
35
|
+
}()
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LivePlaybackParams.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `LivePlaybackParams`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias LivePlaybackParams = margelo.nitro.unifiedplayer.LivePlaybackParams
|
|
14
|
+
|
|
15
|
+
public extension LivePlaybackParams {
|
|
16
|
+
private typealias bridge = margelo.nitro.unifiedplayer.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `LivePlaybackParams`.
|
|
20
|
+
*/
|
|
21
|
+
init(minPlaybackSpeed: Double?, maxPlaybackSpeed: Double?, maxOffsetMs: Double?, minOffsetMs: Double?, targetOffsetMs: Double?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_double_ in
|
|
23
|
+
if let __unwrappedValue = minPlaybackSpeed {
|
|
24
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
29
|
+
if let __unwrappedValue = maxPlaybackSpeed {
|
|
30
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
35
|
+
if let __unwrappedValue = maxOffsetMs {
|
|
36
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
41
|
+
if let __unwrappedValue = minOffsetMs {
|
|
42
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
47
|
+
if let __unwrappedValue = targetOffsetMs {
|
|
48
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}())
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@inline(__always)
|
|
56
|
+
var minPlaybackSpeed: Double? {
|
|
57
|
+
return { () -> Double? in
|
|
58
|
+
if bridge.has_value_std__optional_double_(self.__minPlaybackSpeed) {
|
|
59
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__minPlaybackSpeed)
|
|
60
|
+
return __unwrapped
|
|
61
|
+
} else {
|
|
62
|
+
return nil
|
|
63
|
+
}
|
|
64
|
+
}()
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@inline(__always)
|
|
68
|
+
var maxPlaybackSpeed: Double? {
|
|
69
|
+
return { () -> Double? in
|
|
70
|
+
if bridge.has_value_std__optional_double_(self.__maxPlaybackSpeed) {
|
|
71
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__maxPlaybackSpeed)
|
|
72
|
+
return __unwrapped
|
|
73
|
+
} else {
|
|
74
|
+
return nil
|
|
75
|
+
}
|
|
76
|
+
}()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@inline(__always)
|
|
80
|
+
var maxOffsetMs: Double? {
|
|
81
|
+
return { () -> Double? in
|
|
82
|
+
if bridge.has_value_std__optional_double_(self.__maxOffsetMs) {
|
|
83
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__maxOffsetMs)
|
|
84
|
+
return __unwrapped
|
|
85
|
+
} else {
|
|
86
|
+
return nil
|
|
87
|
+
}
|
|
88
|
+
}()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@inline(__always)
|
|
92
|
+
var minOffsetMs: Double? {
|
|
93
|
+
return { () -> Double? in
|
|
94
|
+
if bridge.has_value_std__optional_double_(self.__minOffsetMs) {
|
|
95
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__minOffsetMs)
|
|
96
|
+
return __unwrapped
|
|
97
|
+
} else {
|
|
98
|
+
return nil
|
|
99
|
+
}
|
|
100
|
+
}()
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@inline(__always)
|
|
104
|
+
var targetOffsetMs: Double? {
|
|
105
|
+
return { () -> Double? in
|
|
106
|
+
if bridge.has_value_std__optional_double_(self.__targetOffsetMs) {
|
|
107
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__targetOffsetMs)
|
|
108
|
+
return __unwrapped
|
|
109
|
+
} else {
|
|
110
|
+
return nil
|
|
111
|
+
}
|
|
112
|
+
}()
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// MixAudioMode.swift
|
|
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
|
+
/**
|
|
9
|
+
* Represents the JS union `MixAudioMode`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias MixAudioMode = margelo.nitro.unifiedplayer.MixAudioMode
|
|
12
|
+
|
|
13
|
+
public extension MixAudioMode {
|
|
14
|
+
/**
|
|
15
|
+
* Get a MixAudioMode for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "mixWithOthers":
|
|
21
|
+
self = .mixwithothers
|
|
22
|
+
case "doNotMix":
|
|
23
|
+
self = .donotmix
|
|
24
|
+
case "duckOthers":
|
|
25
|
+
self = .duckothers
|
|
26
|
+
case "auto":
|
|
27
|
+
self = .auto
|
|
28
|
+
default:
|
|
29
|
+
return nil
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the String value this MixAudioMode represents.
|
|
35
|
+
*/
|
|
36
|
+
var stringValue: String {
|
|
37
|
+
switch self {
|
|
38
|
+
case .mixwithothers:
|
|
39
|
+
return "mixWithOthers"
|
|
40
|
+
case .donotmix:
|
|
41
|
+
return "doNotMix"
|
|
42
|
+
case .duckothers:
|
|
43
|
+
return "duckOthers"
|
|
44
|
+
case .auto:
|
|
45
|
+
return "auto"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|