react-native-theoplayer 9.4.0 → 9.6.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 +18 -0
- package/README.md +3 -2
- package/android/build.gradle +125 -155
- package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +5 -0
- package/android/src/main/java/com/theoplayer/presentation/PresentationManager.kt +1 -4
- package/ios/THEOplayerRCTTrackMetadataAggregator.swift +4 -0
- 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/cache/CachingTask.js +2 -0
- package/lib/commonjs/api/cache/CachingTask.js.map +1 -1
- package/lib/commonjs/api/cache/CachingTaskParameters.js +3 -0
- 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 +17 -0
- 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 +6 -4
- package/lib/commonjs/plugins/expo/withTHEOplayer.js.map +1 -1
- package/lib/commonjs/plugins/expo/withTHEOplayerAndroid.js +6 -5
- package/lib/commonjs/plugins/expo/withTHEOplayerAndroid.js.map +1 -1
- package/lib/commonjs/plugins/expo/withTHEOplayerIOS.js +47 -0
- package/lib/commonjs/plugins/expo/withTHEOplayerIOS.js.map +1 -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/cache/CachingTask.js +2 -0
- package/lib/module/api/cache/CachingTask.js.map +1 -1
- package/lib/module/api/cache/CachingTaskParameters.js +3 -0
- 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 +18 -0
- 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 +7 -5
- package/lib/module/plugins/expo/withTHEOplayer.js.map +1 -1
- package/lib/module/plugins/expo/withTHEOplayerAndroid.js +4 -3
- package/lib/module/plugins/expo/withTHEOplayerAndroid.js.map +1 -1
- package/lib/module/plugins/expo/withTHEOplayerIOS.js +42 -0
- package/lib/module/plugins/expo/withTHEOplayerIOS.js.map +1 -0
- package/lib/typescript/api/abr/ABRConfiguration.d.ts +5 -0
- 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 +9 -0
- 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 +1 -0
- package/lib/typescript/api/ads/GoogleImaAd.d.ts.map +1 -1
- package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts +9 -0
- package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/ads/Omid.d.ts +15 -0
- package/lib/typescript/api/ads/Omid.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 +2 -0
- 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 +3 -0
- 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 +6 -0
- 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 +14 -0
- 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 +106 -0
- 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/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 +9 -0
- 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 +17 -0
- package/lib/typescript/api/source/SourceDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/Ads.d.ts +8 -0
- 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 +1 -0
- package/lib/typescript/api/source/ads/TheoAdDescription.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +18 -0
- 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 +9 -0
- package/lib/typescript/api/source/cmcd/CmcdConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/dash/DashPlaybackConfiguration.d.ts +2 -0
- 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 -0
- 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 +1 -0
- package/lib/typescript/api/theoads/TheoAdsAPI.d.ts.map +1 -1
- 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/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 +31 -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 +85 -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 +2 -0
- 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 +2 -2
- package/lib/typescript/plugins/expo/withTHEOplayer.d.ts.map +1 -1
- package/lib/typescript/plugins/expo/withTHEOplayerAndroid.d.ts +2 -6
- package/lib/typescript/plugins/expo/withTHEOplayerAndroid.d.ts.map +1 -1
- package/lib/typescript/plugins/expo/withTHEOplayerIOS.d.ts +4 -0
- package/lib/typescript/plugins/expo/withTHEOplayerIOS.d.ts.map +1 -0
- package/package.json +1 -1
- package/react-native-theoplayer.podspec +25 -15
- package/src/api/abr/ABRConfiguration.ts +5 -0
- 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 +9 -0
- package/src/api/ads/CompanionAd.ts +1 -0
- package/src/api/ads/GoogleDai.ts +1 -0
- package/src/api/ads/GoogleImaAd.ts +1 -0
- package/src/api/ads/GoogleImaConfiguration.ts +11 -0
- package/src/api/ads/Omid.ts +15 -0
- package/src/api/broadcast/EventBroadcastAPI.ts +1 -0
- package/src/api/cache/CachingPreferredTrackSelection.ts +1 -0
- package/src/api/cache/CachingTask.ts +3 -0
- package/src/api/cache/CachingTaskLicense.ts +7 -0
- package/src/api/cache/CachingTaskList.ts +7 -0
- package/src/api/cache/CachingTaskParameters.ts +3 -0
- 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 +6 -0
- 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 +14 -0
- 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 +106 -0
- package/src/api/event/TheoAdsEvent.ts +14 -0
- package/src/api/event/TrackEvent.ts +56 -0
- package/src/api/player/PlayerEventMap.ts +10 -0
- package/src/api/player/PlayerVersion.ts +6 -0
- package/src/api/player/THEOplayer.ts +10 -0
- package/src/api/presentation/PresentationMode.ts +0 -1
- package/src/api/source/SourceDescription.ts +17 -0
- package/src/api/source/ads/Ads.ts +8 -0
- 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 +1 -0
- package/src/api/source/ads/ssai/GoogleDAIConfiguration.ts +18 -0
- 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 +9 -0
- package/src/api/source/dash/DashPlaybackConfiguration.ts +2 -0
- package/src/api/source/drm/DRMConfiguration.ts +20 -0
- package/src/api/source/hls/HlsPlaybackConfiguration.ts +2 -0
- package/src/api/source/metadata/MetadataDescription.ts +1 -0
- package/src/api/theoads/TheoAdsAPI.ts +1 -0
- 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/track/DateRangeCue.ts +4 -0
- package/src/api/track/MediaTrack.ts +32 -0
- package/src/api/track/Quality.ts +3 -0
- package/src/api/track/TextTrack.ts +86 -1
- package/src/api/track/TextTrackCue.ts +1 -0
- package/src/api/track/TextTrackStyle.ts +2 -0
- 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 +7 -5
- package/src/plugins/expo/withTHEOplayerAndroid.ts +4 -9
- package/src/plugins/expo/withTHEOplayerIOS.ts +44 -0
|
@@ -4,6 +4,9 @@ import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertion
|
|
|
4
4
|
/**
|
|
5
5
|
* The identifier of the Google DAI integration.
|
|
6
6
|
*
|
|
7
|
+
* @category Ads
|
|
8
|
+
* @category SSAI
|
|
9
|
+
* @category Source
|
|
7
10
|
* @public
|
|
8
11
|
*/
|
|
9
12
|
export type GoogleDAISSAIIntegrationID = 'google-dai';
|
|
@@ -13,6 +16,9 @@ export type GoogleDAISSAIIntegrationID = 'google-dai';
|
|
|
13
16
|
* <br/> - `'live'`: The requested stream is a live stream.
|
|
14
17
|
* <br/> - `'vod'`: The requested stream is a video-on-demand stream.
|
|
15
18
|
*
|
|
19
|
+
* @category Ads
|
|
20
|
+
* @category SSAI
|
|
21
|
+
* @category Source
|
|
16
22
|
* @public
|
|
17
23
|
*/
|
|
18
24
|
export type DAIAvailabilityType = 'vod' | 'live';
|
|
@@ -20,6 +26,9 @@ export type DAIAvailabilityType = 'vod' | 'live';
|
|
|
20
26
|
/**
|
|
21
27
|
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration.
|
|
22
28
|
*
|
|
29
|
+
* @category Ads
|
|
30
|
+
* @category SSAI
|
|
31
|
+
* @category Source
|
|
23
32
|
* @public
|
|
24
33
|
*/
|
|
25
34
|
export interface GoogleDAIConfiguration extends ServerSideAdInsertionConfiguration {
|
|
@@ -83,6 +92,9 @@ export interface GoogleDAIConfiguration extends ServerSideAdInsertionConfigurati
|
|
|
83
92
|
/**
|
|
84
93
|
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a Live media stream.
|
|
85
94
|
*
|
|
95
|
+
* @category Ads
|
|
96
|
+
* @category SSAI
|
|
97
|
+
* @category Source
|
|
86
98
|
* @public
|
|
87
99
|
*/
|
|
88
100
|
export interface GoogleDAILiveConfiguration extends GoogleDAIConfiguration {
|
|
@@ -104,6 +116,9 @@ export interface GoogleDAILiveConfiguration extends GoogleDAIConfiguration {
|
|
|
104
116
|
/**
|
|
105
117
|
* Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a VOD media stream.
|
|
106
118
|
*
|
|
119
|
+
* @category Ads
|
|
120
|
+
* @category SSAI
|
|
121
|
+
* @category Source
|
|
107
122
|
* @public
|
|
108
123
|
*/
|
|
109
124
|
export interface GoogleDAIVodConfiguration extends GoogleDAIConfiguration {
|
|
@@ -133,6 +148,9 @@ export interface GoogleDAIVodConfiguration extends GoogleDAIConfiguration {
|
|
|
133
148
|
/**
|
|
134
149
|
* Represents a media resource with a Google DAI server-side ad insertion request.
|
|
135
150
|
*
|
|
151
|
+
* @category Ads
|
|
152
|
+
* @category SSAI
|
|
153
|
+
* @category Source
|
|
136
154
|
* @public
|
|
137
155
|
*/
|
|
138
156
|
export interface GoogleDAITypedSource extends TypedSource {
|
|
@@ -3,14 +3,26 @@ import type { GoogleDAISSAIIntegrationID } from './GoogleDAIConfiguration';
|
|
|
3
3
|
/**
|
|
4
4
|
* The identifier of a server-side ad insertion pre-integration, represented by a string value.
|
|
5
5
|
*
|
|
6
|
+
* @category Ads
|
|
7
|
+
* @category SSAI
|
|
6
8
|
* @public
|
|
7
9
|
*/
|
|
8
10
|
export type SSAIIntegrationId = GoogleDAISSAIIntegrationID | CustomSSAIIntegrationId;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The identifier of a custom server-side ad insertion, represented by a string value.
|
|
14
|
+
*
|
|
15
|
+
* @category Ads
|
|
16
|
+
* @category SSAI
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
9
19
|
export type CustomSSAIIntegrationId = string;
|
|
10
20
|
|
|
11
21
|
/**
|
|
12
22
|
* Represents a configuration for server-side ad insertion (SSAI).
|
|
13
23
|
*
|
|
24
|
+
* @category Ads
|
|
25
|
+
* @category SSAI
|
|
14
26
|
* @public
|
|
15
27
|
*/
|
|
16
28
|
export interface ServerSideAdInsertionConfiguration {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The configuration for transmitting information to Content Delivery Networks (CDNs)
|
|
3
3
|
* through Common Media Client Data (CMCD) (CTA-5004)
|
|
4
|
+
*
|
|
5
|
+
* @category Source
|
|
6
|
+
* @public
|
|
4
7
|
*/
|
|
5
8
|
export interface CmcdConfiguration {
|
|
6
9
|
/**
|
|
@@ -50,6 +53,12 @@ export interface CmcdConfiguration {
|
|
|
50
53
|
transmissionMode: CmcdTransmissionMode
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
/**
|
|
57
|
+
* The CMCD transmission mode.
|
|
58
|
+
*
|
|
59
|
+
* @category Source
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
53
62
|
export enum CmcdTransmissionMode {
|
|
54
63
|
/**
|
|
55
64
|
* Transmit CMCD data as a custom HTTP request header.
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Use this if you notice that the player never preloads the next period, even though you know that the current platform
|
|
9
9
|
* should support it.
|
|
10
10
|
*
|
|
11
|
+
* @category Source
|
|
11
12
|
* @public
|
|
12
13
|
*/
|
|
13
14
|
export type SeamlessPeriodSwitchStrategy = 'auto' | 'always' | 'never';
|
|
@@ -15,6 +16,7 @@ export type SeamlessPeriodSwitchStrategy = 'auto' | 'always' | 'never';
|
|
|
15
16
|
/**
|
|
16
17
|
* Represents a configuration for controlling playback of an MPEG-DASH stream.
|
|
17
18
|
*
|
|
19
|
+
* @category Source
|
|
18
20
|
* @public
|
|
19
21
|
*/
|
|
20
22
|
export interface DashPlaybackConfiguration {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Describes the key system configuration.
|
|
3
3
|
*
|
|
4
|
+
* @category Content Protection
|
|
5
|
+
* @category Source
|
|
4
6
|
* @public
|
|
5
7
|
*/
|
|
6
8
|
export interface KeySystemConfiguration {
|
|
@@ -99,6 +101,8 @@ export interface KeySystemConfiguration {
|
|
|
99
101
|
* <br/> - `'temporary'`
|
|
100
102
|
* <br/> - `'persistent'`
|
|
101
103
|
*
|
|
104
|
+
* @category Content Protection
|
|
105
|
+
* @category Source
|
|
102
106
|
* @public
|
|
103
107
|
*/
|
|
104
108
|
export type LicenseType = 'temporary' | 'persistent';
|
|
@@ -106,6 +110,8 @@ export type LicenseType = 'temporary' | 'persistent';
|
|
|
106
110
|
/**
|
|
107
111
|
* Describes the FairPlay key system configuration.
|
|
108
112
|
*
|
|
113
|
+
* @category Content Protection
|
|
114
|
+
* @category Source
|
|
109
115
|
* @public
|
|
110
116
|
*/
|
|
111
117
|
export interface FairPlayKeySystemConfiguration extends KeySystemConfiguration {
|
|
@@ -118,6 +124,8 @@ export interface FairPlayKeySystemConfiguration extends KeySystemConfiguration {
|
|
|
118
124
|
/**
|
|
119
125
|
* Describes the PlayReady key system configuration.
|
|
120
126
|
*
|
|
127
|
+
* @category Content Protection
|
|
128
|
+
* @category Source
|
|
121
129
|
* @public
|
|
122
130
|
*/
|
|
123
131
|
export interface PlayReadyKeySystemConfiguration extends KeySystemConfiguration {
|
|
@@ -130,6 +138,8 @@ export interface PlayReadyKeySystemConfiguration extends KeySystemConfiguration
|
|
|
130
138
|
/**
|
|
131
139
|
* Describes the Widevine key system configuration.
|
|
132
140
|
*
|
|
141
|
+
* @category Content Protection
|
|
142
|
+
* @category Source
|
|
133
143
|
* @public
|
|
134
144
|
*/
|
|
135
145
|
export type WidevineKeySystemConfiguration = KeySystemConfiguration;
|
|
@@ -137,6 +147,8 @@ export type WidevineKeySystemConfiguration = KeySystemConfiguration;
|
|
|
137
147
|
/**
|
|
138
148
|
* Describes the ClearKey key system configuration.
|
|
139
149
|
*
|
|
150
|
+
* @category Content Protection
|
|
151
|
+
* @category Source
|
|
140
152
|
* @public
|
|
141
153
|
*/
|
|
142
154
|
export interface ClearkeyKeySystemConfiguration extends KeySystemConfiguration {
|
|
@@ -149,6 +161,8 @@ export interface ClearkeyKeySystemConfiguration extends KeySystemConfiguration {
|
|
|
149
161
|
/**
|
|
150
162
|
* Describes the ClearKey decryption key.
|
|
151
163
|
*
|
|
164
|
+
* @category Content Protection
|
|
165
|
+
* @category Source
|
|
152
166
|
* @public
|
|
153
167
|
*/
|
|
154
168
|
export interface ClearkeyDecryptionKey {
|
|
@@ -174,6 +188,8 @@ export interface ClearkeyDecryptionKey {
|
|
|
174
188
|
/**
|
|
175
189
|
* Describes the AES128 key system configuration.
|
|
176
190
|
*
|
|
191
|
+
* @category Content Protection
|
|
192
|
+
* @category Source
|
|
177
193
|
* @public
|
|
178
194
|
*/
|
|
179
195
|
export interface AES128KeySystemConfiguration {
|
|
@@ -191,6 +207,8 @@ export interface AES128KeySystemConfiguration {
|
|
|
191
207
|
/**
|
|
192
208
|
* Describes the configuration of the DRM.
|
|
193
209
|
*
|
|
210
|
+
* @category Content Protection
|
|
211
|
+
* @category Source
|
|
194
212
|
* @public
|
|
195
213
|
*/
|
|
196
214
|
export interface DRMConfiguration {
|
|
@@ -247,6 +265,8 @@ export interface DRMConfiguration {
|
|
|
247
265
|
/**
|
|
248
266
|
* The id of a key system. Possible values are 'widevine', 'fairplay' and 'playready'.
|
|
249
267
|
*
|
|
268
|
+
* @category Content Protection
|
|
269
|
+
* @category Source
|
|
250
270
|
* @public
|
|
251
271
|
*/
|
|
252
272
|
export type KeySystemId = 'widevine' | 'fairplay' | 'playready';
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* @remarks
|
|
17
17
|
* <br/> - See {@link HlsPlaybackConfiguration.discontinuityAlignment}.
|
|
18
18
|
*
|
|
19
|
+
* @category Source
|
|
19
20
|
* @public
|
|
20
21
|
*/
|
|
21
22
|
export type HlsDiscontinuityAlignment = 'auto' | 'playlist' | 'media';
|
|
@@ -23,6 +24,7 @@ export type HlsDiscontinuityAlignment = 'auto' | 'playlist' | 'media';
|
|
|
23
24
|
/**
|
|
24
25
|
* Represents a configuration for controlling playback of an MPEG-DASH stream.
|
|
25
26
|
*
|
|
27
|
+
* @category Source
|
|
26
28
|
* @public
|
|
27
29
|
*/
|
|
28
30
|
export interface HlsPlaybackConfiguration {
|
|
@@ -4,12 +4,17 @@ import { Interstitial } from './Interstitial';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The layout of the THEOad.
|
|
7
|
+
*
|
|
8
|
+
* @category Ads
|
|
9
|
+
* @category THEOads
|
|
10
|
+
* @public
|
|
7
11
|
*/
|
|
8
12
|
export type TheoAdsLayout = 'single' | 'l-shape' | 'double';
|
|
9
13
|
|
|
10
14
|
/**
|
|
11
15
|
* The THEOads interstitial that corresponds with ad playback.
|
|
12
16
|
*
|
|
17
|
+
* @category Ads
|
|
13
18
|
* @category THEOads
|
|
14
19
|
* @public
|
|
15
20
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The type of the interstitial.
|
|
3
3
|
*
|
|
4
|
+
* @category Ads
|
|
4
5
|
* @category THEOads
|
|
5
6
|
* @public
|
|
6
7
|
*/
|
|
@@ -9,6 +10,7 @@ export type InterstitialType = 'adbreak' | 'overlay';
|
|
|
9
10
|
/**
|
|
10
11
|
* The THEOads interstitial.
|
|
11
12
|
*
|
|
13
|
+
* @category Ads
|
|
12
14
|
* @category THEOads
|
|
13
15
|
* @public
|
|
14
16
|
*/
|
|
@@ -3,6 +3,7 @@ import { Interstitial } from './Interstitial';
|
|
|
3
3
|
/**
|
|
4
4
|
* The THEOads interstitial that corresponds with overlay playback.
|
|
5
5
|
*
|
|
6
|
+
* @category Ads
|
|
6
7
|
* @category THEOads
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
@@ -33,6 +34,7 @@ export interface OverlayInterstitial extends Interstitial {
|
|
|
33
34
|
/**
|
|
34
35
|
* The position information of the overlay.
|
|
35
36
|
*
|
|
37
|
+
* @category Ads
|
|
36
38
|
* @category THEOads
|
|
37
39
|
* @public
|
|
38
40
|
*/
|
|
@@ -46,6 +48,7 @@ export interface OverlayPosition {
|
|
|
46
48
|
/**
|
|
47
49
|
* The size information of the overlay.
|
|
48
50
|
*
|
|
51
|
+
* @category Ads
|
|
49
52
|
* @category THEOads
|
|
50
53
|
* @public
|
|
51
54
|
*/
|
|
@@ -3,6 +3,7 @@ import type { TextTrackCue } from './TextTrackCue';
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents a cue of a HLS date range metadata text track.
|
|
5
5
|
*
|
|
6
|
+
* @category Media and Text Tracks
|
|
6
7
|
* @public
|
|
7
8
|
*/
|
|
8
9
|
export interface DateRangeCue extends TextTrackCue {
|
|
@@ -68,6 +69,9 @@ export interface DateRangeCue extends TextTrackCue {
|
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* Check whether a text track cue is of type DateRangeCue.
|
|
72
|
+
*
|
|
73
|
+
* @category Media and Text Tracks
|
|
74
|
+
* @public
|
|
71
75
|
*/
|
|
72
76
|
export function isDateRangeCue(cue: TextTrackCue): cue is DateRangeCue {
|
|
73
77
|
return (cue as DateRangeCue).customAttributes != undefined;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { Track } from './Track';
|
|
2
2
|
import type { Quality } from './Quality';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Represents the category of a media track (audio or video).
|
|
6
|
+
*
|
|
7
|
+
* @category Media and Text Tracks
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
4
10
|
export type MediaTrackKind = 'main' | 'alternative';
|
|
5
11
|
|
|
6
12
|
/**
|
|
7
13
|
* Represents a media track (audio or video) of a media resource.
|
|
8
14
|
*
|
|
15
|
+
* @category Media and Text Tracks
|
|
9
16
|
* @public
|
|
10
17
|
*/
|
|
11
18
|
export interface MediaTrack extends Track {
|
|
@@ -39,6 +46,13 @@ export interface MediaTrack extends Track {
|
|
|
39
46
|
*/
|
|
40
47
|
readonly label: string;
|
|
41
48
|
|
|
49
|
+
/**
|
|
50
|
+
* The unlocalized label of the media track, as extracted from the manifest.
|
|
51
|
+
*
|
|
52
|
+
* @platform ios
|
|
53
|
+
*/
|
|
54
|
+
readonly unlocalizedLabel?: string;
|
|
55
|
+
|
|
42
56
|
/**
|
|
43
57
|
* The language of the media track.
|
|
44
58
|
*/
|
|
@@ -60,14 +74,32 @@ export interface MediaTrack extends Track {
|
|
|
60
74
|
readonly enabled: boolean;
|
|
61
75
|
}
|
|
62
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Find a media track by `uid` in a list of media tracks.
|
|
79
|
+
*
|
|
80
|
+
* @category Media and Text Tracks
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
63
83
|
export function findMediaTrackByUid(mediaTracks: MediaTrack[], uid: number | undefined): MediaTrack | undefined {
|
|
64
84
|
return mediaTracks.find((track) => track.uid === uid);
|
|
65
85
|
}
|
|
66
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Find a quality by `uid` in a list of media tracks.
|
|
89
|
+
*
|
|
90
|
+
* @category Media and Text Tracks
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
67
93
|
export function findQualityByUid(mediaTrack: MediaTrack, uid: number | undefined): Quality | undefined {
|
|
68
94
|
return mediaTrack.qualities.find((quality) => quality.uid === uid);
|
|
69
95
|
}
|
|
70
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Find a list of qualities by `uid` in a list of media tracks.
|
|
99
|
+
*
|
|
100
|
+
* @category Media and Text Tracks
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
71
103
|
export function findQualitiesByUid(mediaTrack: MediaTrack | undefined, uid: number | number[] | undefined): Quality[] | undefined {
|
|
72
104
|
if (uid && mediaTrack) {
|
|
73
105
|
if (Array.isArray(uid)) {
|
package/src/api/track/Quality.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents a quality of a media track.
|
|
3
3
|
*
|
|
4
|
+
* @category Media and Text Tracks
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
|
6
7
|
export interface Quality {
|
|
@@ -54,6 +55,7 @@ export interface Quality {
|
|
|
54
55
|
/**
|
|
55
56
|
* Represents a quality of a video track.
|
|
56
57
|
*
|
|
58
|
+
* @category Media and Text Tracks
|
|
57
59
|
* @public
|
|
58
60
|
*/
|
|
59
61
|
export interface VideoQuality extends Quality {
|
|
@@ -81,6 +83,7 @@ export interface VideoQuality extends Quality {
|
|
|
81
83
|
/**
|
|
82
84
|
* Represents a quality of an audio track.
|
|
83
85
|
*
|
|
86
|
+
* @category Media and Text Tracks
|
|
84
87
|
* @public
|
|
85
88
|
*/
|
|
86
89
|
export interface AudioQuality extends Quality {
|
|
@@ -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:
|
|
@@ -38,6 +83,13 @@ export interface TextTrack extends Track {
|
|
|
38
83
|
*/
|
|
39
84
|
readonly kind: TextTrackKind;
|
|
40
85
|
|
|
86
|
+
/**
|
|
87
|
+
* The unlocalized label of the text track, as extracted from the manifest.
|
|
88
|
+
*
|
|
89
|
+
* @platform ios
|
|
90
|
+
*/
|
|
91
|
+
readonly unlocalizedLabel?: string;
|
|
92
|
+
|
|
41
93
|
/**
|
|
42
94
|
* The label of the text track.
|
|
43
95
|
*/
|
|
@@ -101,7 +153,11 @@ export interface TextTrack extends Track {
|
|
|
101
153
|
|
|
102
154
|
/**
|
|
103
155
|
* Retain renderable tracks.
|
|
156
|
+
*
|
|
104
157
|
* https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-showing
|
|
158
|
+
*
|
|
159
|
+
* @category Media and Text Tracks
|
|
160
|
+
* @internal
|
|
105
161
|
*/
|
|
106
162
|
export function filterRenderableTracks(textTracks: TextTrack[] | undefined): TextTrack[] | undefined {
|
|
107
163
|
return textTracks && textTracks.filter((textTrack) => textTrack.kind === 'subtitles' || textTrack.kind === 'captions');
|
|
@@ -109,6 +165,9 @@ export function filterRenderableTracks(textTracks: TextTrack[] | undefined): Tex
|
|
|
109
165
|
|
|
110
166
|
/**
|
|
111
167
|
* Retain first thumbnail track encountered in the textTracks list.
|
|
168
|
+
*
|
|
169
|
+
* @category Media and Text Tracks
|
|
170
|
+
* @internal
|
|
112
171
|
*/
|
|
113
172
|
export function filterThumbnailTracks(textTracks: TextTrack[] | undefined): TextTrack | undefined {
|
|
114
173
|
return textTracks && textTracks.find(isThumbnailTrack);
|
|
@@ -116,27 +175,53 @@ export function filterThumbnailTracks(textTracks: TextTrack[] | undefined): Text
|
|
|
116
175
|
|
|
117
176
|
/**
|
|
118
177
|
* Query whether a track is a valid thumbnail track.
|
|
178
|
+
*
|
|
179
|
+
* @category Media and Text Tracks
|
|
180
|
+
* @internal
|
|
119
181
|
*/
|
|
120
182
|
export function isThumbnailTrack(textTrack: TextTrack | undefined): boolean {
|
|
121
183
|
return !!textTrack && (textTrack.kind === 'thumbnails' || (textTrack.kind === 'metadata' && textTrack.label === 'thumbnails'));
|
|
122
184
|
}
|
|
123
|
-
|
|
185
|
+
/**
|
|
186
|
+
* Query whether a track is a given cue.
|
|
187
|
+
*
|
|
188
|
+
* @category Media and Text Tracks
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
124
191
|
export function hasTextTrackCue(textTrack: TextTrack, cue: TextTrackCue): boolean {
|
|
125
192
|
return !!(textTrack.cues && cue && textTrack.cues.find((c) => cue.uid === c.uid));
|
|
126
193
|
}
|
|
127
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Removes a cue from a text track.
|
|
197
|
+
*
|
|
198
|
+
* @category Media and Text Tracks
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
128
201
|
export function removeTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {
|
|
129
202
|
if (textTrack && textTrack.cues && cue && hasTextTrackCue(textTrack, cue)) {
|
|
130
203
|
textTrack.cues = textTrack.cues.filter((c) => c.uid !== cue.uid);
|
|
131
204
|
}
|
|
132
205
|
}
|
|
133
206
|
|
|
207
|
+
/**
|
|
208
|
+
* Adds a cue to a text track.
|
|
209
|
+
*
|
|
210
|
+
* @category Media and Text Tracks
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
134
213
|
export function addTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {
|
|
135
214
|
if (textTrack && textTrack.cues && cue && !hasTextTrackCue(textTrack, cue)) {
|
|
136
215
|
textTrack.cues.push(cue);
|
|
137
216
|
}
|
|
138
217
|
}
|
|
139
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Returns a cue from a text track by uid.
|
|
221
|
+
*
|
|
222
|
+
* @category Media and Text Tracks
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
140
225
|
export function findTextTrackByUid(textTracks: TextTrack[], uid: number): TextTrack | undefined {
|
|
141
226
|
return textTracks.find((t) => t.uid === uid);
|
|
142
227
|
}
|
|
@@ -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 {
|
|
@@ -116,6 +117,7 @@ export interface TextTrackStyle {
|
|
|
116
117
|
* <br/> - `'depressed'`
|
|
117
118
|
* <br/> - `'uniform'`
|
|
118
119
|
*
|
|
120
|
+
* @category Media and Text Tracks
|
|
119
121
|
* @public
|
|
120
122
|
*/
|
|
121
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';
|