react-native-theoplayer 9.3.0 → 9.5.0
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/CHANGELOG.md +22 -0
- package/README.md +3 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/theoplayer/media/MediaPlaybackService.kt +7 -11
- package/android/src/main/java/com/theoplayer/presentation/PipConfig.kt +7 -0
- package/android/src/main/java/com/theoplayer/presentation/PipConfigAdapter.kt +7 -1
- package/android/src/main/java/com/theoplayer/presentation/PresentationManager.kt +2 -5
- package/android/src/main/java/com/theoplayer/track/TextTrackStyleAdapter.kt +8 -0
- package/app.plugin.js +2 -46
- package/lib/commonjs/api/abr/ABRConfiguration.js +5 -0
- package/lib/commonjs/api/abr/ABRConfiguration.js.map +1 -1
- package/lib/commonjs/api/ads/Omid.js +15 -0
- package/lib/commonjs/api/ads/Omid.js.map +1 -1
- package/lib/commonjs/api/backgroundAudio/BackgroundAudioConfiguration.js.map +1 -1
- package/lib/commonjs/api/cache/CachingTask.js +2 -0
- package/lib/commonjs/api/cache/CachingTask.js.map +1 -1
- package/lib/commonjs/api/cache/CachingTaskParameters.js +4 -2
- package/lib/commonjs/api/cache/CachingTaskParameters.js.map +1 -1
- package/lib/commonjs/api/cache/MediaCacheAPI.js +2 -0
- package/lib/commonjs/api/cache/MediaCacheAPI.js.map +1 -1
- package/lib/commonjs/api/cache/events/CacheEvent.js +19 -2
- package/lib/commonjs/api/cache/events/CacheEvent.js.map +1 -1
- package/lib/commonjs/api/cache/events/CachingTaskEvent.js +23 -0
- package/lib/commonjs/api/cache/events/CachingTaskEvent.js.map +1 -1
- package/lib/commonjs/api/cache/hooks/useCachingTaskList.js +6 -0
- package/lib/commonjs/api/cache/hooks/useCachingTaskList.js.map +1 -1
- package/lib/commonjs/api/cache/hooks/useCachingTaskProgress.js +6 -0
- package/lib/commonjs/api/cache/hooks/useCachingTaskProgress.js.map +1 -1
- package/lib/commonjs/api/cache/hooks/useCachingTaskStatus.js +6 -0
- package/lib/commonjs/api/cache/hooks/useCachingTaskStatus.js.map +1 -1
- package/lib/commonjs/api/cast/CastState.js +1 -0
- package/lib/commonjs/api/cast/CastState.js.map +1 -1
- package/lib/commonjs/api/event/AdEvent.js +14 -0
- package/lib/commonjs/api/event/AdEvent.js.map +1 -1
- package/lib/commonjs/api/event/CastEvent.js +35 -0
- package/lib/commonjs/api/event/CastEvent.js.map +1 -1
- package/lib/commonjs/api/event/PlayerEvent.js +106 -0
- package/lib/commonjs/api/event/PlayerEvent.js.map +1 -1
- package/lib/commonjs/api/event/TheoAdsEvent.js +14 -0
- package/lib/commonjs/api/event/TheoAdsEvent.js.map +1 -1
- package/lib/commonjs/api/event/TrackEvent.js +56 -0
- package/lib/commonjs/api/event/TrackEvent.js.map +1 -1
- package/lib/commonjs/api/player/PlayerEventMap.js +10 -0
- package/lib/commonjs/api/player/PlayerEventMap.js.map +1 -1
- package/lib/commonjs/api/player/THEOplayer.js +5 -0
- package/lib/commonjs/api/player/THEOplayer.js.map +1 -1
- package/lib/commonjs/api/presentation/PresentationMode.js.map +1 -1
- package/lib/commonjs/api/source/SourceDescription.js +18 -2
- package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
- package/lib/commonjs/api/source/ads/Ads.js +8 -0
- package/lib/commonjs/api/source/ads/Ads.js.map +1 -1
- package/lib/commonjs/api/source/ads/TheoAdDescription.js +1 -0
- package/lib/commonjs/api/source/ads/TheoAdDescription.js.map +1 -1
- package/lib/commonjs/api/source/cmcd/CmcdConfiguration.js +9 -0
- package/lib/commonjs/api/source/cmcd/CmcdConfiguration.js.map +1 -1
- package/lib/commonjs/api/track/DateRangeCue.js +4 -0
- package/lib/commonjs/api/track/DateRangeCue.js.map +1 -1
- package/lib/commonjs/api/track/MediaTrack.js +28 -0
- package/lib/commonjs/api/track/MediaTrack.js.map +1 -1
- package/lib/commonjs/api/track/TextTrack.js +82 -0
- package/lib/commonjs/api/track/TextTrack.js.map +1 -1
- package/lib/commonjs/api/track/TextTrackStyle.js +2 -0
- package/lib/commonjs/api/track/TextTrackStyle.js.map +1 -1
- package/lib/commonjs/api/track/Track.js +28 -0
- package/lib/commonjs/api/track/Track.js.map +1 -1
- package/lib/commonjs/internal/adapter/DefaultNativePlayerState.js +1 -0
- package/lib/commonjs/internal/adapter/DefaultNativePlayerState.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js +4 -0
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js +3 -0
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
- package/lib/commonjs/internal/cache/MediaCache.js +7 -0
- package/lib/commonjs/internal/cache/MediaCache.js.map +1 -1
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.js +7 -0
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.js.map +1 -1
- package/lib/commonjs/manifest.json +1 -1
- package/lib/commonjs/plugins/expo/Common.js +2 -0
- package/lib/commonjs/plugins/expo/Common.js.map +1 -0
- package/lib/commonjs/plugins/expo/withCustomPod.js +32 -0
- package/lib/commonjs/plugins/expo/withCustomPod.js.map +1 -0
- package/lib/commonjs/plugins/expo/withTHEOplayer.js +15 -0
- package/lib/commonjs/plugins/expo/withTHEOplayer.js.map +1 -0
- package/lib/commonjs/plugins/expo/withTHEOplayerAndroid.js +58 -0
- package/lib/commonjs/plugins/expo/withTHEOplayerAndroid.js.map +1 -0
- package/lib/commonjs/plugins/expo/withTHEOplayerIOS.js +47 -0
- package/lib/commonjs/plugins/expo/withTHEOplayerIOS.js.map +1 -0
- package/lib/commonjs/plugins/typedoc-platform-icons/package-lock.json +237 -0
- package/lib/commonjs/plugins/typedoc-platform-icons/package.json +20 -0
- package/lib/commonjs/plugins/typedoc-platform-icons/src/index.js +96 -0
- package/lib/commonjs/plugins/typedoc-platform-icons/src/index.js.map +1 -0
- package/lib/commonjs/plugins/typedoc-platform-icons/tsconfig.json +24 -0
- package/lib/module/api/abr/ABRConfiguration.js +5 -0
- package/lib/module/api/abr/ABRConfiguration.js.map +1 -1
- package/lib/module/api/ads/Omid.js +16 -0
- package/lib/module/api/ads/Omid.js.map +1 -1
- package/lib/module/api/backgroundAudio/BackgroundAudioConfiguration.js.map +1 -1
- package/lib/module/api/cache/CachingTask.js +2 -0
- package/lib/module/api/cache/CachingTask.js.map +1 -1
- package/lib/module/api/cache/CachingTaskParameters.js +4 -2
- package/lib/module/api/cache/CachingTaskParameters.js.map +1 -1
- package/lib/module/api/cache/MediaCacheAPI.js +2 -0
- package/lib/module/api/cache/MediaCacheAPI.js.map +1 -1
- package/lib/module/api/cache/events/CacheEvent.js +20 -2
- package/lib/module/api/cache/events/CacheEvent.js.map +1 -1
- package/lib/module/api/cache/events/CachingTaskEvent.js +25 -0
- package/lib/module/api/cache/events/CachingTaskEvent.js.map +1 -1
- package/lib/module/api/cache/hooks/useCachingTaskList.js +7 -0
- package/lib/module/api/cache/hooks/useCachingTaskList.js.map +1 -1
- package/lib/module/api/cache/hooks/useCachingTaskProgress.js +7 -0
- package/lib/module/api/cache/hooks/useCachingTaskProgress.js.map +1 -1
- package/lib/module/api/cache/hooks/useCachingTaskStatus.js +7 -0
- package/lib/module/api/cache/hooks/useCachingTaskStatus.js.map +1 -1
- package/lib/module/api/cast/CastState.js +1 -0
- package/lib/module/api/cast/CastState.js.map +1 -1
- package/lib/module/api/event/AdEvent.js +15 -0
- package/lib/module/api/event/AdEvent.js.map +1 -1
- package/lib/module/api/event/CastEvent.js +39 -0
- package/lib/module/api/event/CastEvent.js.map +1 -1
- package/lib/module/api/event/PlayerEvent.js +120 -0
- package/lib/module/api/event/PlayerEvent.js.map +1 -1
- package/lib/module/api/event/TheoAdsEvent.js +15 -0
- package/lib/module/api/event/TheoAdsEvent.js.map +1 -1
- package/lib/module/api/event/TrackEvent.js +63 -0
- package/lib/module/api/event/TrackEvent.js.map +1 -1
- package/lib/module/api/player/PlayerEventMap.js +10 -0
- package/lib/module/api/player/PlayerEventMap.js.map +1 -1
- package/lib/module/api/player/THEOplayer.js +5 -0
- package/lib/module/api/player/THEOplayer.js.map +1 -1
- package/lib/module/api/presentation/PresentationMode.js +0 -1
- package/lib/module/api/presentation/PresentationMode.js.map +1 -1
- package/lib/module/api/source/SourceDescription.js +19 -2
- package/lib/module/api/source/SourceDescription.js.map +1 -1
- package/lib/module/api/source/ads/Ads.js +8 -0
- package/lib/module/api/source/ads/Ads.js.map +1 -1
- package/lib/module/api/source/ads/TheoAdDescription.js +1 -0
- package/lib/module/api/source/ads/TheoAdDescription.js.map +1 -1
- package/lib/module/api/source/cmcd/CmcdConfiguration.js +9 -0
- package/lib/module/api/source/cmcd/CmcdConfiguration.js.map +1 -1
- package/lib/module/api/track/DateRangeCue.js +4 -0
- package/lib/module/api/track/DateRangeCue.js.map +1 -1
- package/lib/module/api/track/MediaTrack.js +28 -0
- package/lib/module/api/track/MediaTrack.js.map +1 -1
- package/lib/module/api/track/TextTrack.js +86 -0
- package/lib/module/api/track/TextTrack.js.map +1 -1
- package/lib/module/api/track/TextTrackStyle.js +2 -0
- package/lib/module/api/track/TextTrackStyle.js.map +1 -1
- package/lib/module/api/track/Track.js +28 -0
- package/lib/module/api/track/Track.js.map +1 -1
- package/lib/module/internal/adapter/DefaultNativePlayerState.js +1 -0
- package/lib/module/internal/adapter/DefaultNativePlayerState.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerAdapter.js +4 -0
- package/lib/module/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js +3 -0
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
- package/lib/module/internal/cache/MediaCache.js +7 -0
- package/lib/module/internal/cache/MediaCache.js.map +1 -1
- package/lib/module/internal/drm/ContentProtectionRegistry.js +7 -0
- package/lib/module/internal/drm/ContentProtectionRegistry.js.map +1 -1
- package/lib/module/manifest.json +1 -1
- package/lib/module/plugins/expo/Common.js +2 -0
- package/lib/module/plugins/expo/Common.js.map +1 -0
- package/lib/module/plugins/expo/withCustomPod.js +27 -0
- package/lib/module/plugins/expo/withCustomPod.js.map +1 -0
- package/lib/module/plugins/expo/withTHEOplayer.js +11 -0
- package/lib/module/plugins/expo/withTHEOplayer.js.map +1 -0
- package/lib/module/plugins/expo/withTHEOplayerAndroid.js +53 -0
- package/lib/module/plugins/expo/withTHEOplayerAndroid.js.map +1 -0
- package/lib/module/plugins/expo/withTHEOplayerIOS.js +42 -0
- package/lib/module/plugins/expo/withTHEOplayerIOS.js.map +1 -0
- package/lib/module/plugins/typedoc-platform-icons/package-lock.json +237 -0
- package/lib/module/plugins/typedoc-platform-icons/package.json +20 -0
- package/lib/module/plugins/typedoc-platform-icons/src/index.js +92 -0
- package/lib/module/plugins/typedoc-platform-icons/src/index.js.map +1 -0
- package/lib/module/plugins/typedoc-platform-icons/tsconfig.json +24 -0
- package/lib/typescript/api/THEOplayerView.d.ts +1 -2
- package/lib/typescript/api/THEOplayerView.d.ts.map +1 -1
- package/lib/typescript/api/abr/ABRConfiguration.d.ts +13 -12
- package/lib/typescript/api/abr/ABRConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/ads/Ad.d.ts +9 -2
- package/lib/typescript/api/ads/Ad.d.ts.map +1 -1
- package/lib/typescript/api/ads/AdBreak.d.ts +7 -0
- package/lib/typescript/api/ads/AdBreak.d.ts.map +1 -1
- package/lib/typescript/api/ads/AdsAPI.d.ts +6 -3
- package/lib/typescript/api/ads/AdsAPI.d.ts.map +1 -1
- package/lib/typescript/api/ads/AdsConfiguration.d.ts +14 -5
- package/lib/typescript/api/ads/AdsConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/ads/CompanionAd.d.ts +1 -0
- package/lib/typescript/api/ads/CompanionAd.d.ts.map +1 -1
- package/lib/typescript/api/ads/GoogleDai.d.ts +1 -0
- package/lib/typescript/api/ads/GoogleDai.d.ts.map +1 -1
- package/lib/typescript/api/ads/GoogleImaAd.d.ts +3 -4
- package/lib/typescript/api/ads/GoogleImaAd.d.ts.map +1 -1
- package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts +5 -1
- package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/ads/Omid.d.ts +16 -0
- package/lib/typescript/api/ads/Omid.d.ts.map +1 -1
- package/lib/typescript/api/backgroundAudio/BackgroundAudioConfiguration.d.ts +4 -2
- package/lib/typescript/api/backgroundAudio/BackgroundAudioConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/broadcast/EventBroadcastAPI.d.ts +1 -0
- package/lib/typescript/api/broadcast/EventBroadcastAPI.d.ts.map +1 -1
- package/lib/typescript/api/cache/CachingPreferredTrackSelection.d.ts +1 -0
- package/lib/typescript/api/cache/CachingPreferredTrackSelection.d.ts.map +1 -1
- package/lib/typescript/api/cache/CachingTask.d.ts +4 -1
- package/lib/typescript/api/cache/CachingTask.d.ts.map +1 -1
- package/lib/typescript/api/cache/CachingTaskLicense.d.ts +7 -0
- package/lib/typescript/api/cache/CachingTaskLicense.d.ts.map +1 -1
- package/lib/typescript/api/cache/CachingTaskList.d.ts +7 -0
- package/lib/typescript/api/cache/CachingTaskList.d.ts.map +1 -1
- package/lib/typescript/api/cache/CachingTaskParameters.d.ts +13 -9
- package/lib/typescript/api/cache/CachingTaskParameters.d.ts.map +1 -1
- package/lib/typescript/api/cache/MediaCacheAPI.d.ts +2 -0
- package/lib/typescript/api/cache/MediaCacheAPI.d.ts.map +1 -1
- package/lib/typescript/api/cache/events/CacheEvent.d.ts +19 -2
- package/lib/typescript/api/cache/events/CacheEvent.d.ts.map +1 -1
- package/lib/typescript/api/cache/events/CachingTaskEvent.d.ts +23 -0
- package/lib/typescript/api/cache/events/CachingTaskEvent.d.ts.map +1 -1
- package/lib/typescript/api/cache/hooks/useCachingTaskList.d.ts +6 -0
- package/lib/typescript/api/cache/hooks/useCachingTaskList.d.ts.map +1 -1
- package/lib/typescript/api/cache/hooks/useCachingTaskProgress.d.ts +6 -0
- package/lib/typescript/api/cache/hooks/useCachingTaskProgress.d.ts.map +1 -1
- package/lib/typescript/api/cache/hooks/useCachingTaskStatus.d.ts +6 -0
- package/lib/typescript/api/cache/hooks/useCachingTaskStatus.d.ts.map +1 -1
- package/lib/typescript/api/cast/Airplay.d.ts +2 -1
- package/lib/typescript/api/cast/Airplay.d.ts.map +1 -1
- package/lib/typescript/api/cast/CastAPI.d.ts +3 -0
- package/lib/typescript/api/cast/CastAPI.d.ts.map +1 -1
- package/lib/typescript/api/cast/CastConfiguration.d.ts +3 -0
- package/lib/typescript/api/cast/CastConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/cast/CastState.d.ts +1 -0
- package/lib/typescript/api/cast/CastState.d.ts.map +1 -1
- package/lib/typescript/api/cast/Chromecast.d.ts +7 -0
- package/lib/typescript/api/cast/Chromecast.d.ts.map +1 -1
- package/lib/typescript/api/config/PlayerConfiguration.d.ts +15 -11
- package/lib/typescript/api/config/PlayerConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/drm/ContentProtectionAPI.d.ts +9 -0
- package/lib/typescript/api/drm/ContentProtectionAPI.d.ts.map +1 -1
- package/lib/typescript/api/drm/ContentProtectionIntegration.d.ts +2 -1
- package/lib/typescript/api/drm/ContentProtectionIntegration.d.ts.map +1 -1
- package/lib/typescript/api/drm/ContentProtectionIntegrationFactory.d.ts +1 -0
- package/lib/typescript/api/drm/ContentProtectionIntegrationFactory.d.ts.map +1 -1
- package/lib/typescript/api/drm/ContentProtectionRequest.d.ts +5 -0
- package/lib/typescript/api/drm/ContentProtectionRequest.d.ts.map +1 -1
- package/lib/typescript/api/drm/ContentProtectionResponse.d.ts +6 -0
- package/lib/typescript/api/drm/ContentProtectionResponse.d.ts.map +1 -1
- package/lib/typescript/api/error/ChromecastError.d.ts +4 -0
- package/lib/typescript/api/error/ChromecastError.d.ts.map +1 -1
- package/lib/typescript/api/error/PlayerError.d.ts +7 -0
- package/lib/typescript/api/error/PlayerError.d.ts.map +1 -1
- package/lib/typescript/api/event/AdEvent.d.ts +18 -8
- package/lib/typescript/api/event/AdEvent.d.ts.map +1 -1
- package/lib/typescript/api/event/CastEvent.d.ts +35 -0
- package/lib/typescript/api/event/CastEvent.d.ts.map +1 -1
- package/lib/typescript/api/event/Event.d.ts +2 -1
- package/lib/typescript/api/event/Event.d.ts.map +1 -1
- package/lib/typescript/api/event/EventDispatcher.d.ts +3 -1
- package/lib/typescript/api/event/EventDispatcher.d.ts.map +1 -1
- package/lib/typescript/api/event/EventListener.d.ts +1 -0
- package/lib/typescript/api/event/EventListener.d.ts.map +1 -1
- package/lib/typescript/api/event/PlayerEvent.d.ts +107 -2
- package/lib/typescript/api/event/PlayerEvent.d.ts.map +1 -1
- package/lib/typescript/api/event/TheoAdsEvent.d.ts +14 -0
- package/lib/typescript/api/event/TheoAdsEvent.d.ts.map +1 -1
- package/lib/typescript/api/event/TrackEvent.d.ts +56 -0
- package/lib/typescript/api/event/TrackEvent.d.ts.map +1 -1
- package/lib/typescript/api/media/MediaControlConfiguration.d.ts +2 -4
- package/lib/typescript/api/media/MediaControlConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/millicast/MillicastConnectOptions.d.ts +4 -0
- package/lib/typescript/api/millicast/MillicastConnectOptions.d.ts.map +1 -1
- package/lib/typescript/api/pip/PiPConfiguration.d.ts +10 -1
- package/lib/typescript/api/pip/PiPConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/playback/PlaybackSettingsAPI.d.ts +3 -6
- package/lib/typescript/api/playback/PlaybackSettingsAPI.d.ts.map +1 -1
- package/lib/typescript/api/player/PlayerEventMap.d.ts +10 -0
- package/lib/typescript/api/player/PlayerEventMap.d.ts.map +1 -1
- package/lib/typescript/api/player/PlayerVersion.d.ts +6 -0
- package/lib/typescript/api/player/PlayerVersion.d.ts.map +1 -1
- package/lib/typescript/api/player/THEOplayer.d.ts +14 -9
- package/lib/typescript/api/player/THEOplayer.d.ts.map +1 -1
- package/lib/typescript/api/presentation/PresentationMode.d.ts.map +1 -1
- package/lib/typescript/api/source/SourceDescription.d.ts +29 -27
- package/lib/typescript/api/source/SourceDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/Ads.d.ts +8 -1
- package/lib/typescript/api/source/ads/Ads.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/IMAAdDescription.d.ts +1 -0
- package/lib/typescript/api/source/ads/IMAAdDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/THEOplayerAdDescription.d.ts +1 -0
- package/lib/typescript/api/source/ads/THEOplayerAdDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/TheoAdDescription.d.ts +4 -3
- package/lib/typescript/api/source/ads/TheoAdDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +20 -1
- package/lib/typescript/api/source/ads/ssai/GoogleDAIConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +11 -0
- package/lib/typescript/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/analytics/AnalyticsDescription.d.ts +2 -0
- package/lib/typescript/api/source/analytics/AnalyticsDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/cmcd/CmcdConfiguration.d.ts +14 -10
- package/lib/typescript/api/source/cmcd/CmcdConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/dash/DashPlaybackConfiguration.d.ts +12 -16
- package/lib/typescript/api/source/dash/DashPlaybackConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/drm/DRMConfiguration.d.ts +20 -0
- package/lib/typescript/api/source/drm/DRMConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/hls/HlsPlaybackConfiguration.d.ts +2 -3
- package/lib/typescript/api/source/hls/HlsPlaybackConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/metadata/MetadataDescription.d.ts +1 -0
- package/lib/typescript/api/source/metadata/MetadataDescription.d.ts.map +1 -1
- package/lib/typescript/api/theoads/TheoAdsAPI.d.ts +2 -2
- package/lib/typescript/api/theoads/interstitial/AdBreakInterstitial.d.ts +5 -0
- package/lib/typescript/api/theoads/interstitial/AdBreakInterstitial.d.ts.map +1 -1
- package/lib/typescript/api/theoads/interstitial/Interstitial.d.ts +2 -0
- package/lib/typescript/api/theoads/interstitial/Interstitial.d.ts.map +1 -1
- package/lib/typescript/api/theoads/interstitial/OverlayInterstitial.d.ts +3 -0
- package/lib/typescript/api/theoads/interstitial/OverlayInterstitial.d.ts.map +1 -1
- package/lib/typescript/api/theolive/TheoLiveConfiguration.d.ts +4 -8
- package/lib/typescript/api/theolive/TheoLiveConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/track/DateRangeCue.d.ts +4 -0
- package/lib/typescript/api/track/DateRangeCue.d.ts.map +1 -1
- package/lib/typescript/api/track/MediaTrack.d.ts +25 -0
- package/lib/typescript/api/track/MediaTrack.d.ts.map +1 -1
- package/lib/typescript/api/track/Quality.d.ts +3 -0
- package/lib/typescript/api/track/Quality.d.ts.map +1 -1
- package/lib/typescript/api/track/TextTrack.d.ts +79 -0
- package/lib/typescript/api/track/TextTrack.d.ts.map +1 -1
- package/lib/typescript/api/track/TextTrackCue.d.ts +1 -0
- package/lib/typescript/api/track/TextTrackCue.d.ts.map +1 -1
- package/lib/typescript/api/track/TextTrackStyle.d.ts +13 -9
- package/lib/typescript/api/track/TextTrackStyle.d.ts.map +1 -1
- package/lib/typescript/api/track/Track.d.ts +25 -0
- package/lib/typescript/api/track/Track.d.ts.map +1 -1
- package/lib/typescript/api/ui/UIConfiguration.d.ts +1 -0
- package/lib/typescript/api/ui/UIConfiguration.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/DefaultNativePlayerState.d.ts +1 -0
- package/lib/typescript/internal/adapter/DefaultNativePlayerState.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts +1 -0
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/THEOplayerWebAdapter.d.ts +1 -0
- package/lib/typescript/internal/adapter/THEOplayerWebAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/cache/MediaCache.d.ts +6 -0
- package/lib/typescript/internal/cache/MediaCache.d.ts.map +1 -1
- package/lib/typescript/internal/drm/ContentProtectionRegistry.d.ts +6 -0
- package/lib/typescript/internal/drm/ContentProtectionRegistry.d.ts.map +1 -1
- package/lib/typescript/plugins/expo/Common.d.ts +13 -0
- package/lib/typescript/plugins/expo/Common.d.ts.map +1 -0
- package/lib/typescript/plugins/expo/withCustomPod.d.ts +2 -0
- package/lib/typescript/plugins/expo/withCustomPod.d.ts.map +1 -0
- package/lib/typescript/plugins/expo/withTHEOplayer.d.ts +4 -0
- package/lib/typescript/plugins/expo/withTHEOplayer.d.ts.map +1 -0
- package/lib/typescript/plugins/expo/withTHEOplayerAndroid.d.ts +4 -0
- package/lib/typescript/plugins/expo/withTHEOplayerAndroid.d.ts.map +1 -0
- package/lib/typescript/plugins/expo/withTHEOplayerIOS.d.ts +4 -0
- package/lib/typescript/plugins/expo/withTHEOplayerIOS.d.ts.map +1 -0
- package/lib/typescript/plugins/typedoc-platform-icons/src/index.d.ts +3 -0
- package/lib/typescript/plugins/typedoc-platform-icons/src/index.d.ts.map +1 -0
- package/package.json +3 -3
- package/react-native-theoplayer.podspec +18 -8
- package/src/api/THEOplayerView.ts +1 -2
- package/src/api/abr/ABRConfiguration.ts +13 -12
- package/src/api/ads/Ad.ts +10 -3
- package/src/api/ads/AdBreak.ts +7 -0
- package/src/api/ads/AdsAPI.ts +6 -3
- package/src/api/ads/AdsConfiguration.ts +14 -5
- package/src/api/ads/CompanionAd.ts +1 -0
- package/src/api/ads/GoogleDai.ts +1 -0
- package/src/api/ads/GoogleImaAd.ts +3 -4
- package/src/api/ads/GoogleImaConfiguration.ts +7 -3
- package/src/api/ads/Omid.ts +16 -0
- package/src/api/backgroundAudio/BackgroundAudioConfiguration.ts +4 -2
- package/src/api/broadcast/EventBroadcastAPI.ts +1 -0
- package/src/api/cache/CachingPreferredTrackSelection.ts +1 -0
- package/src/api/cache/CachingTask.ts +5 -1
- package/src/api/cache/CachingTaskLicense.ts +7 -0
- package/src/api/cache/CachingTaskList.ts +7 -0
- package/src/api/cache/CachingTaskParameters.ts +13 -9
- package/src/api/cache/MediaCacheAPI.ts +2 -0
- package/src/api/cache/events/CacheEvent.ts +19 -2
- package/src/api/cache/events/CachingTaskEvent.ts +23 -0
- package/src/api/cache/hooks/useCachingTaskList.ts +6 -0
- package/src/api/cache/hooks/useCachingTaskProgress.ts +6 -0
- package/src/api/cache/hooks/useCachingTaskStatus.ts +6 -0
- package/src/api/cast/Airplay.ts +3 -2
- package/src/api/cast/CastAPI.ts +3 -1
- package/src/api/cast/CastConfiguration.ts +3 -0
- package/src/api/cast/CastState.ts +1 -0
- package/src/api/cast/Chromecast.ts +7 -0
- package/src/api/config/PlayerConfiguration.ts +15 -11
- package/src/api/drm/ContentProtectionAPI.ts +10 -0
- package/src/api/drm/ContentProtectionIntegration.ts +2 -1
- package/src/api/drm/ContentProtectionIntegrationFactory.ts +1 -0
- package/src/api/drm/ContentProtectionRequest.ts +5 -0
- package/src/api/drm/ContentProtectionResponse.ts +6 -0
- package/src/api/error/ChromecastError.ts +4 -0
- package/src/api/error/PlayerError.ts +7 -0
- package/src/api/event/AdEvent.ts +18 -8
- package/src/api/event/CastEvent.ts +35 -0
- package/src/api/event/Event.ts +2 -1
- package/src/api/event/EventDispatcher.ts +3 -1
- package/src/api/event/EventListener.ts +1 -0
- package/src/api/event/PlayerEvent.ts +107 -2
- package/src/api/event/TheoAdsEvent.ts +14 -0
- package/src/api/event/TrackEvent.ts +56 -0
- package/src/api/media/MediaControlConfiguration.ts +2 -4
- package/src/api/millicast/MillicastConnectOptions.ts +5 -1
- package/src/api/pip/PiPConfiguration.ts +11 -1
- package/src/api/playback/PlaybackSettingsAPI.ts +3 -6
- package/src/api/player/PlayerEventMap.ts +10 -0
- package/src/api/player/PlayerVersion.ts +6 -0
- package/src/api/player/THEOplayer.ts +15 -9
- package/src/api/presentation/PresentationMode.ts +0 -1
- package/src/api/source/SourceDescription.ts +29 -27
- package/src/api/source/ads/Ads.ts +8 -1
- package/src/api/source/ads/IMAAdDescription.ts +1 -0
- package/src/api/source/ads/THEOplayerAdDescription.ts +1 -0
- package/src/api/source/ads/TheoAdDescription.ts +4 -3
- package/src/api/source/ads/ssai/GoogleDAIConfiguration.ts +20 -1
- package/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts +12 -0
- package/src/api/source/analytics/AnalyticsDescription.ts +2 -0
- package/src/api/source/cmcd/CmcdConfiguration.ts +14 -10
- package/src/api/source/dash/DashPlaybackConfiguration.ts +12 -16
- package/src/api/source/drm/DRMConfiguration.ts +20 -0
- package/src/api/source/hls/HlsPlaybackConfiguration.ts +2 -3
- package/src/api/source/metadata/MetadataDescription.ts +1 -0
- package/src/api/theoads/TheoAdsAPI.ts +2 -2
- package/src/api/theoads/interstitial/AdBreakInterstitial.ts +5 -0
- package/src/api/theoads/interstitial/Interstitial.ts +2 -0
- package/src/api/theoads/interstitial/OverlayInterstitial.ts +3 -0
- package/src/api/theolive/TheoLiveConfiguration.ts +4 -8
- package/src/api/track/DateRangeCue.ts +4 -0
- package/src/api/track/MediaTrack.ts +25 -0
- package/src/api/track/Quality.ts +3 -0
- package/src/api/track/TextTrack.ts +79 -1
- package/src/api/track/TextTrackCue.ts +1 -0
- package/src/api/track/TextTrackStyle.ts +13 -9
- package/src/api/track/Track.ts +25 -0
- package/src/api/ui/UIConfiguration.ts +1 -0
- package/src/internal/adapter/DefaultNativePlayerState.ts +1 -0
- package/src/internal/adapter/THEOplayerAdapter.ts +5 -0
- package/src/internal/adapter/THEOplayerWebAdapter.ts +4 -0
- package/src/internal/cache/MediaCache.ts +6 -0
- package/src/internal/drm/ContentProtectionRegistry.ts +6 -0
- package/src/manifest.json +1 -1
- package/src/plugins/expo/Common.ts +20 -0
- package/src/plugins/expo/withCustomPod.ts +28 -0
- package/src/plugins/expo/withTHEOplayer.ts +11 -0
- package/src/plugins/expo/withTHEOplayerAndroid.ts +53 -0
- package/src/plugins/expo/withTHEOplayerIOS.ts +44 -0
- package/src/plugins/typedoc-platform-icons/package-lock.json +237 -0
- package/src/plugins/typedoc-platform-icons/package.json +20 -0
- package/src/plugins/typedoc-platform-icons/src/index.tsx +90 -0
- package/src/plugins/typedoc-platform-icons/tsconfig.json +24 -0
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import type { Track } from './Track';
|
|
2
2
|
import type { TextTrackCue } from './TextTrackCue';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The content type of a text track, represented by a value from the following list:
|
|
6
|
+
* <br/> - `'srt'`: The track contains SRT (SubRip Text) content.
|
|
7
|
+
* <br/> - `'ttml'`: The track contains TTML (Timed Text Markup Language) content.
|
|
8
|
+
* <br/> - `'webvtt'`: The track contains WebVTT (Web Video Text Tracks) content.
|
|
9
|
+
* <br/> - `'emsg'`: The track contains emsg (Event Message) content.
|
|
10
|
+
* <br/> - `'eventstream'`: The track contains Event Stream content.
|
|
11
|
+
* <br/> - `'id3'`: The track contains ID3 content.
|
|
12
|
+
* <br/> - `'cea608'`: The track contains CEA608 content.
|
|
13
|
+
* <br/> - `'daterange'`: The track contains HLS EXT-X-DATERANGE content.
|
|
14
|
+
*
|
|
15
|
+
* @category Media and Text Tracks
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
4
18
|
export enum TextTrackType {
|
|
5
19
|
cea608 = 'cea608',
|
|
6
20
|
id3 = 'id3',
|
|
@@ -12,6 +26,17 @@ export enum TextTrackType {
|
|
|
12
26
|
emsg = 'emsg',
|
|
13
27
|
}
|
|
14
28
|
|
|
29
|
+
/**
|
|
30
|
+
* The kind of the text track, represented by a value from the following list:
|
|
31
|
+
* <br/> - `'subtitles'`: The track contains subtitles.
|
|
32
|
+
* <br/> - `'captions'`: The track contains closed captions, a translation of dialogue and sound effects.
|
|
33
|
+
* <br/> - `'descriptions'`: The track contains descriptions, a textual description of the video.
|
|
34
|
+
* <br/> - `'chapters'`: The track contains chapter titles.
|
|
35
|
+
* <br/> - `'metadata'`: The track contains metadata. This track will not serve display purposes.
|
|
36
|
+
*
|
|
37
|
+
* @category Media and Text Tracks
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
15
40
|
export enum TextTrackKind {
|
|
16
41
|
captions = 'captions',
|
|
17
42
|
chapters = 'chapters',
|
|
@@ -21,12 +46,32 @@ export enum TextTrackKind {
|
|
|
21
46
|
thumbnails = 'thumbnails',
|
|
22
47
|
}
|
|
23
48
|
|
|
49
|
+
/**
|
|
50
|
+
* The mode of the text track, represented by a value from the following list:
|
|
51
|
+
* <br/> - `'disabled'`: The track is disabled.
|
|
52
|
+
* <br/> - `'hidden'`: The track is hidden.
|
|
53
|
+
* <br/> - `'showing'`: The track is showing.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* <br/> - A disabled track is not displayed and exposes no active cues, nor fires cue events.
|
|
57
|
+
* <br/> - A hidden track is not displayed but exposes active cues and fires cue events.
|
|
58
|
+
* <br/> - A showing track is displayed, exposes active cues and fires cue events.
|
|
59
|
+
*
|
|
60
|
+
* @category Media and Text Tracks
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
24
63
|
export enum TextTrackMode {
|
|
25
64
|
disabled = 'disabled',
|
|
26
65
|
showing = 'showing',
|
|
27
66
|
hidden = 'hidden',
|
|
28
67
|
}
|
|
29
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Represents a text track of a media resource.
|
|
71
|
+
*
|
|
72
|
+
* @category Media and Text Tracks
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
30
75
|
export interface TextTrack extends Track {
|
|
31
76
|
/**
|
|
32
77
|
* The kind of the text track, represented by a value from the following list:
|
|
@@ -101,7 +146,11 @@ export interface TextTrack extends Track {
|
|
|
101
146
|
|
|
102
147
|
/**
|
|
103
148
|
* Retain renderable tracks.
|
|
149
|
+
*
|
|
104
150
|
* https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-showing
|
|
151
|
+
*
|
|
152
|
+
* @category Media and Text Tracks
|
|
153
|
+
* @internal
|
|
105
154
|
*/
|
|
106
155
|
export function filterRenderableTracks(textTracks: TextTrack[] | undefined): TextTrack[] | undefined {
|
|
107
156
|
return textTracks && textTracks.filter((textTrack) => textTrack.kind === 'subtitles' || textTrack.kind === 'captions');
|
|
@@ -109,6 +158,9 @@ export function filterRenderableTracks(textTracks: TextTrack[] | undefined): Tex
|
|
|
109
158
|
|
|
110
159
|
/**
|
|
111
160
|
* Retain first thumbnail track encountered in the textTracks list.
|
|
161
|
+
*
|
|
162
|
+
* @category Media and Text Tracks
|
|
163
|
+
* @internal
|
|
112
164
|
*/
|
|
113
165
|
export function filterThumbnailTracks(textTracks: TextTrack[] | undefined): TextTrack | undefined {
|
|
114
166
|
return textTracks && textTracks.find(isThumbnailTrack);
|
|
@@ -116,27 +168,53 @@ export function filterThumbnailTracks(textTracks: TextTrack[] | undefined): Text
|
|
|
116
168
|
|
|
117
169
|
/**
|
|
118
170
|
* Query whether a track is a valid thumbnail track.
|
|
171
|
+
*
|
|
172
|
+
* @category Media and Text Tracks
|
|
173
|
+
* @internal
|
|
119
174
|
*/
|
|
120
175
|
export function isThumbnailTrack(textTrack: TextTrack | undefined): boolean {
|
|
121
176
|
return !!textTrack && (textTrack.kind === 'thumbnails' || (textTrack.kind === 'metadata' && textTrack.label === 'thumbnails'));
|
|
122
177
|
}
|
|
123
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Query whether a track is a given cue.
|
|
180
|
+
*
|
|
181
|
+
* @category Media and Text Tracks
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
124
184
|
export function hasTextTrackCue(textTrack: TextTrack, cue: TextTrackCue): boolean {
|
|
125
185
|
return !!(textTrack.cues && cue && textTrack.cues.find((c) => cue.uid === c.uid));
|
|
126
186
|
}
|
|
127
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Removes a cue from a text track.
|
|
190
|
+
*
|
|
191
|
+
* @category Media and Text Tracks
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
128
194
|
export function removeTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {
|
|
129
195
|
if (textTrack && textTrack.cues && cue && hasTextTrackCue(textTrack, cue)) {
|
|
130
196
|
textTrack.cues = textTrack.cues.filter((c) => c.uid !== cue.uid);
|
|
131
197
|
}
|
|
132
198
|
}
|
|
133
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Adds a cue to a text track.
|
|
202
|
+
*
|
|
203
|
+
* @category Media and Text Tracks
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
134
206
|
export function addTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {
|
|
135
207
|
if (textTrack && textTrack.cues && cue && !hasTextTrackCue(textTrack, cue)) {
|
|
136
208
|
textTrack.cues.push(cue);
|
|
137
209
|
}
|
|
138
210
|
}
|
|
139
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Returns a cue from a text track by uid.
|
|
214
|
+
*
|
|
215
|
+
* @category Media and Text Tracks
|
|
216
|
+
* @internal
|
|
217
|
+
*/
|
|
140
218
|
export function findTextTrackByUid(textTracks: TextTrack[], uid: number): TextTrack | undefined {
|
|
141
219
|
return textTracks.find((t) => t.uid === uid);
|
|
142
220
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The text track style API.
|
|
3
3
|
*
|
|
4
|
+
* @category Media and Text Tracks
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
|
6
7
|
export interface TextTrackStyle {
|
|
@@ -15,7 +16,7 @@ export interface TextTrackStyle {
|
|
|
15
16
|
* @example
|
|
16
17
|
* <br/> - `red` will set the color of the text to red.
|
|
17
18
|
* <br/> - `#ff0000` will set the color of the text to red.
|
|
18
|
-
* <br/> - Available
|
|
19
|
+
* <br/> - Available for Web only: `rgba(255,0,0,0.5)` will set the color of the text to red, with 50% opacity.
|
|
19
20
|
*/
|
|
20
21
|
fontColor: string | undefined;
|
|
21
22
|
|
|
@@ -36,21 +37,22 @@ export interface TextTrackStyle {
|
|
|
36
37
|
* @example
|
|
37
38
|
* <br/> - `red` will set the background color of the text track to red.
|
|
38
39
|
* <br/> - `#ff0000` will set the background color of the text track to red.
|
|
39
|
-
* <br/> - Available
|
|
40
|
+
* <br/> - Available for Web only: `rgba(255,0,0,0.5)` will set the background color of the text track to red, with 50% opacity.
|
|
40
41
|
*/
|
|
41
42
|
backgroundColor: string | undefined;
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* The window color for the text track.
|
|
45
46
|
*
|
|
47
|
+
* @platform web,android
|
|
48
|
+
*
|
|
46
49
|
* @remarks
|
|
47
50
|
* <br/> - This targets the area covering the full width of the text track.
|
|
48
|
-
* <br/> - Available on Web and Android only.
|
|
49
51
|
*
|
|
50
52
|
* @example
|
|
51
53
|
* <br/> - `red` will set the background color of the window of the text track to red.
|
|
52
54
|
* <br/> - `#ff0000` will set the background color of the window of the text track to red.
|
|
53
|
-
* <br/> - Available
|
|
55
|
+
* <br/> - Available for Web only: `rgba(255,0,0,0.5)` will set the background color of the window of the text track to red, with 50% opacity.
|
|
54
56
|
*/
|
|
55
57
|
windowColor: string | undefined;
|
|
56
58
|
|
|
@@ -60,15 +62,14 @@ export interface TextTrackStyle {
|
|
|
60
62
|
* <br/> - `'dropshadow'`
|
|
61
63
|
* <br/> - `'raised'`
|
|
62
64
|
* <br/> - `'depressed'`
|
|
63
|
-
* <br/> - `'uniform`
|
|
65
|
+
* <br/> - `'uniform'`
|
|
64
66
|
*/
|
|
65
67
|
edgeStyle: EdgeStyle | undefined;
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
70
|
* The edge color for the text track.
|
|
69
71
|
*
|
|
70
|
-
* @
|
|
71
|
-
* <br/> - Available on Android only.
|
|
72
|
+
* @platform android
|
|
72
73
|
*/
|
|
73
74
|
edgeColor: string | undefined;
|
|
74
75
|
|
|
@@ -83,9 +84,10 @@ export interface TextTrackStyle {
|
|
|
83
84
|
/**
|
|
84
85
|
* The bottom margin of the area where subtitles are being rendered.
|
|
85
86
|
*
|
|
87
|
+
* @platform web,android
|
|
88
|
+
*
|
|
86
89
|
* @remarks
|
|
87
90
|
* <br/> - The margin is in number of pixels.
|
|
88
|
-
* <br/> - Available on Web only.
|
|
89
91
|
*/
|
|
90
92
|
marginBottom: number | undefined;
|
|
91
93
|
/**
|
|
@@ -98,10 +100,11 @@ export interface TextTrackStyle {
|
|
|
98
100
|
/**
|
|
99
101
|
* The right margin of the area where subtitles are being rendered.
|
|
100
102
|
*
|
|
103
|
+
* @platform web,android
|
|
104
|
+
*
|
|
101
105
|
* @remarks
|
|
102
106
|
* <br/> - The margin is in number of pixels.
|
|
103
107
|
* <br/> - Useful for pushing the subtitles left, so they don't overlap with the UI.
|
|
104
|
-
* <br/> - Available on Web only.
|
|
105
108
|
*/
|
|
106
109
|
marginRight: number | undefined;
|
|
107
110
|
}
|
|
@@ -114,6 +117,7 @@ export interface TextTrackStyle {
|
|
|
114
117
|
* <br/> - `'depressed'`
|
|
115
118
|
* <br/> - `'uniform'`
|
|
116
119
|
*
|
|
120
|
+
* @category Media and Text Tracks
|
|
117
121
|
* @public
|
|
118
122
|
*/
|
|
119
123
|
export enum EdgeStyle {
|
package/src/api/track/Track.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @remarks
|
|
5
5
|
* <br/> - A specific track type (e.g. {@link TextTrack}) will always be used.
|
|
6
6
|
*
|
|
7
|
+
* @category Media and Text Tracks
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
10
|
export interface Track {
|
|
@@ -46,18 +47,42 @@ export interface Track {
|
|
|
46
47
|
readonly language: string;
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Checks whether a track list contains a given track.
|
|
52
|
+
*
|
|
53
|
+
* @category Media and Text Tracks
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
49
56
|
export function hasTrack<TTrack extends Track>(trackList: TTrack[], track: TTrack): boolean {
|
|
50
57
|
return !!(trackList && track && trackList.find((t) => t.uid === track.uid));
|
|
51
58
|
}
|
|
52
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Removes a track from a track list.
|
|
62
|
+
*
|
|
63
|
+
* @category Media and Text Tracks
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
53
66
|
export function removeTrack<TTrack extends Track>(trackList: TTrack[], track: TTrack): TTrack[] {
|
|
54
67
|
return trackList && track ? trackList.filter((t) => t.uid !== track.uid) : trackList;
|
|
55
68
|
}
|
|
56
69
|
|
|
70
|
+
/**
|
|
71
|
+
* Adds a track to a track list.
|
|
72
|
+
*
|
|
73
|
+
* @category Media and Text Tracks
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
57
76
|
export function addTrack<TTrack extends Track>(trackList: TTrack[], track: TTrack): TTrack[] {
|
|
58
77
|
return trackList && track && !hasTrack(trackList, track) ? sortTracks([...trackList, track]) : trackList;
|
|
59
78
|
}
|
|
60
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Sort a track list based on the track's uids, which is how they are listed in the manifest.
|
|
82
|
+
*
|
|
83
|
+
* @category Media and Text Tracks
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
61
86
|
export function sortTracks<TTrack extends Track>(trackList?: TTrack[]): TTrack[] {
|
|
62
87
|
return trackList?.sort((t1: TTrack, t2: TTrack) => t1.uid - t2.uid) || [];
|
|
63
88
|
}
|
|
@@ -25,6 +25,7 @@ export class DefaultNativePlayerState extends DefaultTextTrackState implements N
|
|
|
25
25
|
seeking = false;
|
|
26
26
|
volume = 1;
|
|
27
27
|
currentTime = 0;
|
|
28
|
+
currentProgramDateTime: number | undefined = undefined;
|
|
28
29
|
duration = NaN;
|
|
29
30
|
playbackRate = 1;
|
|
30
31
|
preload: PreloadType = 'none';
|
|
@@ -108,6 +108,7 @@ export class THEOplayerAdapter extends DefaultEventDispatcher<PlayerEventMap> im
|
|
|
108
108
|
|
|
109
109
|
private onTimeupdate = (event: TimeUpdateEvent) => {
|
|
110
110
|
this._state.currentTime = event.currentTime;
|
|
111
|
+
this._state.currentProgramDateTime = event.currentProgramDateTime;
|
|
111
112
|
};
|
|
112
113
|
|
|
113
114
|
private onResize = (event: ResizeEvent) => {
|
|
@@ -267,6 +268,10 @@ export class THEOplayerAdapter extends DefaultEventDispatcher<PlayerEventMap> im
|
|
|
267
268
|
NativePlayerModule.setCurrentTime(this._view.nativeHandle, seekTime);
|
|
268
269
|
}
|
|
269
270
|
|
|
271
|
+
get currentProgramDateTime(): number | undefined {
|
|
272
|
+
return this._state.currentProgramDateTime;
|
|
273
|
+
}
|
|
274
|
+
|
|
270
275
|
get duration(): number {
|
|
271
276
|
return this._state.duration;
|
|
272
277
|
}
|
|
@@ -327,6 +327,10 @@ export class THEOplayerWebAdapter extends DefaultEventDispatcher<PlayerEventMap>
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
get currentProgramDateTime(): number | undefined {
|
|
331
|
+
return this._player?.currentProgramDateTime?.getTime();
|
|
332
|
+
}
|
|
333
|
+
|
|
330
334
|
get aspectRatio(): AspectRatio {
|
|
331
335
|
return AspectRatio.FIT;
|
|
332
336
|
}
|
|
@@ -150,4 +150,10 @@ export class NativeMediaCache extends DefaultEventDispatcher<CacheEventMap> impl
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* The media cache API.
|
|
155
|
+
*
|
|
156
|
+
* @category Caching
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
153
159
|
export const MediaCache: MediaCacheAPI = new NativeMediaCache();
|
|
@@ -172,4 +172,10 @@ export class NativeContentProtectionRegistry implements ContentProtectionAPI {
|
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
/**
|
|
176
|
+
* The registry for adding custom content protection (DRM) integrations.
|
|
177
|
+
*
|
|
178
|
+
* @category Content Protection
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
175
181
|
export const ContentProtectionRegistry: ContentProtectionAPI = new NativeContentProtectionRegistry();
|
package/src/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"9.
|
|
1
|
+
{"version":"9.5.0","buildDate":"2025-06-20T10:02:00.763Z"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Extension = 'ima' | 'dai' | 'cast' | 'theoads' | 'millicast' | 'sideloaded-texttracks';
|
|
2
|
+
|
|
3
|
+
export interface THEOplayerPluginAndroidProps {
|
|
4
|
+
extensions?: Extension[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface THEOplayerPluginIOSProps {
|
|
8
|
+
extensions?: Extension[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface THEOplayerPluginProps {
|
|
12
|
+
// Top-level extensions
|
|
13
|
+
extensions?: Extension[];
|
|
14
|
+
|
|
15
|
+
// Per-platform extensions, specific for Android
|
|
16
|
+
android?: THEOplayerPluginAndroidProps;
|
|
17
|
+
|
|
18
|
+
// Per-platform extensions, specific for iOS
|
|
19
|
+
ios?: THEOplayerPluginIOSProps;
|
|
20
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { withDangerousMod } from '@expo/config-plugins';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Add a custom pod-line to Podfile.
|
|
7
|
+
*/
|
|
8
|
+
function addPodToPodfile(contents: string, podLine: string) {
|
|
9
|
+
const lines = contents.split('\n');
|
|
10
|
+
const targetIndex = lines.findIndex((line: string) => line.trim().startsWith("target '")) + 1;
|
|
11
|
+
if (targetIndex > 0 && !lines.includes(podLine)) {
|
|
12
|
+
lines.splice(targetIndex, 0, podLine);
|
|
13
|
+
}
|
|
14
|
+
return lines.join('\n');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const withCustomPod = (config: any, podLine: string) => {
|
|
18
|
+
return withDangerousMod(config, [
|
|
19
|
+
'ios',
|
|
20
|
+
async (config) => {
|
|
21
|
+
const podfilePath = path.join(config.modRequest.projectRoot, 'ios', 'Podfile');
|
|
22
|
+
const contents = fs.readFileSync(podfilePath, 'utf8');
|
|
23
|
+
const newContents = addPodToPodfile(contents, podLine);
|
|
24
|
+
fs.writeFileSync(podfilePath, newContents);
|
|
25
|
+
return config;
|
|
26
|
+
},
|
|
27
|
+
]);
|
|
28
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
import { withTHEOplayerAndroid } from './withTHEOplayerAndroid';
|
|
3
|
+
import { withTHEOplayerIOS } from './withTHEOplayerIOS';
|
|
4
|
+
|
|
5
|
+
const withTHEOplayerWrapper: ConfigPlugin = (config, props: any) => {
|
|
6
|
+
config = withTHEOplayerAndroid(config, props);
|
|
7
|
+
config = withTHEOplayerIOS(config, props);
|
|
8
|
+
return config;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default withTHEOplayerWrapper;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ConfigPlugin, withProjectBuildGradle, withGradleProperties } from '@expo/config-plugins';
|
|
2
|
+
import { PropertiesItem } from '@expo/config-plugins/build/android/Properties';
|
|
3
|
+
import { THEOplayerPluginProps, Extension } from './Common';
|
|
4
|
+
|
|
5
|
+
function mapAndroidExtensionKey(ext: Extension): string | undefined {
|
|
6
|
+
switch (ext) {
|
|
7
|
+
case 'ima':
|
|
8
|
+
return 'THEOplayer_extensionGoogleIMA';
|
|
9
|
+
case 'dai':
|
|
10
|
+
return 'THEOplayer_extensionGoogleDAI';
|
|
11
|
+
case 'cast':
|
|
12
|
+
return 'THEOplayer_extensionCast';
|
|
13
|
+
case 'theoads':
|
|
14
|
+
return 'THEOplayer_extensionTHEOads';
|
|
15
|
+
case 'millicast':
|
|
16
|
+
return 'THEOplayer_extensionMillicast';
|
|
17
|
+
default:
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const applyAndroidExtensions: ConfigPlugin<THEOplayerPluginProps['extensions']> = (config, extensions) => {
|
|
23
|
+
return withGradleProperties(config, (config) => {
|
|
24
|
+
extensions?.forEach((ext) => {
|
|
25
|
+
const key = mapAndroidExtensionKey(ext);
|
|
26
|
+
if (key) {
|
|
27
|
+
const prop: PropertiesItem = { type: 'property', key, value: 'true' };
|
|
28
|
+
config.modResults.push(prop);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return config;
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const withTHEOplayerAndroid: ConfigPlugin<THEOplayerPluginProps> = (config, props = {}) => {
|
|
36
|
+
const { extensions, android } = props;
|
|
37
|
+
|
|
38
|
+
// Apply Android extensions
|
|
39
|
+
config = applyAndroidExtensions(config, android?.extensions ?? extensions);
|
|
40
|
+
|
|
41
|
+
// Add THEOplayer and local Maven repos to the project's repositories
|
|
42
|
+
return withProjectBuildGradle(config, (config) => {
|
|
43
|
+
const localMaven = 'maven { url("$rootDir/../node_modules/react-native-theoplayer/android/local") }';
|
|
44
|
+
const THEOplayerMaven = 'maven { url("https://maven.theoplayer.com/releases") }';
|
|
45
|
+
|
|
46
|
+
config.modResults.contents = config.modResults.contents.replace(
|
|
47
|
+
/allprojects\s*\{\s*repositories\s*\{/,
|
|
48
|
+
`$&\n\t\t${localMaven}\n\t\t${THEOplayerMaven}`,
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return config;
|
|
52
|
+
});
|
|
53
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
import { Extension, THEOplayerPluginProps } from './Common';
|
|
3
|
+
import { withCustomPod } from './withCustomPod';
|
|
4
|
+
|
|
5
|
+
const CAST_POD_LINE = ` pod 'react-native-google-cast', :git => 'https://github.com/Danesz/react-native-google-cast.git', branch: 'feature/guestmode_apple_silicon'`;
|
|
6
|
+
|
|
7
|
+
function mapIOSExtensionKey(ext: Extension): string | undefined {
|
|
8
|
+
switch (ext) {
|
|
9
|
+
case 'ima':
|
|
10
|
+
return 'GOOGLE_IMA';
|
|
11
|
+
case 'cast':
|
|
12
|
+
return 'CHROMECAST';
|
|
13
|
+
case 'theoads':
|
|
14
|
+
return 'THEO_ADS';
|
|
15
|
+
case 'millicast':
|
|
16
|
+
return 'MILLICAST';
|
|
17
|
+
case 'sideloaded-texttracks':
|
|
18
|
+
return 'SIDELOADED_TEXTTRACKS';
|
|
19
|
+
default:
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const applyIOSExtensions: ConfigPlugin<THEOplayerPluginProps['extensions']> = (config, extensions) => {
|
|
25
|
+
const iosFeatures = extensions?.map(mapIOSExtensionKey)?.filter((f): f is string => !!f);
|
|
26
|
+
|
|
27
|
+
if (iosFeatures?.length ?? 0 > 0) {
|
|
28
|
+
const featureList = iosFeatures?.join(',');
|
|
29
|
+
console.log(`Setting THEO_FEATURES="${featureList}"`);
|
|
30
|
+
process.env.THEO_FEATURES = featureList;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Align react-native-google-cast dependency
|
|
34
|
+
if (extensions?.includes('cast')) {
|
|
35
|
+
config = withCustomPod(config, CAST_POD_LINE);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return config;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const withTHEOplayerIOS: ConfigPlugin<THEOplayerPluginProps> = (config, props = {}) => {
|
|
42
|
+
const { extensions, ios } = props;
|
|
43
|
+
return applyIOSExtensions(config, ios?.extensions ?? extensions);
|
|
44
|
+
};
|