react-native-theoplayer 1.8.2 → 2.0.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 +248 -0
- package/README.md +7 -2
- package/android/build.gradle +46 -24
- package/android/local/com/theoplayer/android-connector/mediasession/4.11.0-local/mediasession-4.11.0-local.aar +0 -0
- package/android/local/com/theoplayer/android-connector/mediasession/4.11.0-local/mediasession-4.11.0-local.pom +15 -0
- package/android/local/com/theoplayer/android-connector/mediasession/maven-metadata-local.xml +13 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.8.0/ads-wrapper-4.8.0.aar +0 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.8.0/ads-wrapper-4.8.0.pom +9 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml +4 -4
- package/android/src/main/AndroidManifest.xml +46 -1
- package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +3 -1
- package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +223 -181
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerContext.kt +301 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.kt +2 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +77 -381
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.kt +5 -78
- package/android/src/main/java/com/theoplayer/ads/AdsModule.kt +4 -4
- package/android/src/main/java/com/theoplayer/audio/AudioBecomingNoisyManager.kt +32 -0
- package/android/src/main/java/com/theoplayer/audio/BackgroundAudioConfig.kt +17 -0
- package/android/src/main/java/com/theoplayer/audio/BackgroundAudioConfigAdapter.kt +19 -0
- package/android/src/main/java/com/theoplayer/audio/MediaNotificationBuilder.kt +194 -0
- package/android/src/main/java/com/theoplayer/audio/MediaPlaybackService.kt +278 -0
- package/android/src/main/java/com/theoplayer/cast/CastModule.kt +11 -6
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +8 -2
- package/android/src/main/java/com/theoplayer/player/PlayerModule.kt +178 -0
- package/android/src/main/java/com/theoplayer/presentation/PipConfig.kt +10 -0
- package/android/src/main/java/com/theoplayer/presentation/PipConfigAdapter.kt +14 -0
- package/android/src/main/java/com/theoplayer/presentation/PresentationManager.kt +249 -0
- package/android/src/main/java/com/theoplayer/presentation/PresentationModeChangeContext.kt +17 -0
- package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +6 -2
- package/android/src/main/java/com/theoplayer/track/QualityListAdapter.kt +8 -0
- package/android/src/main/java/com/theoplayer/track/TextTrackCueEventType.kt +3 -1
- package/android/src/main/java/com/theoplayer/track/TrackListAdapter.kt +22 -49
- package/android/src/main/java/com/theoplayer/util/PayloadBuilder.kt +242 -0
- package/android/src/main/java/com/theoplayer/util/ViewResolver.kt +3 -4
- package/android/src/main/res/drawable/ic_close.xml +13 -0
- package/android/src/main/res/drawable/ic_notification_small.xml +9 -0
- package/android/src/main/res/drawable/ic_pause.xml +13 -0
- package/android/src/main/res/drawable/ic_play.xml +13 -0
- package/android/src/main/res/values/colors.xml +4 -0
- package/android/src/main/res/values/strings.xml +9 -0
- package/ios/THEOplayerRCTBridge.m +60 -12
- package/ios/THEOplayerRCTDebug.swift +13 -1
- package/ios/THEOplayerRCTMainEventHandler.swift +101 -49
- package/ios/THEOplayerRCTPlayerAPI.swift +240 -0
- package/ios/THEOplayerRCTPresentationModeContext.swift +29 -0
- package/ios/THEOplayerRCTTextTrackEventHandler.swift +39 -3
- package/ios/THEOplayerRCTTrackEventTypes.swift +2 -0
- package/ios/THEOplayerRCTTrackMetadataAggregator.swift +9 -6
- package/ios/THEOplayerRCTTypeUtils.swift +42 -0
- package/ios/THEOplayerRCTView.swift +130 -288
- package/ios/THEOplayerRCTViewManager.swift +1 -1
- package/ios/ads/THEOplayerRCTAdAggregator.swift +1 -1
- package/ios/ads/THEOplayerRCTAdsAPI.swift +4 -2
- package/ios/ads/THEOplayerRCTAdsEventHandler.swift +2 -2
- package/ios/ads/THEOplayerRCTSourceDescriptionBuilder+Ads.swift +2 -2
- package/ios/ads/THEOplayerRCTView+Ads.swift +14 -1
- package/ios/ads/THEOplayerRCTView+AdsConfig.swift +8 -7
- package/ios/backgroundAudio/THEOplayerRCTNowPlayingManager.swift +254 -0
- package/ios/backgroundAudio/THEOplayerRCTRemoteCommandsManager.swift +238 -0
- package/ios/backgroundAudio/THEOplayerRCTView+BackgroundAudioConfig.swift +33 -0
- package/ios/casting/THEOplayerRCTCastAPI+Chromecast.swift +1 -1
- package/ios/casting/THEOplayerRCTCastEventHandler.swift +2 -2
- package/ios/casting/THEOplayerRCTView+Casting.swift +15 -0
- package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegration.swift +66 -46
- package/ios/pip/THEOplayerRCTPipControlsManager.swift +145 -0
- package/ios/pip/THEOplayerRCTView+PipConfig.swift +56 -0
- package/ios/theofeatures.sh +16 -0
- package/lib/commonjs/api/THEOplayerView.js.map +1 -1
- package/lib/commonjs/api/abr/barrel.js +0 -2
- package/lib/commonjs/api/abr/barrel.js.map +1 -1
- package/lib/commonjs/api/ads/barrel.js +0 -16
- package/lib/commonjs/api/ads/barrel.js.map +1 -1
- package/lib/commonjs/api/backgroundAudio/BackgroundAudioConfiguration.js +2 -0
- package/lib/commonjs/api/backgroundAudio/BackgroundAudioConfiguration.js.map +1 -0
- package/lib/commonjs/api/backgroundAudio/barrel.js +17 -0
- package/lib/commonjs/api/backgroundAudio/barrel.js.map +1 -0
- package/lib/commonjs/api/barrel.js +52 -32
- package/lib/commonjs/api/barrel.js.map +1 -1
- package/lib/commonjs/api/cast/Airplay.js.map +1 -1
- package/lib/commonjs/api/cast/CastAPI.js.map +1 -1
- package/lib/commonjs/api/cast/CastState.js +22 -0
- package/lib/commonjs/api/cast/CastState.js.map +1 -1
- package/lib/commonjs/api/cast/Chromecast.js.map +1 -1
- package/lib/commonjs/api/cast/barrel.js +0 -10
- package/lib/commonjs/api/cast/barrel.js.map +1 -1
- package/lib/commonjs/api/config/PlayerConfiguration.js.map +1 -1
- package/lib/commonjs/api/config/barrel.js +0 -2
- package/lib/commonjs/api/config/barrel.js.map +1 -1
- package/lib/commonjs/api/drm/barrel.js +0 -10
- package/lib/commonjs/api/drm/barrel.js.map +1 -1
- package/lib/commonjs/api/error/barrel.js +0 -4
- package/lib/commonjs/api/error/barrel.js.map +1 -1
- package/lib/commonjs/api/event/AdEvent.js +24 -83
- package/lib/commonjs/api/event/AdEvent.js.map +1 -1
- package/lib/commonjs/api/event/CastEvent.js +8 -15
- package/lib/commonjs/api/event/CastEvent.js.map +1 -1
- package/lib/commonjs/api/event/Event.js +2 -0
- package/lib/commonjs/api/event/Event.js.map +1 -0
- package/lib/commonjs/api/event/EventDispatcher.js +6 -0
- package/lib/commonjs/api/event/EventDispatcher.js.map +1 -0
- package/lib/commonjs/api/event/EventListener.js +6 -0
- package/lib/commonjs/api/event/EventListener.js.map +1 -0
- package/lib/commonjs/api/event/PlayerEvent.js +7 -0
- package/lib/commonjs/api/event/PlayerEvent.js.map +1 -1
- package/lib/commonjs/api/event/TrackEvent.js +10 -15
- package/lib/commonjs/api/event/TrackEvent.js.map +1 -1
- package/lib/commonjs/api/event/barrel.js +11 -8
- package/lib/commonjs/api/event/barrel.js.map +1 -1
- package/lib/commonjs/api/media/MediaControlConfiguration.js +2 -0
- package/lib/commonjs/api/media/MediaControlConfiguration.js.map +1 -0
- package/lib/commonjs/api/media/barrel.js +17 -0
- package/lib/commonjs/api/media/barrel.js.map +1 -0
- package/lib/commonjs/api/pip/PiPConfiguration.js +2 -0
- package/lib/commonjs/api/pip/PiPConfiguration.js.map +1 -0
- package/lib/commonjs/api/pip/barrel.js +17 -0
- package/lib/commonjs/api/pip/barrel.js.map +1 -0
- package/lib/commonjs/api/player/PlayerEventMap.js +43 -0
- package/lib/commonjs/api/player/PlayerEventMap.js.map +1 -0
- package/lib/commonjs/api/player/THEOplayer.js +6 -0
- package/lib/commonjs/api/player/THEOplayer.js.map +1 -0
- package/lib/commonjs/api/player/barrel.js +28 -0
- package/lib/commonjs/api/player/barrel.js.map +1 -0
- package/lib/commonjs/api/presentation/PresentationMode.js +22 -0
- package/lib/commonjs/api/presentation/PresentationMode.js.map +1 -0
- package/lib/commonjs/api/presentation/barrel.js +17 -0
- package/lib/commonjs/api/presentation/barrel.js.map +1 -0
- package/lib/commonjs/api/source/ads/Ads.js +46 -0
- package/lib/commonjs/api/source/ads/Ads.js.map +1 -1
- package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js.map +1 -1
- package/lib/commonjs/api/source/ads/IMAAdDescription.js.map +1 -1
- package/lib/commonjs/api/source/ads/barrel.js +0 -12
- package/lib/commonjs/api/source/ads/barrel.js.map +1 -1
- package/lib/commonjs/api/source/ads/ssai/barrel.js +0 -8
- package/lib/commonjs/api/source/ads/ssai/barrel.js.map +1 -1
- package/lib/commonjs/api/source/barrel.js +0 -12
- package/lib/commonjs/api/source/barrel.js.map +1 -1
- package/lib/commonjs/api/source/dash/barrel.js +0 -2
- package/lib/commonjs/api/source/dash/barrel.js.map +1 -1
- package/lib/commonjs/api/source/drm/barrel.js +0 -2
- package/lib/commonjs/api/source/drm/barrel.js.map +1 -1
- package/lib/commonjs/api/source/hls/barrel.js +0 -2
- package/lib/commonjs/api/source/hls/barrel.js.map +1 -1
- package/lib/commonjs/api/source/metadata/barrel.js +0 -2
- package/lib/commonjs/api/source/metadata/barrel.js.map +1 -1
- package/lib/commonjs/api/timeranges/barrel.js +0 -2
- package/lib/commonjs/api/timeranges/barrel.js.map +1 -1
- package/lib/commonjs/api/track/MediaTrack.js +1 -4
- package/lib/commonjs/api/track/MediaTrack.js.map +1 -1
- package/lib/commonjs/api/track/TextTrack.js +29 -24
- 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 -0
- package/lib/commonjs/api/track/Track.js +25 -0
- package/lib/commonjs/api/track/Track.js.map +1 -1
- package/lib/commonjs/api/track/barrel.js +11 -10
- package/lib/commonjs/api/track/barrel.js.map +1 -1
- package/lib/commonjs/api/utils/TypeUtils.js +6 -14
- package/lib/commonjs/api/utils/TypeUtils.js.map +1 -1
- package/lib/commonjs/api/utils/barrel.js +0 -2
- package/lib/commonjs/api/utils/barrel.js.map +1 -1
- package/lib/commonjs/index.js +12 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.js +103 -235
- package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.style.js +0 -3
- package/lib/commonjs/internal/THEOplayerView.style.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.web.js +69 -589
- package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
- package/lib/commonjs/internal/adapter/NativePlayerState.js +6 -0
- package/lib/commonjs/internal/adapter/NativePlayerState.js.map +1 -0
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js +392 -0
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js +233 -0
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/WebEventForwarder.js +280 -0
- package/lib/commonjs/internal/adapter/WebEventForwarder.js.map +1 -0
- package/lib/commonjs/internal/adapter/abr/AbrAdapter.js +40 -0
- package/lib/commonjs/internal/adapter/abr/AbrAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerNativeAdsAdapter.js +41 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerNativeAdsAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerNativeGoogleDAI.js +26 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerNativeGoogleDAI.js.map +1 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerWebAdsAdapter.js +58 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerWebAdsAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerWebGoogleDAI.js +25 -0
- package/lib/commonjs/internal/adapter/ads/THEOplayerWebGoogleDAI.js.map +1 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeAirplay.js +47 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeAirplay.js.map +1 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeCastAdapter.js +46 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeCastAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeChromecast.js +55 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeChromecast.js.map +1 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerWebCastAdapter.js +29 -0
- package/lib/commonjs/internal/adapter/cast/THEOplayerWebCastAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/BaseEvent.js +15 -0
- package/lib/commonjs/internal/adapter/event/BaseEvent.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/DefaultEventDispatcher.js +42 -0
- package/lib/commonjs/internal/adapter/event/DefaultEventDispatcher.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/PlayerEvents.js +166 -0
- package/lib/commonjs/internal/adapter/event/PlayerEvents.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/native/NativeAdEvent.js +6 -0
- package/lib/commonjs/internal/adapter/event/native/NativeAdEvent.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/native/NativeCastEvent.js +6 -0
- package/lib/commonjs/internal/adapter/event/native/NativeCastEvent.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/native/NativePlayerEvent.js +6 -0
- package/lib/commonjs/internal/adapter/event/native/NativePlayerEvent.js.map +1 -0
- package/lib/commonjs/internal/adapter/event/native/NativeTrackEvent.js +74 -0
- package/lib/commonjs/internal/adapter/event/native/NativeTrackEvent.js.map +1 -0
- package/lib/commonjs/internal/adapter/track/TextTrackStyleAdapter.js +51 -0
- package/lib/commonjs/internal/adapter/track/TextTrackStyleAdapter.js.map +1 -0
- package/lib/commonjs/internal/adapter/web/TrackUtils.js +87 -0
- package/lib/commonjs/internal/adapter/web/TrackUtils.js.map +1 -0
- package/lib/commonjs/internal/adapter/web/WebMediaSession.js +188 -0
- package/lib/commonjs/internal/adapter/web/WebMediaSession.js.map +1 -0
- package/lib/commonjs/internal/adapter/web/WebPresentationModeManager.js +101 -0
- package/lib/commonjs/internal/adapter/web/WebPresentationModeManager.js.map +1 -0
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.js +13 -50
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.js.map +1 -1
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.web.js +0 -4
- package/lib/commonjs/internal/drm/ContentProtectionRegistry.web.js.map +1 -1
- package/lib/commonjs/internal/drm/NativeCertificateRequest.js +0 -3
- package/lib/commonjs/internal/drm/NativeCertificateRequest.js.map +1 -1
- package/lib/commonjs/internal/drm/NativeCertificateResponse.js +0 -4
- package/lib/commonjs/internal/drm/NativeCertificateResponse.js.map +1 -1
- package/lib/commonjs/internal/drm/NativeLicenseRequest.js +0 -3
- package/lib/commonjs/internal/drm/NativeLicenseRequest.js.map +1 -1
- package/lib/commonjs/internal/drm/NativeLicenseResponse.js +0 -4
- package/lib/commonjs/internal/drm/NativeLicenseResponse.js.map +1 -1
- package/lib/commonjs/internal/utils/TypeUtils.js +2 -8
- package/lib/commonjs/internal/utils/TypeUtils.js.map +1 -1
- package/lib/commonjs/internal/utils/arrayUtil.js +19 -0
- package/lib/commonjs/internal/utils/arrayUtil.js.map +1 -0
- package/lib/commonjs/ui/THEOplayerDefaultUi.js +82 -0
- package/lib/commonjs/ui/THEOplayerDefaultUi.js.map +1 -0
- package/lib/commonjs/ui/THEOplayerTheme.js +48 -0
- package/lib/commonjs/ui/THEOplayerTheme.js.map +1 -0
- package/lib/commonjs/ui/barrel.js +39 -0
- package/lib/commonjs/ui/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +99 -0
- package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js +35 -0
- package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/activityindicator/barrel.js +28 -0
- package/lib/commonjs/ui/components/activityindicator/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/barrel.js +105 -0
- package/lib/commonjs/ui/components/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/button/AirplayButton.js +81 -0
- package/lib/commonjs/ui/components/button/AirplayButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/ChromecastButton.js +66 -0
- package/lib/commonjs/ui/components/button/ChromecastButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/ChromecastButton.web.js +82 -0
- package/lib/commonjs/ui/components/button/ChromecastButton.web.js.map +1 -0
- package/lib/commonjs/ui/components/button/FullscreenButton.js +72 -0
- package/lib/commonjs/ui/components/button/FullscreenButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/MuteButton.js +66 -0
- package/lib/commonjs/ui/components/button/MuteButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/PipButton.js +72 -0
- package/lib/commonjs/ui/components/button/PipButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/PlayButton.js +113 -0
- package/lib/commonjs/ui/components/button/PlayButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/SkipButton.js +122 -0
- package/lib/commonjs/ui/components/button/SkipButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js +82 -0
- package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js.map +1 -0
- package/lib/commonjs/ui/components/button/barrel.js +105 -0
- package/lib/commonjs/ui/components/button/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/AirplaySvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/AirplaySvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/BackSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/BackSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/BackwardSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/BackwardSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/ErrorSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/ErrorSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/ForwardSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/ForwardSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/LanguageSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/LanguageSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/ListSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/ListSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/PauseSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/PauseSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/PipExitSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/PipExitSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/PlaySvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/PlaySvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/ReplaySvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/ReplaySvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/SettingsSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/SettingsSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/SvgUtils.js +13 -0
- package/lib/commonjs/ui/components/button/svg/SvgUtils.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js +22 -0
- package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/barrel.js +226 -0
- package/lib/commonjs/ui/components/button/svg/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/button/svg/res/AirPlayButton.html +6 -0
- package/lib/commonjs/ui/components/button/svg/res/Airplay.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/ChromecastButton.html +25 -0
- package/lib/commonjs/ui/components/button/svg/res/arrow_forward.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/back.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/backward.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/chromecast-48px.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/close.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/error.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/forward.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/fullscreen-enter.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/fullscreen-exit.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/language.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/list.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/live.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/pause.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/pip_enter.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/pip_exit.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/play.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/replay.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/settings.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/skip-next.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/volume-high.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/volume-low.svg +1 -0
- package/lib/commonjs/ui/components/button/svg/res/volume-off.svg +1 -0
- package/lib/commonjs/ui/components/controlbar/ControlBar.js +61 -0
- package/lib/commonjs/ui/components/controlbar/ControlBar.js.map +1 -0
- package/lib/commonjs/ui/components/controlbar/Spacer.js +21 -0
- package/lib/commonjs/ui/components/controlbar/Spacer.js.map +1 -0
- package/lib/commonjs/ui/components/controlbar/barrel.js +28 -0
- package/lib/commonjs/ui/components/controlbar/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/menu/LanguageMenuButton.js +175 -0
- package/lib/commonjs/ui/components/menu/LanguageMenuButton.js.map +1 -0
- package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js +91 -0
- package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js.map +1 -0
- package/lib/commonjs/ui/components/menu/QualitySubMenu.js +145 -0
- package/lib/commonjs/ui/components/menu/QualitySubMenu.js.map +1 -0
- package/lib/commonjs/ui/components/menu/SettingsMenuButton.js +36 -0
- package/lib/commonjs/ui/components/menu/SettingsMenuButton.js.map +1 -0
- package/lib/commonjs/ui/components/menu/barrel.js +61 -0
- package/lib/commonjs/ui/components/menu/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/MenuButton.js +34 -0
- package/lib/commonjs/ui/components/menu/common/MenuButton.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js +47 -0
- package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/MenuTitle.js +38 -0
- package/lib/commonjs/ui/components/menu/common/MenuTitle.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/MenuView.js +75 -0
- package/lib/commonjs/ui/components/menu/common/MenuView.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js +45 -0
- package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js +65 -0
- package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js.map +1 -0
- package/lib/commonjs/ui/components/menu/common/barrel.js +72 -0
- package/lib/commonjs/ui/components/menu/common/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/message/CastMessage.js +79 -0
- package/lib/commonjs/ui/components/message/CastMessage.js.map +1 -0
- package/lib/commonjs/ui/components/message/ErrorDisplay.js +53 -0
- package/lib/commonjs/ui/components/message/ErrorDisplay.js.map +1 -0
- package/lib/commonjs/ui/components/message/barrel.js +28 -0
- package/lib/commonjs/ui/components/message/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/SeekBar.js +194 -0
- package/lib/commonjs/ui/components/seekbar/SeekBar.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/barrel.js +28 -0
- package/lib/commonjs/ui/components/seekbar/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js +45 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js +18 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js +256 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js +17 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +17 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +1 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js +28 -0
- package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js +55 -0
- package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js.map +1 -0
- package/lib/commonjs/ui/components/timelabel/TimeLabel.js +88 -0
- package/lib/commonjs/ui/components/timelabel/TimeLabel.js.map +1 -0
- package/lib/commonjs/ui/components/timelabel/barrel.js +28 -0
- package/lib/commonjs/ui/components/timelabel/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/uicontroller/UiContainer.js +350 -0
- package/lib/commonjs/ui/components/uicontroller/UiContainer.js.map +1 -0
- package/lib/commonjs/ui/components/uicontroller/UiControls.js +6 -0
- package/lib/commonjs/ui/components/uicontroller/UiControls.js.map +1 -0
- package/lib/commonjs/ui/components/uicontroller/barrel.js +28 -0
- package/lib/commonjs/ui/components/uicontroller/barrel.js.map +1 -0
- package/lib/commonjs/ui/components/util/PlayerContext.js +19 -0
- package/lib/commonjs/ui/components/util/PlayerContext.js.map +1 -0
- package/lib/commonjs/ui/components/util/TrackUtils.js +69 -0
- package/lib/commonjs/ui/components/util/TrackUtils.js.map +1 -0
- package/lib/commonjs/ui/components/util/barrel.js +17 -0
- package/lib/commonjs/ui/components/util/barrel.js.map +1 -0
- package/lib/commonjs/ui/utils/ArrayUtils.js +19 -0
- package/lib/commonjs/ui/utils/ArrayUtils.js.map +1 -0
- package/lib/commonjs/ui/utils/language/Language.js +38 -0
- package/lib/commonjs/ui/utils/language/Language.js.map +1 -0
- package/lib/commonjs/ui/utils/language/languages.json +1658 -0
- package/lib/commonjs/web/platform/BrowserDetection.js +34 -0
- package/lib/commonjs/web/platform/BrowserDetection.js.map +1 -0
- package/lib/commonjs/web/platform/browser.d.js +2 -0
- package/lib/commonjs/web/platform/browser.d.js.map +1 -0
- package/lib/module/api/THEOplayerView.js.map +1 -1
- package/lib/module/api/abr/barrel.js.map +1 -1
- package/lib/module/api/ads/barrel.js.map +1 -1
- package/lib/module/api/backgroundAudio/BackgroundAudioConfiguration.js +2 -0
- package/lib/module/api/backgroundAudio/BackgroundAudioConfiguration.js.map +1 -0
- package/lib/module/api/backgroundAudio/barrel.js +2 -0
- package/lib/module/api/backgroundAudio/barrel.js.map +1 -0
- package/lib/module/api/barrel.js +4 -0
- package/lib/module/api/barrel.js.map +1 -1
- package/lib/module/api/cast/Airplay.js.map +1 -1
- package/lib/module/api/cast/CastAPI.js.map +1 -1
- package/lib/module/api/cast/CastState.js +16 -1
- package/lib/module/api/cast/CastState.js.map +1 -1
- package/lib/module/api/cast/Chromecast.js.map +1 -1
- package/lib/module/api/cast/barrel.js.map +1 -1
- package/lib/module/api/config/PlayerConfiguration.js.map +1 -1
- package/lib/module/api/config/barrel.js.map +1 -1
- package/lib/module/api/drm/barrel.js.map +1 -1
- package/lib/module/api/error/barrel.js.map +1 -1
- package/lib/module/api/event/AdEvent.js +22 -81
- package/lib/module/api/event/AdEvent.js.map +1 -1
- package/lib/module/api/event/CastEvent.js +6 -13
- package/lib/module/api/event/CastEvent.js.map +1 -1
- package/lib/module/api/event/Event.js +2 -0
- package/lib/module/api/event/Event.js.map +1 -0
- package/lib/module/api/event/EventDispatcher.js +2 -0
- package/lib/module/api/event/EventDispatcher.js.map +1 -0
- package/lib/module/api/event/EventListener.js +2 -0
- package/lib/module/api/event/EventListener.js.map +1 -0
- package/lib/module/api/event/PlayerEvent.js +5 -1
- package/lib/module/api/event/PlayerEvent.js.map +1 -1
- package/lib/module/api/event/TrackEvent.js +10 -15
- package/lib/module/api/event/TrackEvent.js.map +1 -1
- package/lib/module/api/event/barrel.js +1 -0
- package/lib/module/api/event/barrel.js.map +1 -1
- package/lib/module/api/media/MediaControlConfiguration.js +2 -0
- package/lib/module/api/media/MediaControlConfiguration.js.map +1 -0
- package/lib/module/api/media/barrel.js +2 -0
- package/lib/module/api/media/barrel.js.map +1 -0
- package/lib/module/api/pip/PiPConfiguration.js +2 -0
- package/lib/module/api/pip/PiPConfiguration.js.map +1 -0
- package/lib/module/api/pip/barrel.js +2 -0
- package/lib/module/api/pip/barrel.js.map +1 -0
- package/lib/module/api/player/PlayerEventMap.js +37 -0
- package/lib/module/api/player/PlayerEventMap.js.map +1 -0
- package/lib/module/api/player/THEOplayer.js +2 -0
- package/lib/module/api/player/THEOplayer.js.map +1 -0
- package/lib/module/api/player/barrel.js +3 -0
- package/lib/module/api/player/barrel.js.map +1 -0
- package/lib/module/api/presentation/PresentationMode.js +16 -0
- package/lib/module/api/presentation/PresentationMode.js.map +1 -0
- package/lib/module/api/presentation/barrel.js +2 -0
- package/lib/module/api/presentation/barrel.js.map +1 -0
- package/lib/module/api/source/ads/Ads.js +42 -0
- package/lib/module/api/source/ads/Ads.js.map +1 -1
- package/lib/module/api/source/ads/FreeWheelAdDescription.js.map +1 -1
- package/lib/module/api/source/ads/IMAAdDescription.js.map +1 -1
- package/lib/module/api/source/ads/barrel.js.map +1 -1
- package/lib/module/api/source/ads/ssai/barrel.js.map +1 -1
- package/lib/module/api/source/barrel.js.map +1 -1
- package/lib/module/api/source/dash/barrel.js.map +1 -1
- package/lib/module/api/source/drm/barrel.js.map +1 -1
- package/lib/module/api/source/hls/barrel.js.map +1 -1
- package/lib/module/api/source/metadata/barrel.js.map +1 -1
- package/lib/module/api/timeranges/barrel.js.map +1 -1
- package/lib/module/api/track/MediaTrack.js +1 -1
- package/lib/module/api/track/MediaTrack.js.map +1 -1
- package/lib/module/api/track/TextTrack.js +25 -11
- 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 -0
- package/lib/module/api/track/Track.js +17 -0
- package/lib/module/api/track/Track.js.map +1 -1
- package/lib/module/api/track/barrel.js +1 -0
- package/lib/module/api/track/barrel.js.map +1 -1
- package/lib/module/api/utils/TypeUtils.js +8 -4
- package/lib/module/api/utils/TypeUtils.js.map +1 -1
- package/lib/module/api/utils/barrel.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/THEOplayerView.js +104 -224
- package/lib/module/internal/THEOplayerView.js.map +1 -1
- package/lib/module/internal/THEOplayerView.style.js.map +1 -1
- package/lib/module/internal/THEOplayerView.web.js +69 -578
- package/lib/module/internal/THEOplayerView.web.js.map +1 -1
- package/lib/module/internal/adapter/NativePlayerState.js +2 -0
- package/lib/module/internal/adapter/NativePlayerState.js.map +1 -0
- package/lib/module/internal/adapter/THEOplayerAdapter.js +385 -0
- package/lib/module/internal/adapter/THEOplayerAdapter.js.map +1 -0
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js +226 -0
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js.map +1 -0
- package/lib/module/internal/adapter/WebEventForwarder.js +273 -0
- package/lib/module/internal/adapter/WebEventForwarder.js.map +1 -0
- package/lib/module/internal/adapter/abr/AbrAdapter.js +33 -0
- package/lib/module/internal/adapter/abr/AbrAdapter.js.map +1 -0
- package/lib/module/internal/adapter/ads/THEOplayerNativeAdsAdapter.js +34 -0
- package/lib/module/internal/adapter/ads/THEOplayerNativeAdsAdapter.js.map +1 -0
- package/lib/module/internal/adapter/ads/THEOplayerNativeGoogleDAI.js +19 -0
- package/lib/module/internal/adapter/ads/THEOplayerNativeGoogleDAI.js.map +1 -0
- package/lib/module/internal/adapter/ads/THEOplayerWebAdsAdapter.js +51 -0
- package/lib/module/internal/adapter/ads/THEOplayerWebAdsAdapter.js.map +1 -0
- package/lib/module/internal/adapter/ads/THEOplayerWebGoogleDAI.js +18 -0
- package/lib/module/internal/adapter/ads/THEOplayerWebGoogleDAI.js.map +1 -0
- package/lib/module/internal/adapter/cast/THEOplayerNativeAirplay.js +40 -0
- package/lib/module/internal/adapter/cast/THEOplayerNativeAirplay.js.map +1 -0
- package/lib/module/internal/adapter/cast/THEOplayerNativeCastAdapter.js +39 -0
- package/lib/module/internal/adapter/cast/THEOplayerNativeCastAdapter.js.map +1 -0
- package/lib/module/internal/adapter/cast/THEOplayerNativeChromecast.js +48 -0
- package/lib/module/internal/adapter/cast/THEOplayerNativeChromecast.js.map +1 -0
- package/lib/module/internal/adapter/cast/THEOplayerWebCastAdapter.js +22 -0
- package/lib/module/internal/adapter/cast/THEOplayerWebCastAdapter.js.map +1 -0
- package/lib/module/internal/adapter/event/BaseEvent.js +8 -0
- package/lib/module/internal/adapter/event/BaseEvent.js.map +1 -0
- package/lib/module/internal/adapter/event/DefaultEventDispatcher.js +35 -0
- package/lib/module/internal/adapter/event/DefaultEventDispatcher.js.map +1 -0
- package/lib/module/internal/adapter/event/PlayerEvents.js +142 -0
- package/lib/module/internal/adapter/event/PlayerEvents.js.map +1 -0
- package/lib/module/internal/adapter/event/native/NativeAdEvent.js +2 -0
- package/lib/module/internal/adapter/event/native/NativeAdEvent.js.map +1 -0
- package/lib/module/internal/adapter/event/native/NativeCastEvent.js +2 -0
- package/lib/module/internal/adapter/event/native/NativeCastEvent.js.map +1 -0
- package/lib/module/internal/adapter/event/native/NativePlayerEvent.js +2 -0
- package/lib/module/internal/adapter/event/native/NativePlayerEvent.js.map +1 -0
- package/lib/module/internal/adapter/event/native/NativeTrackEvent.js +60 -0
- package/lib/module/internal/adapter/event/native/NativeTrackEvent.js.map +1 -0
- package/lib/module/internal/adapter/track/TextTrackStyleAdapter.js +44 -0
- package/lib/module/internal/adapter/track/TextTrackStyleAdapter.js.map +1 -0
- package/lib/module/internal/adapter/web/TrackUtils.js +75 -0
- package/lib/module/internal/adapter/web/TrackUtils.js.map +1 -0
- package/lib/module/internal/adapter/web/WebMediaSession.js +182 -0
- package/lib/module/internal/adapter/web/WebMediaSession.js.map +1 -0
- package/lib/module/internal/adapter/web/WebPresentationModeManager.js +94 -0
- package/lib/module/internal/adapter/web/WebPresentationModeManager.js.map +1 -0
- package/lib/module/internal/drm/ContentProtectionRegistry.js +13 -32
- package/lib/module/internal/drm/ContentProtectionRegistry.js.map +1 -1
- package/lib/module/internal/drm/ContentProtectionRegistry.web.js +0 -1
- package/lib/module/internal/drm/ContentProtectionRegistry.web.js.map +1 -1
- package/lib/module/internal/drm/NativeCertificateRequest.js.map +1 -1
- package/lib/module/internal/drm/NativeCertificateResponse.js.map +1 -1
- package/lib/module/internal/drm/NativeLicenseRequest.js.map +1 -1
- package/lib/module/internal/drm/NativeLicenseResponse.js.map +1 -1
- package/lib/module/internal/utils/TypeUtils.js +2 -3
- package/lib/module/internal/utils/TypeUtils.js.map +1 -1
- package/lib/module/internal/utils/arrayUtil.js +12 -0
- package/lib/module/internal/utils/arrayUtil.js.map +1 -0
- package/lib/module/ui/THEOplayerDefaultUi.js +74 -0
- package/lib/module/ui/THEOplayerDefaultUi.js.map +1 -0
- package/lib/module/ui/THEOplayerTheme.js +41 -0
- package/lib/module/ui/THEOplayerTheme.js.map +1 -0
- package/lib/module/ui/barrel.js +4 -0
- package/lib/module/ui/barrel.js.map +1 -0
- package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +90 -0
- package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +1 -0
- package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js +26 -0
- package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js.map +1 -0
- package/lib/module/ui/components/activityindicator/barrel.js +3 -0
- package/lib/module/ui/components/activityindicator/barrel.js.map +1 -0
- package/lib/module/ui/components/barrel.js +10 -0
- package/lib/module/ui/components/barrel.js.map +1 -0
- package/lib/module/ui/components/button/AirplayButton.js +72 -0
- package/lib/module/ui/components/button/AirplayButton.js.map +1 -0
- package/lib/module/ui/components/button/ChromecastButton.js +56 -0
- package/lib/module/ui/components/button/ChromecastButton.js.map +1 -0
- package/lib/module/ui/components/button/ChromecastButton.web.js +72 -0
- package/lib/module/ui/components/button/ChromecastButton.web.js.map +1 -0
- package/lib/module/ui/components/button/FullscreenButton.js +63 -0
- package/lib/module/ui/components/button/FullscreenButton.js.map +1 -0
- package/lib/module/ui/components/button/MuteButton.js +57 -0
- package/lib/module/ui/components/button/MuteButton.js.map +1 -0
- package/lib/module/ui/components/button/PipButton.js +63 -0
- package/lib/module/ui/components/button/PipButton.js.map +1 -0
- package/lib/module/ui/components/button/PlayButton.js +104 -0
- package/lib/module/ui/components/button/PlayButton.js.map +1 -0
- package/lib/module/ui/components/button/SkipButton.js +113 -0
- package/lib/module/ui/components/button/SkipButton.js.map +1 -0
- package/lib/module/ui/components/button/actionbutton/ActionButton.js +72 -0
- package/lib/module/ui/components/button/actionbutton/ActionButton.js.map +1 -0
- package/lib/module/ui/components/button/barrel.js +10 -0
- package/lib/module/ui/components/button/barrel.js.map +1 -0
- package/lib/module/ui/components/button/svg/AirplaySvg.js +12 -0
- package/lib/module/ui/components/button/svg/AirplaySvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/ArrowForwardSvg.js +12 -0
- package/lib/module/ui/components/button/svg/ArrowForwardSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/BackSvg.js +12 -0
- package/lib/module/ui/components/button/svg/BackSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/BackwardSvg.js +12 -0
- package/lib/module/ui/components/button/svg/BackwardSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/ChromecastSvg.js +12 -0
- package/lib/module/ui/components/button/svg/ChromecastSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/ErrorSvg.js +12 -0
- package/lib/module/ui/components/button/svg/ErrorSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/ForwardSvg.js +12 -0
- package/lib/module/ui/components/button/svg/ForwardSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js +12 -0
- package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/FullscreenExitSvg.js +12 -0
- package/lib/module/ui/components/button/svg/FullscreenExitSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/LanguageSvg.js +12 -0
- package/lib/module/ui/components/button/svg/LanguageSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/ListSvg.js +12 -0
- package/lib/module/ui/components/button/svg/ListSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/PauseSvg.js +12 -0
- package/lib/module/ui/components/button/svg/PauseSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/PipEnterSvg.js +12 -0
- package/lib/module/ui/components/button/svg/PipEnterSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/PipExitSvg.js +12 -0
- package/lib/module/ui/components/button/svg/PipExitSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/PlaySvg.js +12 -0
- package/lib/module/ui/components/button/svg/PlaySvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/ReplaySvg.js +12 -0
- package/lib/module/ui/components/button/svg/ReplaySvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/SettingsSvg.js +12 -0
- package/lib/module/ui/components/button/svg/SettingsSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/SvgUtils.js +5 -0
- package/lib/module/ui/components/button/svg/SvgUtils.js.map +1 -0
- package/lib/module/ui/components/button/svg/VolumeOffSvg.js +12 -0
- package/lib/module/ui/components/button/svg/VolumeOffSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/VolumeUpSvg.js +12 -0
- package/lib/module/ui/components/button/svg/VolumeUpSvg.js.map +1 -0
- package/lib/module/ui/components/button/svg/barrel.js +21 -0
- package/lib/module/ui/components/button/svg/barrel.js.map +1 -0
- package/lib/module/ui/components/button/svg/res/AirPlayButton.html +6 -0
- package/lib/module/ui/components/button/svg/res/Airplay.svg +1 -0
- package/lib/module/ui/components/button/svg/res/ChromecastButton.html +25 -0
- package/lib/module/ui/components/button/svg/res/arrow_forward.svg +1 -0
- package/lib/module/ui/components/button/svg/res/back.svg +1 -0
- package/lib/module/ui/components/button/svg/res/backward.svg +1 -0
- package/lib/module/ui/components/button/svg/res/chromecast-48px.svg +1 -0
- package/lib/module/ui/components/button/svg/res/close.svg +1 -0
- package/lib/module/ui/components/button/svg/res/error.svg +1 -0
- package/lib/module/ui/components/button/svg/res/forward.svg +1 -0
- package/lib/module/ui/components/button/svg/res/fullscreen-enter.svg +1 -0
- package/lib/module/ui/components/button/svg/res/fullscreen-exit.svg +1 -0
- package/lib/module/ui/components/button/svg/res/language.svg +1 -0
- package/lib/module/ui/components/button/svg/res/list.svg +1 -0
- package/lib/module/ui/components/button/svg/res/live.svg +1 -0
- package/lib/module/ui/components/button/svg/res/pause.svg +1 -0
- package/lib/module/ui/components/button/svg/res/pip_enter.svg +1 -0
- package/lib/module/ui/components/button/svg/res/pip_exit.svg +1 -0
- package/lib/module/ui/components/button/svg/res/play.svg +1 -0
- package/lib/module/ui/components/button/svg/res/replay.svg +1 -0
- package/lib/module/ui/components/button/svg/res/settings.svg +1 -0
- package/lib/module/ui/components/button/svg/res/skip-next.svg +1 -0
- package/lib/module/ui/components/button/svg/res/volume-high.svg +1 -0
- package/lib/module/ui/components/button/svg/res/volume-low.svg +1 -0
- package/lib/module/ui/components/button/svg/res/volume-off.svg +1 -0
- package/lib/module/ui/components/controlbar/ControlBar.js +52 -0
- package/lib/module/ui/components/controlbar/ControlBar.js.map +1 -0
- package/lib/module/ui/components/controlbar/Spacer.js +14 -0
- package/lib/module/ui/components/controlbar/Spacer.js.map +1 -0
- package/lib/module/ui/components/controlbar/barrel.js +3 -0
- package/lib/module/ui/components/controlbar/barrel.js.map +1 -0
- package/lib/module/ui/components/menu/LanguageMenuButton.js +165 -0
- package/lib/module/ui/components/menu/LanguageMenuButton.js.map +1 -0
- package/lib/module/ui/components/menu/PlaybackRateSubMenu.js +80 -0
- package/lib/module/ui/components/menu/PlaybackRateSubMenu.js.map +1 -0
- package/lib/module/ui/components/menu/QualitySubMenu.js +135 -0
- package/lib/module/ui/components/menu/QualitySubMenu.js.map +1 -0
- package/lib/module/ui/components/menu/SettingsMenuButton.js +28 -0
- package/lib/module/ui/components/menu/SettingsMenuButton.js.map +1 -0
- package/lib/module/ui/components/menu/barrel.js +6 -0
- package/lib/module/ui/components/menu/barrel.js.map +1 -0
- package/lib/module/ui/components/menu/common/MenuButton.js +26 -0
- package/lib/module/ui/components/menu/common/MenuButton.js.map +1 -0
- package/lib/module/ui/components/menu/common/MenuRadioButton.js +38 -0
- package/lib/module/ui/components/menu/common/MenuRadioButton.js.map +1 -0
- package/lib/module/ui/components/menu/common/MenuTitle.js +29 -0
- package/lib/module/ui/components/menu/common/MenuTitle.js.map +1 -0
- package/lib/module/ui/components/menu/common/MenuView.js +65 -0
- package/lib/module/ui/components/menu/common/MenuView.js.map +1 -0
- package/lib/module/ui/components/menu/common/ScrollableMenu.js +36 -0
- package/lib/module/ui/components/menu/common/ScrollableMenu.js.map +1 -0
- package/lib/module/ui/components/menu/common/SubMenuWithButton.js +56 -0
- package/lib/module/ui/components/menu/common/SubMenuWithButton.js.map +1 -0
- package/lib/module/ui/components/menu/common/barrel.js +7 -0
- package/lib/module/ui/components/menu/common/barrel.js.map +1 -0
- package/lib/module/ui/components/message/CastMessage.js +70 -0
- package/lib/module/ui/components/message/CastMessage.js.map +1 -0
- package/lib/module/ui/components/message/ErrorDisplay.js +46 -0
- package/lib/module/ui/components/message/ErrorDisplay.js.map +1 -0
- package/lib/module/ui/components/message/barrel.js +3 -0
- package/lib/module/ui/components/message/barrel.js.map +1 -0
- package/lib/module/ui/components/seekbar/SeekBar.js +184 -0
- package/lib/module/ui/components/seekbar/SeekBar.js.map +1 -0
- package/lib/module/ui/components/seekbar/barrel.js +3 -0
- package/lib/module/ui/components/seekbar/barrel.js.map +1 -0
- package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js +37 -0
- package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +1 -0
- package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js +11 -0
- package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js.map +1 -0
- package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js +246 -0
- package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js.map +1 -0
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js +2 -0
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +1 -0
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +3 -0
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +1 -0
- package/lib/module/ui/components/seekbar/thumbnail/barrel.js +3 -0
- package/lib/module/ui/components/seekbar/thumbnail/barrel.js.map +1 -0
- package/lib/module/ui/components/timelabel/StaticTimeLabel.js +48 -0
- package/lib/module/ui/components/timelabel/StaticTimeLabel.js.map +1 -0
- package/lib/module/ui/components/timelabel/TimeLabel.js +78 -0
- package/lib/module/ui/components/timelabel/TimeLabel.js.map +1 -0
- package/lib/module/ui/components/timelabel/barrel.js +3 -0
- package/lib/module/ui/components/timelabel/barrel.js.map +1 -0
- package/lib/module/ui/components/uicontroller/UiContainer.js +336 -0
- package/lib/module/ui/components/uicontroller/UiContainer.js.map +1 -0
- package/lib/module/ui/components/uicontroller/UiControls.js +2 -0
- package/lib/module/ui/components/uicontroller/UiControls.js.map +1 -0
- package/lib/module/ui/components/uicontroller/barrel.js +3 -0
- package/lib/module/ui/components/uicontroller/barrel.js.map +1 -0
- package/lib/module/ui/components/util/PlayerContext.js +11 -0
- package/lib/module/ui/components/util/PlayerContext.js.map +1 -0
- package/lib/module/ui/components/util/TrackUtils.js +60 -0
- package/lib/module/ui/components/util/TrackUtils.js.map +1 -0
- package/lib/module/ui/components/util/barrel.js +2 -0
- package/lib/module/ui/components/util/barrel.js.map +1 -0
- package/lib/module/ui/utils/ArrayUtils.js +12 -0
- package/lib/module/ui/utils/ArrayUtils.js.map +1 -0
- package/lib/module/ui/utils/language/Language.js +27 -0
- package/lib/module/ui/utils/language/Language.js.map +1 -0
- package/lib/module/ui/utils/language/languages.json +1658 -0
- package/lib/module/web/platform/BrowserDetection.js +27 -0
- package/lib/module/web/platform/BrowserDetection.js.map +1 -0
- package/lib/module/web/platform/browser.d.js +2 -0
- package/lib/module/web/platform/browser.d.js.map +1 -0
- package/lib/typescript/api/THEOplayerView.d.ts +21 -0
- package/lib/typescript/api/backgroundAudio/BackgroundAudioConfiguration.d.ts +22 -0
- package/lib/typescript/api/backgroundAudio/barrel.d.ts +1 -0
- package/lib/typescript/api/barrel.d.ts +16 -0
- package/lib/typescript/api/cast/Airplay.d.ts +27 -0
- package/lib/typescript/api/cast/CastAPI.d.ts +25 -0
- package/lib/typescript/api/cast/CastState.d.ts +15 -0
- package/lib/typescript/api/cast/Chromecast.d.ts +39 -0
- package/lib/typescript/api/config/PlayerConfiguration.d.ts +58 -0
- package/lib/typescript/api/event/AdEvent.d.ts +90 -0
- package/lib/typescript/api/event/CastEvent.d.ts +29 -0
- package/lib/typescript/api/event/Event.d.ts +15 -0
- package/lib/typescript/api/event/EventDispatcher.d.ts +44 -0
- package/lib/typescript/api/event/EventListener.d.ts +7 -0
- package/lib/typescript/api/event/PlayerEvent.d.ts +107 -0
- package/lib/typescript/api/event/TrackEvent.d.ts +92 -0
- package/lib/typescript/api/event/barrel.d.ts +5 -0
- package/lib/typescript/api/media/MediaControlConfiguration.d.ts +26 -0
- package/lib/typescript/api/media/barrel.d.ts +1 -0
- package/lib/typescript/api/pip/PiPConfiguration.d.ts +13 -0
- package/lib/typescript/api/pip/barrel.d.ts +1 -0
- package/lib/typescript/api/player/PlayerEventMap.d.ts +158 -0
- package/lib/typescript/api/player/THEOplayer.d.ts +154 -0
- package/lib/typescript/api/player/barrel.d.ts +2 -0
- package/lib/typescript/api/presentation/PresentationMode.d.ts +13 -0
- package/lib/typescript/api/presentation/barrel.d.ts +1 -0
- package/lib/typescript/api/source/ads/Ads.d.ts +99 -0
- package/lib/typescript/api/source/ads/FreeWheelAdDescription.d.ts +85 -0
- package/lib/typescript/api/source/ads/IMAAdDescription.d.ts +25 -0
- package/lib/typescript/api/track/MediaTrack.d.ts +50 -0
- package/lib/typescript/api/track/TextTrack.d.ts +100 -0
- package/lib/typescript/api/track/TextTrackStyle.d.ts +71 -0
- package/lib/typescript/api/track/Track.d.ts +46 -0
- package/lib/typescript/api/track/barrel.d.ts +6 -0
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/internal/THEOplayerView.d.ts +44 -0
- package/lib/typescript/internal/THEOplayerView.web.d.ts +3 -0
- package/lib/typescript/internal/adapter/NativePlayerState.d.ts +27 -0
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts +73 -0
- package/lib/typescript/internal/adapter/THEOplayerWebAdapter.d.ts +70 -0
- package/lib/typescript/internal/adapter/WebEventForwarder.d.ts +52 -0
- package/lib/typescript/internal/adapter/abr/AbrAdapter.d.ts +12 -0
- package/lib/typescript/internal/adapter/ads/THEOplayerNativeAdsAdapter.d.ts +13 -0
- package/lib/typescript/internal/adapter/ads/THEOplayerNativeGoogleDAI.d.ts +9 -0
- package/lib/typescript/internal/adapter/ads/THEOplayerWebAdsAdapter.d.ts +14 -0
- package/lib/typescript/internal/adapter/cast/THEOplayerNativeAirplay.d.ts +15 -0
- package/lib/typescript/internal/adapter/cast/THEOplayerNativeCastAdapter.d.ts +14 -0
- package/lib/typescript/internal/adapter/cast/THEOplayerNativeChromecast.d.ts +18 -0
- package/lib/typescript/internal/adapter/cast/THEOplayerWebCastAdapter.d.ts +9 -0
- package/lib/typescript/internal/adapter/event/BaseEvent.d.ts +6 -0
- package/lib/typescript/internal/adapter/event/DefaultEventDispatcher.d.ts +9 -0
- package/lib/typescript/internal/adapter/event/PlayerEvents.d.ts +99 -0
- package/lib/typescript/internal/adapter/event/native/NativeAdEvent.d.ts +11 -0
- package/lib/typescript/internal/adapter/event/native/NativeCastEvent.d.ts +15 -0
- package/lib/typescript/internal/adapter/event/native/NativePlayerEvent.d.ts +93 -0
- package/lib/typescript/internal/adapter/event/native/NativeTrackEvent.d.ts +102 -0
- package/lib/typescript/internal/adapter/track/TextTrackStyleAdapter.d.ts +17 -0
- package/lib/typescript/internal/adapter/web/TrackUtils.d.ts +9 -0
- package/lib/typescript/internal/adapter/web/WebMediaSession.d.ts +33 -0
- package/lib/typescript/internal/adapter/web/WebPresentationModeManager.d.ts +15 -0
- package/lib/typescript/internal/utils/arrayUtil.d.ts +2 -0
- package/lib/typescript/ui/THEOplayerDefaultUi.d.ts +35 -0
- package/lib/typescript/ui/THEOplayerTheme.d.ts +84 -0
- package/lib/typescript/ui/barrel.d.ts +3 -0
- package/lib/typescript/ui/components/activityindicator/CenteredDelayedActivityIndicator.d.ts +25 -0
- package/lib/typescript/ui/components/activityindicator/DelayedActivityIndicator.d.ts +9 -0
- package/lib/typescript/ui/components/activityindicator/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/barrel.d.ts +9 -0
- package/lib/typescript/ui/components/button/AirplayButton.d.ts +18 -0
- package/lib/typescript/ui/components/button/ChromecastButton.d.ts +19 -0
- package/lib/typescript/ui/components/button/ChromecastButton.web.d.ts +19 -0
- package/lib/typescript/ui/components/button/FullscreenButton.d.ts +17 -0
- package/lib/typescript/ui/components/button/MuteButton.d.ts +16 -0
- package/lib/typescript/ui/components/button/PipButton.d.ts +17 -0
- package/lib/typescript/ui/components/button/PlayButton.d.ts +28 -0
- package/lib/typescript/ui/components/button/SkipButton.d.ts +33 -0
- package/lib/typescript/ui/components/button/actionbutton/ActionButton.d.ts +41 -0
- package/lib/typescript/ui/components/button/barrel.d.ts +9 -0
- package/lib/typescript/ui/components/button/svg/AirplaySvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/ArrowForwardSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/BackSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/BackwardSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/ChromecastSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/ErrorSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/ForwardSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/FullscreenEnterSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/FullscreenExitSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/LanguageSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/ListSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/PauseSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/PipEnterSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/PipExitSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/PlaySvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/ReplaySvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/SettingsSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/SvgUtils.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/VolumeOffSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/VolumeUpSvg.d.ts +3 -0
- package/lib/typescript/ui/components/button/svg/barrel.d.ts +20 -0
- package/lib/typescript/ui/components/controlbar/ControlBar.d.ts +39 -0
- package/lib/typescript/ui/components/controlbar/Spacer.d.ts +5 -0
- package/lib/typescript/ui/components/controlbar/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/menu/LanguageMenuButton.d.ts +40 -0
- package/lib/typescript/ui/components/menu/PlaybackRateSubMenu.d.ts +36 -0
- package/lib/typescript/ui/components/menu/QualitySubMenu.d.ts +29 -0
- package/lib/typescript/ui/components/menu/SettingsMenuButton.d.ts +12 -0
- package/lib/typescript/ui/components/menu/barrel.d.ts +5 -0
- package/lib/typescript/ui/components/menu/common/MenuButton.d.ts +25 -0
- package/lib/typescript/ui/components/menu/common/MenuRadioButton.d.ts +33 -0
- package/lib/typescript/ui/components/menu/common/MenuTitle.d.ts +20 -0
- package/lib/typescript/ui/components/menu/common/MenuView.d.ts +21 -0
- package/lib/typescript/ui/components/menu/common/ScrollableMenu.d.ts +23 -0
- package/lib/typescript/ui/components/menu/common/SubMenuWithButton.d.ts +29 -0
- package/lib/typescript/ui/components/menu/common/barrel.d.ts +6 -0
- package/lib/typescript/ui/components/message/CastMessage.d.ts +16 -0
- package/lib/typescript/ui/components/message/ErrorDisplay.d.ts +12 -0
- package/lib/typescript/ui/components/message/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/seekbar/SeekBar.d.ts +41 -0
- package/lib/typescript/ui/components/seekbar/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/seekbar/thumbnail/SingleThumbnailView.d.ts +8 -0
- package/lib/typescript/ui/components/seekbar/thumbnail/Thumbnail.d.ts +56 -0
- package/lib/typescript/ui/components/seekbar/thumbnail/ThumbnailView.d.ts +60 -0
- package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.d.ts +1 -0
- package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.web.d.ts +1 -0
- package/lib/typescript/ui/components/seekbar/thumbnail/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/timelabel/StaticTimeLabel.d.ts +24 -0
- package/lib/typescript/ui/components/timelabel/TimeLabel.d.ts +32 -0
- package/lib/typescript/ui/components/timelabel/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/uicontroller/UiContainer.d.ts +115 -0
- package/lib/typescript/ui/components/uicontroller/UiControls.d.ts +14 -0
- package/lib/typescript/ui/components/uicontroller/barrel.d.ts +2 -0
- package/lib/typescript/ui/components/util/PlayerContext.d.ts +22 -0
- package/lib/typescript/ui/components/util/TrackUtils.d.ts +10 -0
- package/lib/typescript/ui/components/util/barrel.d.ts +1 -0
- package/lib/typescript/ui/utils/ArrayUtils.d.ts +2 -0
- package/lib/typescript/ui/utils/language/Language.d.ts +19 -0
- package/lib/typescript/web/platform/BrowserDetection.d.ts +23 -0
- package/package.json +15 -9
- package/react-native-theoplayer.json +8 -0
- package/react-native-theoplayer.podspec +32 -6
- package/src/api/THEOplayerView.ts +5 -248
- package/src/api/backgroundAudio/BackgroundAudioConfiguration.ts +23 -0
- package/src/api/backgroundAudio/barrel.ts +1 -0
- package/src/api/barrel.ts +4 -0
- package/src/api/cast/Airplay.ts +3 -3
- package/src/api/cast/CastAPI.ts +3 -4
- package/src/api/cast/CastState.ts +6 -1
- package/src/api/cast/Chromecast.ts +3 -3
- package/src/api/config/PlayerConfiguration.ts +38 -0
- package/src/api/event/AdEvent.ts +25 -31
- package/src/api/event/CastEvent.ts +14 -20
- package/src/api/event/Event.ts +16 -0
- package/src/api/event/EventDispatcher.ts +48 -0
- package/src/api/event/EventListener.ts +8 -0
- package/src/api/event/PlayerEvent.ts +69 -8
- package/src/api/event/TrackEvent.ts +28 -29
- package/src/api/event/barrel.ts +1 -0
- package/src/api/media/MediaControlConfiguration.ts +26 -0
- package/src/api/media/barrel.ts +1 -0
- package/src/api/pip/PiPConfiguration.ts +13 -0
- package/src/api/pip/barrel.ts +1 -0
- package/src/api/player/PlayerEventMap.ts +198 -0
- package/src/api/player/THEOplayer.ts +185 -0
- package/src/api/player/barrel.ts +2 -0
- package/src/api/presentation/PresentationMode.ts +14 -0
- package/src/api/presentation/barrel.ts +1 -0
- package/src/api/source/ads/Ads.ts +6 -1
- package/src/api/source/ads/FreeWheelAdDescription.ts +2 -2
- package/src/api/source/ads/IMAAdDescription.ts +2 -2
- package/src/api/track/MediaTrack.ts +2 -11
- package/src/api/track/TextTrack.ts +20 -15
- package/src/api/track/TextTrackStyle.ts +77 -0
- package/src/api/track/Track.ts +12 -0
- package/src/api/track/barrel.ts +1 -0
- package/src/index.tsx +1 -0
- package/src/internal/THEOplayerView.tsx +209 -236
- package/src/internal/THEOplayerView.web.tsx +82 -494
- package/src/internal/adapter/NativePlayerState.ts +28 -0
- package/src/internal/adapter/THEOplayerAdapter.ts +456 -0
- package/src/internal/adapter/THEOplayerWebAdapter.ts +275 -0
- package/src/internal/adapter/WebEventForwarder.ts +399 -0
- package/src/internal/adapter/abr/AbrAdapter.ts +37 -0
- package/src/internal/adapter/ads/THEOplayerNativeAdsAdapter.ts +39 -0
- package/src/internal/adapter/ads/THEOplayerNativeGoogleDAI.ts +22 -0
- package/src/internal/adapter/ads/THEOplayerWebAdsAdapter.ts +51 -0
- package/src/internal/adapter/cast/THEOplayerNativeAirplay.ts +47 -0
- package/src/internal/adapter/cast/THEOplayerNativeCastAdapter.ts +39 -0
- package/src/internal/adapter/cast/THEOplayerNativeChromecast.ts +57 -0
- package/src/internal/adapter/cast/THEOplayerWebCastAdapter.ts +22 -0
- package/src/internal/adapter/event/BaseEvent.ts +5 -0
- package/src/internal/adapter/event/DefaultEventDispatcher.ts +35 -0
- package/src/internal/adapter/event/PlayerEvents.ts +174 -0
- package/src/internal/adapter/event/native/NativeAdEvent.ts +13 -0
- package/src/internal/adapter/event/native/NativeCastEvent.ts +22 -0
- package/src/internal/adapter/event/native/NativePlayerEvent.ts +111 -0
- package/src/internal/adapter/event/native/NativeTrackEvent.ts +159 -0
- package/src/internal/adapter/track/TextTrackStyleAdapter.ts +55 -0
- package/src/internal/adapter/web/TrackUtils.ts +73 -0
- package/src/internal/adapter/web/WebMediaSession.ts +193 -0
- package/src/internal/adapter/web/WebPresentationModeManager.ts +96 -0
- package/src/internal/utils/arrayUtil.ts +12 -0
- package/src/ui/THEOplayerDefaultUi.tsx +108 -0
- package/src/ui/THEOplayerTheme.ts +112 -0
- package/src/ui/barrel.ts +3 -0
- package/src/ui/components/activityindicator/CenteredDelayedActivityIndicator.tsx +96 -0
- package/src/ui/components/activityindicator/DelayedActivityIndicator.tsx +32 -0
- package/src/ui/components/activityindicator/barrel.ts +2 -0
- package/src/ui/components/barrel.ts +9 -0
- package/src/ui/components/button/AirplayButton.tsx +64 -0
- package/src/ui/components/button/ChromecastButton.tsx +60 -0
- package/src/ui/components/button/ChromecastButton.web.tsx +66 -0
- package/src/ui/components/button/FullscreenButton.tsx +60 -0
- package/src/ui/components/button/MuteButton.tsx +52 -0
- package/src/ui/components/button/PipButton.tsx +61 -0
- package/src/ui/components/button/PlayButton.tsx +107 -0
- package/src/ui/components/button/SkipButton.tsx +112 -0
- package/src/ui/components/button/actionbutton/ActionButton.tsx +105 -0
- package/src/ui/components/button/barrel.ts +9 -0
- package/src/ui/components/button/svg/AirplaySvg.tsx +18 -0
- package/src/ui/components/button/svg/ArrowForwardSvg.tsx +18 -0
- package/src/ui/components/button/svg/BackSvg.tsx +18 -0
- package/src/ui/components/button/svg/BackwardSvg.tsx +18 -0
- package/src/ui/components/button/svg/ChromecastSvg.tsx +18 -0
- package/src/ui/components/button/svg/ErrorSvg.tsx +18 -0
- package/src/ui/components/button/svg/ForwardSvg.tsx +18 -0
- package/src/ui/components/button/svg/FullscreenEnterSvg.tsx +18 -0
- package/src/ui/components/button/svg/FullscreenExitSvg.tsx +18 -0
- package/src/ui/components/button/svg/LanguageSvg.tsx +18 -0
- package/src/ui/components/button/svg/ListSvg.tsx +18 -0
- package/src/ui/components/button/svg/PauseSvg.tsx +18 -0
- package/src/ui/components/button/svg/PipEnterSvg.tsx +18 -0
- package/src/ui/components/button/svg/PipExitSvg.tsx +18 -0
- package/src/ui/components/button/svg/PlaySvg.tsx +18 -0
- package/src/ui/components/button/svg/ReplaySvg.tsx +18 -0
- package/src/ui/components/button/svg/SettingsSvg.tsx +18 -0
- package/src/ui/components/button/svg/SvgUtils.ts +4 -0
- package/src/ui/components/button/svg/VolumeOffSvg.tsx +18 -0
- package/src/ui/components/button/svg/VolumeUpSvg.tsx +18 -0
- package/src/ui/components/button/svg/barrel.ts +20 -0
- package/src/ui/components/button/svg/res/AirPlayButton.html +6 -0
- package/src/ui/components/button/svg/res/Airplay.svg +1 -0
- package/src/ui/components/button/svg/res/ChromecastButton.html +25 -0
- package/src/ui/components/button/svg/res/arrow_forward.svg +1 -0
- package/src/ui/components/button/svg/res/back.svg +1 -0
- package/src/ui/components/button/svg/res/backward.svg +1 -0
- package/src/ui/components/button/svg/res/chromecast-48px.svg +1 -0
- package/src/ui/components/button/svg/res/close.svg +1 -0
- package/src/ui/components/button/svg/res/error.svg +1 -0
- package/src/ui/components/button/svg/res/forward.svg +1 -0
- package/src/ui/components/button/svg/res/fullscreen-enter.svg +1 -0
- package/src/ui/components/button/svg/res/fullscreen-exit.svg +1 -0
- package/src/ui/components/button/svg/res/language.svg +1 -0
- package/src/ui/components/button/svg/res/list.svg +1 -0
- package/src/ui/components/button/svg/res/live.svg +1 -0
- package/src/ui/components/button/svg/res/pause.svg +1 -0
- package/src/ui/components/button/svg/res/pip_enter.svg +1 -0
- package/src/ui/components/button/svg/res/pip_exit.svg +1 -0
- package/src/ui/components/button/svg/res/play.svg +1 -0
- package/src/ui/components/button/svg/res/replay.svg +1 -0
- package/src/ui/components/button/svg/res/settings.svg +1 -0
- package/src/ui/components/button/svg/res/skip-next.svg +1 -0
- package/src/ui/components/button/svg/res/volume-high.svg +1 -0
- package/src/ui/components/button/svg/res/volume-low.svg +1 -0
- package/src/ui/components/button/svg/res/volume-off.svg +1 -0
- package/src/ui/components/controlbar/ControlBar.tsx +69 -0
- package/src/ui/components/controlbar/Spacer.tsx +9 -0
- package/src/ui/components/controlbar/barrel.ts +2 -0
- package/src/ui/components/menu/LanguageMenuButton.tsx +192 -0
- package/src/ui/components/menu/PlaybackRateSubMenu.tsx +93 -0
- package/src/ui/components/menu/QualitySubMenu.tsx +148 -0
- package/src/ui/components/menu/SettingsMenuButton.tsx +25 -0
- package/src/ui/components/menu/barrel.ts +5 -0
- package/src/ui/components/menu/common/MenuButton.tsx +49 -0
- package/src/ui/components/menu/common/MenuRadioButton.tsx +65 -0
- package/src/ui/components/menu/common/MenuTitle.tsx +37 -0
- package/src/ui/components/menu/common/MenuView.tsx +62 -0
- package/src/ui/components/menu/common/ScrollableMenu.tsx +43 -0
- package/src/ui/components/menu/common/SubMenuWithButton.tsx +58 -0
- package/src/ui/components/menu/common/barrel.ts +6 -0
- package/src/ui/components/message/CastMessage.tsx +74 -0
- package/src/ui/components/message/ErrorDisplay.tsx +43 -0
- package/src/ui/components/message/barrel.ts +2 -0
- package/src/ui/components/seekbar/SeekBar.tsx +178 -0
- package/src/ui/components/seekbar/barrel.ts +2 -0
- package/src/ui/components/seekbar/thumbnail/SingleThumbnailView.tsx +38 -0
- package/src/ui/components/seekbar/thumbnail/Thumbnail.ts +72 -0
- package/src/ui/components/seekbar/thumbnail/ThumbnailView.tsx +266 -0
- package/src/ui/components/seekbar/thumbnail/Urlpolyfill.ts +1 -0
- package/src/ui/components/seekbar/thumbnail/Urlpolyfill.web.ts +2 -0
- package/src/ui/components/seekbar/thumbnail/barrel.ts +2 -0
- package/src/ui/components/timelabel/StaticTimeLabel.tsx +63 -0
- package/src/ui/components/timelabel/TimeLabel.tsx +79 -0
- package/src/ui/components/timelabel/barrel.ts +2 -0
- package/src/ui/components/uicontroller/UiContainer.tsx +355 -0
- package/src/ui/components/uicontroller/UiControls.ts +31 -0
- package/src/ui/components/uicontroller/barrel.ts +2 -0
- package/src/ui/components/util/PlayerContext.ts +29 -0
- package/src/ui/components/util/TrackUtils.ts +62 -0
- package/src/ui/components/util/barrel.ts +1 -0
- package/src/ui/utils/ArrayUtils.ts +12 -0
- package/src/ui/utils/language/Language.ts +38 -0
- package/src/ui/utils/language/languages.json +1658 -0
- package/src/web/platform/BrowserDetection.ts +38 -0
- package/src/web/platform/browser.d.ts +43 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.3.0/ads-wrapper-4.3.0.aar +0 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/4.3.0/ads-wrapper-4.3.0.pom +0 -9
- package/ios/custom/Frameworks/ios/put_custom_ios_xcframework_here.txt +0 -2
- package/ios/custom/Frameworks/tvos/put_custom_tvos_xcframework_here.txt +0 -2
- package/ios/custom/react-native-theoplayer_custom.podspec +0 -46
- package/ios/custom/theofeatures.sh +0 -14
- package/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.js +0 -54
- package/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.js.map +0 -1
- package/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.js +0 -34
- package/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.js.map +0 -1
- package/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.js +0 -78
- package/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.js.map +0 -1
- package/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.js +0 -32
- package/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.js.map +0 -1
- package/lib/commonjs/internal/cast/THEOplayerNativeAirplay.js +0 -34
- package/lib/commonjs/internal/cast/THEOplayerNativeAirplay.js.map +0 -1
- package/lib/commonjs/internal/cast/THEOplayerNativeCastApi.js +0 -46
- package/lib/commonjs/internal/cast/THEOplayerNativeCastApi.js.map +0 -1
- package/lib/commonjs/internal/cast/THEOplayerNativeChromecast.js +0 -42
- package/lib/commonjs/internal/cast/THEOplayerNativeChromecast.js.map +0 -1
- package/lib/commonjs/internal/cast/THEOplayerWebCastApi.js +0 -31
- package/lib/commonjs/internal/cast/THEOplayerWebCastApi.js.map +0 -1
- package/lib/commonjs/internal/web/TrackUtils.js +0 -87
- package/lib/commonjs/internal/web/TrackUtils.js.map +0 -1
- package/lib/commonjs/internal/web/stub/CastButtonStub.js +0 -16
- package/lib/commonjs/internal/web/stub/CastButtonStub.js.map +0 -1
- package/lib/module/internal/ads/THEOplayerNativeAdsAPI.js +0 -43
- package/lib/module/internal/ads/THEOplayerNativeAdsAPI.js.map +0 -1
- package/lib/module/internal/ads/THEOplayerNativeGoogleDAI.js +0 -24
- package/lib/module/internal/ads/THEOplayerNativeGoogleDAI.js.map +0 -1
- package/lib/module/internal/ads/THEOplayerWebAdsAPI.js +0 -68
- package/lib/module/internal/ads/THEOplayerWebAdsAPI.js.map +0 -1
- package/lib/module/internal/ads/THEOplayerWebGoogleDAI.js +0 -23
- package/lib/module/internal/ads/THEOplayerWebGoogleDAI.js.map +0 -1
- package/lib/module/internal/cast/THEOplayerNativeAirplay.js +0 -24
- package/lib/module/internal/cast/THEOplayerNativeAirplay.js.map +0 -1
- package/lib/module/internal/cast/THEOplayerNativeCastApi.js +0 -34
- package/lib/module/internal/cast/THEOplayerNativeCastApi.js.map +0 -1
- package/lib/module/internal/cast/THEOplayerNativeChromecast.js +0 -32
- package/lib/module/internal/cast/THEOplayerNativeChromecast.js.map +0 -1
- package/lib/module/internal/cast/THEOplayerWebCastApi.js +0 -22
- package/lib/module/internal/cast/THEOplayerWebCastApi.js.map +0 -1
- package/lib/module/internal/web/TrackUtils.js +0 -72
- package/lib/module/internal/web/TrackUtils.js.map +0 -1
- package/lib/module/internal/web/stub/CastButtonStub.js +0 -6
- package/lib/module/internal/web/stub/CastButtonStub.js.map +0 -1
- package/lib/typescript/babel.config.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/THEOplayerView.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/abr/ABRConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/abr/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/ads/Ad.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/ads/AdBreak.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/ads/AdsAPI.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/ads/AdsConfiguration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/ads/CompanionAd.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/ads/GoogleDai.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/ads/GoogleImaAd.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/ads/GoogleImaConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/ads/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/cast/Airplay.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/cast/CastAPI.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/cast/CastConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/cast/CastState.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/cast/Chromecast.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/cast/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/config/PlayerConfiguration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/config/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionAPI.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionIntegration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionIntegrationFactory.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionRequest.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/drm/ContentProtectionResponse.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/drm/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/error/ChromecastError.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/error/PlayerError.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/error/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/event/AdEvent.d.ts +0 -2
- package/lib/typescript/lib/commonjs/api/event/CastEvent.d.ts +0 -2
- package/lib/typescript/lib/commonjs/api/event/PlayerEvent.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/event/TrackEvent.d.ts +0 -9
- package/lib/typescript/lib/commonjs/api/event/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/SourceDescription.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/Ads.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/ads/FreeWheelAdDescription.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/IMAAdDescription.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/SpotXAdDescription.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/THEOplayerAdDescription.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/ads/ssai/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/dash/DashPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/dash/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/drm/DRMConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/drm/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/hls/HlsPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/hls/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/source/metadata/MetadataDescription.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/metadata/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/timeranges/TimeRange.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/timeranges/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/track/MediaTrack.d.ts +0 -9
- package/lib/typescript/lib/commonjs/api/track/Quality.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/track/TextTrack.d.ts +0 -21
- package/lib/typescript/lib/commonjs/api/track/TextTrackCue.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/track/Track.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/track/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/api/utils/TypeUtils.d.ts +0 -13
- package/lib/typescript/lib/commonjs/api/utils/barrel.d.ts +0 -1
- package/lib/typescript/lib/commonjs/index.d.ts +0 -5
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.d.ts +0 -24
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.style.d.ts +0 -12
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.web.d.ts +0 -24
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerNativeAdsAPI.d.ts +0 -14
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerNativeGoogleDAI.d.ts +0 -9
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerWebAdsAPI.d.ts +0 -14
- package/lib/typescript/lib/commonjs/internal/ads/THEOplayerWebGoogleDAI.d.ts +0 -9
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeAirplay.d.ts +0 -9
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeCastApi.d.ts +0 -12
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeChromecast.d.ts +0 -11
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerWebCastApi.d.ts +0 -8
- package/lib/typescript/lib/commonjs/internal/drm/ContentProtectionRegistry.d.ts +0 -14
- package/lib/typescript/lib/commonjs/internal/drm/ContentProtectionRegistry.web.d.ts +0 -5
- package/lib/typescript/lib/commonjs/internal/drm/NativeCertificateRequest.d.ts +0 -18
- package/lib/typescript/lib/commonjs/internal/drm/NativeCertificateResponse.d.ts +0 -21
- package/lib/typescript/lib/commonjs/internal/drm/NativeContentProtectionEvent.d.ts +0 -0
- package/lib/typescript/lib/commonjs/internal/drm/NativeLicenseRequest.d.ts +0 -20
- package/lib/typescript/lib/commonjs/internal/drm/NativeLicenseResponse.d.ts +0 -22
- package/lib/typescript/lib/commonjs/internal/utils/TypeUtils.d.ts +0 -6
- package/lib/typescript/lib/commonjs/internal/web/TrackUtils.d.ts +0 -32
- package/lib/typescript/lib/commonjs/internal/web/stub/CastButtonStub.d.ts +0 -2
- package/lib/typescript/lib/module/api/THEOplayerView.d.ts +0 -1
- package/lib/typescript/lib/module/api/abr/ABRConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/abr/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/ads/Ad.d.ts +0 -1
- package/lib/typescript/lib/module/api/ads/AdBreak.d.ts +0 -1
- package/lib/typescript/lib/module/api/ads/AdsAPI.d.ts +0 -1
- package/lib/typescript/lib/module/api/ads/AdsConfiguration.d.ts +0 -1
- package/lib/typescript/lib/module/api/ads/CompanionAd.d.ts +0 -0
- package/lib/typescript/lib/module/api/ads/GoogleDai.d.ts +0 -0
- package/lib/typescript/lib/module/api/ads/GoogleImaAd.d.ts +0 -1
- package/lib/typescript/lib/module/api/ads/GoogleImaConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/ads/barrel.d.ts +0 -5
- package/lib/typescript/lib/module/api/barrel.d.ts +0 -12
- package/lib/typescript/lib/module/api/cast/Airplay.d.ts +0 -1
- package/lib/typescript/lib/module/api/cast/CastAPI.d.ts +0 -1
- package/lib/typescript/lib/module/api/cast/CastConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/cast/CastState.d.ts +0 -0
- package/lib/typescript/lib/module/api/cast/Chromecast.d.ts +0 -1
- package/lib/typescript/lib/module/api/cast/barrel.d.ts +0 -3
- package/lib/typescript/lib/module/api/config/PlayerConfiguration.d.ts +0 -1
- package/lib/typescript/lib/module/api/config/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/drm/ContentProtectionAPI.d.ts +0 -1
- package/lib/typescript/lib/module/api/drm/ContentProtectionIntegration.d.ts +0 -1
- package/lib/typescript/lib/module/api/drm/ContentProtectionIntegrationFactory.d.ts +0 -1
- package/lib/typescript/lib/module/api/drm/ContentProtectionRequest.d.ts +0 -0
- package/lib/typescript/lib/module/api/drm/ContentProtectionResponse.d.ts +0 -1
- package/lib/typescript/lib/module/api/drm/barrel.d.ts +0 -4
- package/lib/typescript/lib/module/api/error/ChromecastError.d.ts +0 -0
- package/lib/typescript/lib/module/api/error/PlayerError.d.ts +0 -0
- package/lib/typescript/lib/module/api/error/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/event/AdEvent.d.ts +0 -1
- package/lib/typescript/lib/module/api/event/CastEvent.d.ts +0 -1
- package/lib/typescript/lib/module/api/event/PlayerEvent.d.ts +0 -1
- package/lib/typescript/lib/module/api/event/TrackEvent.d.ts +0 -4
- package/lib/typescript/lib/module/api/event/barrel.d.ts +0 -4
- package/lib/typescript/lib/module/api/source/SourceDescription.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/Ads.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/ads/FreeWheelAdDescription.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/IMAAdDescription.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/SpotXAdDescription.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/THEOplayerAdDescription.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/barrel.d.ts +0 -5
- package/lib/typescript/lib/module/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/ads/ssai/barrel.d.ts +0 -4
- package/lib/typescript/lib/module/api/source/barrel.d.ts +0 -6
- package/lib/typescript/lib/module/api/source/dash/DashPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/dash/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/drm/DRMConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/drm/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/hls/HlsPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/hls/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/source/metadata/MetadataDescription.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/metadata/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/timeranges/TimeRange.d.ts +0 -0
- package/lib/typescript/lib/module/api/timeranges/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/api/track/MediaTrack.d.ts +0 -8
- package/lib/typescript/lib/module/api/track/Quality.d.ts +0 -0
- package/lib/typescript/lib/module/api/track/TextTrack.d.ts +0 -20
- package/lib/typescript/lib/module/api/track/TextTrackCue.d.ts +0 -0
- package/lib/typescript/lib/module/api/track/Track.d.ts +0 -0
- package/lib/typescript/lib/module/api/track/barrel.d.ts +0 -2
- package/lib/typescript/lib/module/api/utils/TypeUtils.d.ts +0 -12
- package/lib/typescript/lib/module/api/utils/barrel.d.ts +0 -1
- package/lib/typescript/lib/module/index.d.ts +0 -3
- package/lib/typescript/lib/module/internal/THEOplayerView.d.ts +0 -25
- package/lib/typescript/lib/module/internal/THEOplayerView.style.d.ts +0 -11
- package/lib/typescript/lib/module/internal/THEOplayerView.web.d.ts +0 -24
- package/lib/typescript/lib/module/internal/ads/THEOplayerNativeAdsAPI.d.ts +0 -13
- package/lib/typescript/lib/module/internal/ads/THEOplayerNativeGoogleDAI.d.ts +0 -8
- package/lib/typescript/lib/module/internal/ads/THEOplayerWebAdsAPI.d.ts +0 -13
- package/lib/typescript/lib/module/internal/ads/THEOplayerWebGoogleDAI.d.ts +0 -8
- package/lib/typescript/lib/module/internal/cast/THEOplayerNativeAirplay.d.ts +0 -8
- package/lib/typescript/lib/module/internal/cast/THEOplayerNativeCastApi.d.ts +0 -11
- package/lib/typescript/lib/module/internal/cast/THEOplayerNativeChromecast.d.ts +0 -10
- package/lib/typescript/lib/module/internal/cast/THEOplayerWebCastApi.d.ts +0 -7
- package/lib/typescript/lib/module/internal/drm/ContentProtectionRegistry.d.ts +0 -13
- package/lib/typescript/lib/module/internal/drm/ContentProtectionRegistry.web.d.ts +0 -4
- package/lib/typescript/lib/module/internal/drm/NativeCertificateRequest.d.ts +0 -17
- package/lib/typescript/lib/module/internal/drm/NativeCertificateResponse.d.ts +0 -20
- package/lib/typescript/lib/module/internal/drm/NativeContentProtectionEvent.d.ts +0 -0
- package/lib/typescript/lib/module/internal/drm/NativeLicenseRequest.d.ts +0 -19
- package/lib/typescript/lib/module/internal/drm/NativeLicenseResponse.d.ts +0 -21
- package/lib/typescript/lib/module/internal/utils/TypeUtils.d.ts +0 -5
- package/lib/typescript/lib/module/internal/web/TrackUtils.d.ts +0 -31
- package/lib/typescript/lib/module/internal/web/stub/CastButtonStub.d.ts +0 -2
- package/lib/typescript/src/api/THEOplayerView.d.ts +0 -217
- package/lib/typescript/src/api/barrel.d.ts +0 -12
- package/lib/typescript/src/api/cast/Airplay.d.ts +0 -27
- package/lib/typescript/src/api/cast/CastAPI.d.ts +0 -25
- package/lib/typescript/src/api/cast/CastState.d.ts +0 -10
- package/lib/typescript/src/api/cast/Chromecast.d.ts +0 -39
- package/lib/typescript/src/api/config/PlayerConfiguration.d.ts +0 -24
- package/lib/typescript/src/api/event/AdEvent.d.ts +0 -13
- package/lib/typescript/src/api/event/CastEvent.d.ts +0 -21
- package/lib/typescript/src/api/event/PlayerEvent.d.ts +0 -56
- package/lib/typescript/src/api/event/TrackEvent.d.ts +0 -92
- package/lib/typescript/src/api/event/barrel.d.ts +0 -4
- package/lib/typescript/src/api/source/ads/Ads.d.ts +0 -94
- package/lib/typescript/src/api/source/ads/FreeWheelAdDescription.d.ts +0 -85
- package/lib/typescript/src/api/source/ads/IMAAdDescription.d.ts +0 -25
- package/lib/typescript/src/api/track/MediaTrack.d.ts +0 -58
- package/lib/typescript/src/api/track/TextTrack.d.ts +0 -86
- package/lib/typescript/src/api/track/Track.d.ts +0 -43
- package/lib/typescript/src/api/track/barrel.d.ts +0 -5
- package/lib/typescript/src/index.d.ts +0 -3
- package/lib/typescript/src/internal/THEOplayerView.d.ts +0 -87
- package/lib/typescript/src/internal/THEOplayerView.web.d.ts +0 -32
- package/lib/typescript/src/internal/ads/THEOplayerNativeAdsAPI.d.ts +0 -17
- package/lib/typescript/src/internal/ads/THEOplayerNativeGoogleDAI.d.ts +0 -10
- package/lib/typescript/src/internal/ads/THEOplayerWebAdsAPI.d.ts +0 -15
- package/lib/typescript/src/internal/cast/THEOplayerNativeAirplay.d.ts +0 -9
- package/lib/typescript/src/internal/cast/THEOplayerNativeCastApi.d.ts +0 -10
- package/lib/typescript/src/internal/cast/THEOplayerNativeChromecast.d.ts +0 -11
- package/lib/typescript/src/internal/cast/THEOplayerWebCastApi.d.ts +0 -9
- package/lib/typescript/src/internal/web/TrackUtils.d.ts +0 -7
- package/lib/typescript/src/internal/web/stub/CastButtonStub.d.ts +0 -3
- package/src/internal/ads/THEOplayerNativeAdsAPI.ts +0 -44
- package/src/internal/ads/THEOplayerNativeGoogleDAI.ts +0 -23
- package/src/internal/ads/THEOplayerWebAdsAPI.ts +0 -51
- package/src/internal/cast/THEOplayerNativeAirplay.ts +0 -22
- package/src/internal/cast/THEOplayerNativeCastApi.ts +0 -28
- package/src/internal/cast/THEOplayerNativeChromecast.ts +0 -30
- package/src/internal/cast/THEOplayerWebCastApi.ts +0 -21
- package/src/internal/web/TrackUtils.ts +0 -65
- package/src/internal/web/stub/CastButtonStub.tsx +0 -7
- /package/lib/typescript/{src/__tests__ → __tests__}/index.test.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/abr/ABRConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/abr/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/Ad.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/AdBreak.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/AdsAPI.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/AdsConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/CompanionAd.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/GoogleDai.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/GoogleImaAd.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/GoogleImaConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/ads/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/cast/CastConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/cast/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/config/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/drm/ContentProtectionAPI.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/drm/ContentProtectionIntegration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/drm/ContentProtectionIntegrationFactory.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/drm/ContentProtectionRequest.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/drm/ContentProtectionResponse.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/drm/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/error/ChromecastError.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/error/PlayerError.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/error/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/SourceDescription.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/SpotXAdDescription.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/THEOplayerAdDescription.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/ssai/GoogleDAIConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/ads/ssai/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/dash/DashPlaybackConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/dash/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/drm/DRMConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/drm/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/hls/HlsPlaybackConfiguration.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/hls/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/metadata/MetadataDescription.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/source/metadata/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/timeranges/TimeRange.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/timeranges/barrel.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/track/Quality.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/track/TextTrackCue.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/utils/TypeUtils.d.ts +0 -0
- /package/lib/typescript/{src/api → api}/utils/barrel.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/THEOplayerView.style.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal/adapter}/ads/THEOplayerWebGoogleDAI.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/ContentProtectionRegistry.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/ContentProtectionRegistry.web.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/NativeCertificateRequest.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/NativeCertificateResponse.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/NativeContentProtectionEvent.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/NativeLicenseRequest.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/drm/NativeLicenseResponse.d.ts +0 -0
- /package/lib/typescript/{src/internal → internal}/utils/TypeUtils.d.ts +0 -0
- /package/src/internal/{ads → adapter/ads}/THEOplayerWebGoogleDAI.ts +0 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.THEOplayerWebAdapter = void 0;
|
|
7
|
+
var _DefaultEventDispatcher = require("./event/DefaultEventDispatcher");
|
|
8
|
+
var _THEOplayerWebAdsAdapter = require("./ads/THEOplayerWebAdsAdapter");
|
|
9
|
+
var _THEOplayerWebCastAdapter = require("./cast/THEOplayerWebCastAdapter");
|
|
10
|
+
var _TrackUtils = require("./web/TrackUtils");
|
|
11
|
+
var _WebEventForwarder = require("./WebEventForwarder");
|
|
12
|
+
var _WebPresentationModeManager = require("./web/WebPresentationModeManager");
|
|
13
|
+
var _WebMediaSession = require("./web/WebMediaSession");
|
|
14
|
+
var _reactNativeTheoplayer = require("react-native-theoplayer");
|
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
+
const defaultBackgroundAudioConfiguration = {
|
|
19
|
+
enabled: false
|
|
20
|
+
};
|
|
21
|
+
const defaultPipConfiguration = {
|
|
22
|
+
startsAutomatically: false
|
|
23
|
+
};
|
|
24
|
+
class THEOplayerWebAdapter extends _DefaultEventDispatcher.DefaultEventDispatcher {
|
|
25
|
+
constructor(player, config) {
|
|
26
|
+
var _config$mediaControl;
|
|
27
|
+
super();
|
|
28
|
+
_defineProperty(this, "_player", void 0);
|
|
29
|
+
_defineProperty(this, "_adsAdapter", void 0);
|
|
30
|
+
_defineProperty(this, "_castAdapter", void 0);
|
|
31
|
+
_defineProperty(this, "_eventForwarder", void 0);
|
|
32
|
+
_defineProperty(this, "_presentationModeManager", void 0);
|
|
33
|
+
_defineProperty(this, "_mediaSession", undefined);
|
|
34
|
+
_defineProperty(this, "_targetVideoQuality", undefined);
|
|
35
|
+
_defineProperty(this, "_backgroundAudioConfiguration", defaultBackgroundAudioConfiguration);
|
|
36
|
+
_defineProperty(this, "_pipConfiguration", defaultPipConfiguration);
|
|
37
|
+
_defineProperty(this, "onVisibilityChange", () => {
|
|
38
|
+
var _this$_mediaSession;
|
|
39
|
+
if (document.visibilityState !== 'visible') {
|
|
40
|
+
// Apply background configuration: by default, pause when going to background, unless in pip
|
|
41
|
+
if (this.presentationMode !== _reactNativeTheoplayer.PresentationMode.pip && !this.backgroundAudioConfiguration.enabled) {
|
|
42
|
+
this._player.pause();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Apply media session controls
|
|
46
|
+
(_this$_mediaSession = this._mediaSession) === null || _this$_mediaSession === void 0 ? void 0 : _this$_mediaSession.updateActionHandlers();
|
|
47
|
+
});
|
|
48
|
+
this._player = player;
|
|
49
|
+
this._adsAdapter = new _THEOplayerWebAdsAdapter.THEOplayerWebAdsAdapter(this._player);
|
|
50
|
+
this._castAdapter = new _THEOplayerWebCastAdapter.THEOplayerWebCastAdapter(this._player);
|
|
51
|
+
this._eventForwarder = new _WebEventForwarder.WebEventForwarder(this._player, this);
|
|
52
|
+
this._presentationModeManager = new _WebPresentationModeManager.WebPresentationModeManager(this._player, this);
|
|
53
|
+
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
|
54
|
+
|
|
55
|
+
// Optionally create a media session connector
|
|
56
|
+
if ((config === null || config === void 0 ? void 0 : (_config$mediaControl = config.mediaControl) === null || _config$mediaControl === void 0 ? void 0 : _config$mediaControl.mediaSessionEnabled) !== false) {
|
|
57
|
+
this._mediaSession = new _WebMediaSession.WebMediaSession(this, player);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
get abr() {
|
|
61
|
+
return this._player.abr;
|
|
62
|
+
}
|
|
63
|
+
get source() {
|
|
64
|
+
return this._player.source;
|
|
65
|
+
}
|
|
66
|
+
set source(source) {
|
|
67
|
+
this._targetVideoQuality = undefined;
|
|
68
|
+
this._player.source = source;
|
|
69
|
+
}
|
|
70
|
+
play() {
|
|
71
|
+
this._player.play();
|
|
72
|
+
}
|
|
73
|
+
pause() {
|
|
74
|
+
this._player.pause();
|
|
75
|
+
}
|
|
76
|
+
get paused() {
|
|
77
|
+
return this._player.paused;
|
|
78
|
+
}
|
|
79
|
+
get autoplay() {
|
|
80
|
+
return this._player.autoplay;
|
|
81
|
+
}
|
|
82
|
+
set autoplay(autoplay) {
|
|
83
|
+
this._player.autoplay = autoplay;
|
|
84
|
+
}
|
|
85
|
+
set preload(type) {
|
|
86
|
+
this._player.preload = type;
|
|
87
|
+
}
|
|
88
|
+
get preload() {
|
|
89
|
+
return this._player.preload;
|
|
90
|
+
}
|
|
91
|
+
get seekable() {
|
|
92
|
+
const nativeRange = this._player.seekable;
|
|
93
|
+
return [...Array(nativeRange.length)].map((_, index) => ({
|
|
94
|
+
start: 1e3 * nativeRange.start(index),
|
|
95
|
+
end: 1e3 * nativeRange.end(index)
|
|
96
|
+
}));
|
|
97
|
+
}
|
|
98
|
+
get buffered() {
|
|
99
|
+
const nativeRange = this._player.buffered;
|
|
100
|
+
return [...Array(nativeRange.length)].map((_, index) => ({
|
|
101
|
+
start: 1e3 * nativeRange.start(index),
|
|
102
|
+
end: 1e3 * nativeRange.end(index)
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
get playbackRate() {
|
|
106
|
+
return this._player.playbackRate;
|
|
107
|
+
}
|
|
108
|
+
set playbackRate(playbackRate) {
|
|
109
|
+
this._player.playbackRate = playbackRate;
|
|
110
|
+
}
|
|
111
|
+
get pipConfiguration() {
|
|
112
|
+
return this._pipConfiguration;
|
|
113
|
+
}
|
|
114
|
+
set pipConfiguration(config) {
|
|
115
|
+
this._pipConfiguration = config;
|
|
116
|
+
}
|
|
117
|
+
get backgroundAudioConfiguration() {
|
|
118
|
+
return this._backgroundAudioConfiguration;
|
|
119
|
+
}
|
|
120
|
+
set backgroundAudioConfiguration(config) {
|
|
121
|
+
var _this$_mediaSession2;
|
|
122
|
+
this._backgroundAudioConfiguration = config;
|
|
123
|
+
|
|
124
|
+
// Notify media session
|
|
125
|
+
(_this$_mediaSession2 = this._mediaSession) === null || _this$_mediaSession2 === void 0 ? void 0 : _this$_mediaSession2.updateActionHandlers();
|
|
126
|
+
}
|
|
127
|
+
get volume() {
|
|
128
|
+
return this._player.volume;
|
|
129
|
+
}
|
|
130
|
+
set volume(volume) {
|
|
131
|
+
this._player.volume = volume;
|
|
132
|
+
}
|
|
133
|
+
get muted() {
|
|
134
|
+
return this._player.muted;
|
|
135
|
+
}
|
|
136
|
+
set muted(muted) {
|
|
137
|
+
this._player.muted = muted;
|
|
138
|
+
}
|
|
139
|
+
get seeking() {
|
|
140
|
+
return this._player.seeking;
|
|
141
|
+
}
|
|
142
|
+
get presentationMode() {
|
|
143
|
+
return this._presentationModeManager.presentationMode;
|
|
144
|
+
}
|
|
145
|
+
set presentationMode(presentationMode) {
|
|
146
|
+
this._presentationModeManager.presentationMode = presentationMode;
|
|
147
|
+
}
|
|
148
|
+
get audioTracks() {
|
|
149
|
+
return (0, _TrackUtils.fromNativeMediaTrackList)(this._player.audioTracks);
|
|
150
|
+
}
|
|
151
|
+
get videoTracks() {
|
|
152
|
+
return (0, _TrackUtils.fromNativeMediaTrackList)(this._player.videoTracks);
|
|
153
|
+
}
|
|
154
|
+
get textTracks() {
|
|
155
|
+
return (0, _TrackUtils.fromNativeTextTrackList)(this._player.textTracks);
|
|
156
|
+
}
|
|
157
|
+
get selectedTextTrack() {
|
|
158
|
+
var _this$_player$textTra;
|
|
159
|
+
return (_this$_player$textTra = this._player.textTracks.find(textTrack => {
|
|
160
|
+
return textTrack.mode === 'showing';
|
|
161
|
+
})) === null || _this$_player$textTra === void 0 ? void 0 : _this$_player$textTra.uid;
|
|
162
|
+
}
|
|
163
|
+
set selectedTextTrack(selectedTextTrack) {
|
|
164
|
+
this._player.textTracks.forEach(textTrack => {
|
|
165
|
+
textTrack.mode = textTrack.uid === selectedTextTrack ? 'showing' : 'disabled';
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
get textTrackStyle() {
|
|
169
|
+
return this._player.textTrackStyle;
|
|
170
|
+
}
|
|
171
|
+
get selectedVideoTrack() {
|
|
172
|
+
var _this$_player$videoTr;
|
|
173
|
+
return (_this$_player$videoTr = this._player.videoTracks.find(videoTrack => videoTrack.enabled)) === null || _this$_player$videoTr === void 0 ? void 0 : _this$_player$videoTr.uid;
|
|
174
|
+
}
|
|
175
|
+
set selectedVideoTrack(selectedVideoTrack) {
|
|
176
|
+
this._targetVideoQuality = undefined;
|
|
177
|
+
this._player.videoTracks.forEach(videoTrack => {
|
|
178
|
+
videoTrack.enabled = videoTrack.uid === selectedVideoTrack;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
get selectedAudioTrack() {
|
|
182
|
+
var _this$_player$audioTr;
|
|
183
|
+
return (_this$_player$audioTr = this._player.audioTracks.find(audioTrack => {
|
|
184
|
+
return audioTrack.enabled;
|
|
185
|
+
})) === null || _this$_player$audioTr === void 0 ? void 0 : _this$_player$audioTr.uid;
|
|
186
|
+
}
|
|
187
|
+
set selectedAudioTrack(selectedAudioTrack) {
|
|
188
|
+
this._player.audioTracks.forEach(audioTrack => {
|
|
189
|
+
audioTrack.enabled = audioTrack.uid === selectedAudioTrack;
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
get targetVideoQuality() {
|
|
193
|
+
return this._targetVideoQuality;
|
|
194
|
+
}
|
|
195
|
+
set targetVideoQuality(targetVideoQuality) {
|
|
196
|
+
const enabledVideoTrack = this._player.videoTracks.find(videoTrack => videoTrack.enabled);
|
|
197
|
+
if (enabledVideoTrack) {
|
|
198
|
+
enabledVideoTrack.targetQuality = (0, _TrackUtils.findNativeQualitiesByUid)(enabledVideoTrack, targetVideoQuality);
|
|
199
|
+
}
|
|
200
|
+
this._targetVideoQuality = targetVideoQuality;
|
|
201
|
+
}
|
|
202
|
+
get currentTime() {
|
|
203
|
+
return 1e3 * this._player.currentTime;
|
|
204
|
+
}
|
|
205
|
+
set currentTime(currentTime) {
|
|
206
|
+
if (isNaN(currentTime)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (this._player) {
|
|
210
|
+
this._player.currentTime = currentTime / 1e3;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
get duration() {
|
|
214
|
+
return this._player.duration * 1e3;
|
|
215
|
+
}
|
|
216
|
+
get ads() {
|
|
217
|
+
return this._adsAdapter;
|
|
218
|
+
}
|
|
219
|
+
get cast() {
|
|
220
|
+
return this._castAdapter;
|
|
221
|
+
}
|
|
222
|
+
destroy() {
|
|
223
|
+
var _this$_mediaSession3;
|
|
224
|
+
this._eventForwarder.unload();
|
|
225
|
+
(_this$_mediaSession3 = this._mediaSession) === null || _this$_mediaSession3 === void 0 ? void 0 : _this$_mediaSession3.destroy();
|
|
226
|
+
document.removeEventListener('visibilitychange', this.onVisibilityChange);
|
|
227
|
+
}
|
|
228
|
+
get nativeHandle() {
|
|
229
|
+
return this._player;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
exports.THEOplayerWebAdapter = THEOplayerWebAdapter;
|
|
233
|
+
//# sourceMappingURL=THEOplayerWebAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_DefaultEventDispatcher","require","_THEOplayerWebAdsAdapter","_THEOplayerWebCastAdapter","_TrackUtils","_WebEventForwarder","_WebPresentationModeManager","_WebMediaSession","_reactNativeTheoplayer","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","defaultBackgroundAudioConfiguration","enabled","defaultPipConfiguration","startsAutomatically","THEOplayerWebAdapter","DefaultEventDispatcher","constructor","player","config","_config$mediaControl","_this$_mediaSession","document","visibilityState","presentationMode","PresentationMode","pip","backgroundAudioConfiguration","_player","pause","_mediaSession","updateActionHandlers","_adsAdapter","THEOplayerWebAdsAdapter","_castAdapter","THEOplayerWebCastAdapter","_eventForwarder","WebEventForwarder","_presentationModeManager","WebPresentationModeManager","addEventListener","onVisibilityChange","mediaControl","mediaSessionEnabled","WebMediaSession","abr","source","_targetVideoQuality","play","paused","autoplay","preload","type","seekable","nativeRange","Array","length","map","_","index","start","end","buffered","playbackRate","pipConfiguration","_pipConfiguration","_backgroundAudioConfiguration","_this$_mediaSession2","volume","muted","seeking","audioTracks","fromNativeMediaTrackList","videoTracks","textTracks","fromNativeTextTrackList","selectedTextTrack","_this$_player$textTra","find","textTrack","mode","uid","forEach","textTrackStyle","selectedVideoTrack","_this$_player$videoTr","videoTrack","selectedAudioTrack","_this$_player$audioTr","audioTrack","targetVideoQuality","enabledVideoTrack","targetQuality","findNativeQualitiesByUid","currentTime","isNaN","duration","ads","cast","destroy","_this$_mediaSession3","unload","removeEventListener","nativeHandle","exports"],"sources":["THEOplayerWebAdapter.ts"],"sourcesContent":["import { DefaultEventDispatcher } from './event/DefaultEventDispatcher';\nimport type {\n AdsAPI,\n CastAPI,\n MediaTrack,\n NativeHandleType,\n PlayerEventMap,\n PreloadType,\n TextTrack,\n TextTrackStyle,\n THEOplayer,\n PlayerConfiguration,\n} from 'react-native-theoplayer';\nimport { THEOplayerWebAdsAdapter } from './ads/THEOplayerWebAdsAdapter';\nimport { THEOplayerWebCastAdapter } from './cast/THEOplayerWebCastAdapter';\nimport type * as THEOplayerWeb from 'theoplayer';\nimport type { MediaTrack as NativeMediaTrack, TextTrack as NativeTextTrack } from 'theoplayer';\nimport { findNativeQualitiesByUid, fromNativeMediaTrackList, fromNativeTextTrackList } from './web/TrackUtils';\nimport type { ABRConfiguration, SourceDescription } from 'src/api/barrel';\nimport { WebEventForwarder } from './WebEventForwarder';\nimport type { PiPConfiguration } from 'src/api/pip/PiPConfiguration';\nimport type { BackgroundAudioConfiguration } from 'src/api/backgroundAudio/BackgroundAudioConfiguration';\nimport { WebPresentationModeManager } from './web/WebPresentationModeManager';\nimport { WebMediaSession } from './web/WebMediaSession';\nimport { PresentationMode } from 'react-native-theoplayer';\n\nconst defaultBackgroundAudioConfiguration: BackgroundAudioConfiguration = {\n enabled: false,\n};\n\nconst defaultPipConfiguration: PiPConfiguration = {\n startsAutomatically: false,\n};\n\nexport class THEOplayerWebAdapter extends DefaultEventDispatcher<PlayerEventMap> implements THEOplayer {\n private readonly _player: THEOplayerWeb.ChromelessPlayer;\n private readonly _adsAdapter: THEOplayerWebAdsAdapter;\n private readonly _castAdapter: THEOplayerWebCastAdapter;\n private readonly _eventForwarder: WebEventForwarder;\n private readonly _presentationModeManager: WebPresentationModeManager;\n private readonly _mediaSession: WebMediaSession | undefined = undefined;\n private _targetVideoQuality: number | number[] | undefined = undefined;\n private _backgroundAudioConfiguration: BackgroundAudioConfiguration = defaultBackgroundAudioConfiguration;\n private _pipConfiguration: PiPConfiguration = defaultPipConfiguration;\n\n constructor(player: THEOplayerWeb.ChromelessPlayer, config?: PlayerConfiguration) {\n super();\n this._player = player;\n this._adsAdapter = new THEOplayerWebAdsAdapter(this._player);\n this._castAdapter = new THEOplayerWebCastAdapter(this._player);\n this._eventForwarder = new WebEventForwarder(this._player, this);\n this._presentationModeManager = new WebPresentationModeManager(this._player, this);\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n\n // Optionally create a media session connector\n if (config?.mediaControl?.mediaSessionEnabled !== false) {\n this._mediaSession = new WebMediaSession(this, player);\n }\n }\n\n get abr(): ABRConfiguration | undefined {\n return this._player.abr;\n }\n\n get source(): SourceDescription | undefined {\n return this._player.source as SourceDescription;\n }\n\n set source(source: SourceDescription | undefined) {\n this._targetVideoQuality = undefined;\n this._player.source = source;\n }\n\n play(): void {\n this._player.play();\n }\n\n pause(): void {\n this._player.pause();\n }\n\n get paused(): boolean {\n return this._player.paused;\n }\n\n get autoplay(): boolean {\n return this._player.autoplay;\n }\n\n set autoplay(autoplay: boolean) {\n this._player.autoplay = autoplay;\n }\n\n set preload(type: PreloadType) {\n this._player.preload = type;\n }\n\n get preload(): PreloadType {\n return this._player.preload;\n }\n\n get seekable() {\n const nativeRange = this._player.seekable;\n return [...Array(nativeRange.length)].map((_, index) => ({ start: 1e3 * nativeRange.start(index), end: 1e3 * nativeRange.end(index) }));\n }\n\n get buffered() {\n const nativeRange = this._player.buffered;\n return [...Array(nativeRange.length)].map((_, index) => ({ start: 1e3 * nativeRange.start(index), end: 1e3 * nativeRange.end(index) }));\n }\n\n get playbackRate(): number {\n return this._player.playbackRate;\n }\n\n set playbackRate(playbackRate: number) {\n this._player.playbackRate = playbackRate;\n }\n\n get pipConfiguration(): PiPConfiguration {\n return this._pipConfiguration;\n }\n\n set pipConfiguration(config: PiPConfiguration) {\n this._pipConfiguration = config;\n }\n\n get backgroundAudioConfiguration(): BackgroundAudioConfiguration {\n return this._backgroundAudioConfiguration;\n }\n\n set backgroundAudioConfiguration(config: BackgroundAudioConfiguration) {\n this._backgroundAudioConfiguration = config;\n\n // Notify media session\n this._mediaSession?.updateActionHandlers();\n }\n\n get volume(): number {\n return this._player.volume;\n }\n\n set volume(volume: number) {\n this._player.volume = volume;\n }\n\n get muted(): boolean {\n return this._player.muted;\n }\n\n set muted(muted: boolean) {\n this._player.muted = muted;\n }\n\n get seeking(): boolean {\n return this._player.seeking;\n }\n\n get presentationMode(): PresentationMode {\n return this._presentationModeManager.presentationMode;\n }\n\n set presentationMode(presentationMode: PresentationMode) {\n this._presentationModeManager.presentationMode = presentationMode;\n }\n\n get audioTracks(): MediaTrack[] {\n return fromNativeMediaTrackList(this._player.audioTracks);\n }\n\n get videoTracks(): MediaTrack[] {\n return fromNativeMediaTrackList(this._player.videoTracks);\n }\n\n get textTracks(): TextTrack[] {\n return fromNativeTextTrackList(this._player.textTracks);\n }\n\n get selectedTextTrack(): number | undefined {\n return this._player.textTracks.find((textTrack: NativeTextTrack) => {\n return textTrack.mode === 'showing';\n })?.uid;\n }\n\n set selectedTextTrack(selectedTextTrack: number | undefined) {\n this._player.textTracks.forEach((textTrack: NativeTextTrack) => {\n textTrack.mode = textTrack.uid === selectedTextTrack ? 'showing' : 'disabled';\n });\n }\n\n get textTrackStyle(): TextTrackStyle {\n return this._player.textTrackStyle as TextTrackStyle;\n }\n\n get selectedVideoTrack(): number | undefined {\n return this._player.videoTracks.find((videoTrack: NativeMediaTrack) => videoTrack.enabled)?.uid;\n }\n\n set selectedVideoTrack(selectedVideoTrack: number | undefined) {\n this._targetVideoQuality = undefined;\n this._player.videoTracks.forEach((videoTrack: NativeMediaTrack) => {\n videoTrack.enabled = videoTrack.uid === selectedVideoTrack;\n });\n }\n\n get selectedAudioTrack(): number | undefined {\n return this._player.audioTracks.find((audioTrack: NativeMediaTrack) => {\n return audioTrack.enabled;\n })?.uid;\n }\n\n set selectedAudioTrack(selectedAudioTrack: number | undefined) {\n this._player.audioTracks.forEach((audioTrack: NativeMediaTrack) => {\n audioTrack.enabled = audioTrack.uid === selectedAudioTrack;\n });\n }\n\n get targetVideoQuality(): number | number[] | undefined {\n return this._targetVideoQuality;\n }\n\n set targetVideoQuality(targetVideoQuality: number | number[] | undefined) {\n const enabledVideoTrack = this._player.videoTracks.find((videoTrack: NativeMediaTrack) => videoTrack.enabled);\n if (enabledVideoTrack) {\n enabledVideoTrack.targetQuality = findNativeQualitiesByUid(enabledVideoTrack, targetVideoQuality);\n }\n this._targetVideoQuality = targetVideoQuality;\n }\n\n get currentTime(): number {\n return 1e3 * this._player.currentTime;\n }\n\n set currentTime(currentTime: number) {\n if (isNaN(currentTime)) {\n return;\n }\n if (this._player) {\n this._player.currentTime = currentTime / 1e3;\n }\n }\n\n get duration(): number {\n return this._player.duration * 1e3;\n }\n\n public get ads(): AdsAPI {\n return this._adsAdapter;\n }\n\n public get cast(): CastAPI {\n return this._castAdapter;\n }\n\n destroy(): void {\n this._eventForwarder.unload();\n this._mediaSession?.destroy();\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n }\n\n get nativeHandle(): NativeHandleType {\n return this._player;\n }\n\n private readonly onVisibilityChange = () => {\n if (document.visibilityState !== 'visible') {\n // Apply background configuration: by default, pause when going to background, unless in pip\n if (this.presentationMode !== PresentationMode.pip && !this.backgroundAudioConfiguration.enabled) {\n this._player.pause();\n }\n }\n // Apply media session controls\n this._mediaSession?.updateActionHandlers();\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WebEventForwarder = void 0;
|
|
7
|
+
var _reactNativeTheoplayer = require("react-native-theoplayer");
|
|
8
|
+
var _BaseEvent = require("./event/BaseEvent");
|
|
9
|
+
var _PlayerEvents = require("./event/PlayerEvents");
|
|
10
|
+
var _TrackUtils = require("./web/TrackUtils");
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
class WebEventForwarder {
|
|
15
|
+
constructor(player, facade) {
|
|
16
|
+
_defineProperty(this, "_player", void 0);
|
|
17
|
+
_defineProperty(this, "_facade", void 0);
|
|
18
|
+
_defineProperty(this, "onSourceChange", () => {
|
|
19
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.SOURCE_CHANGE));
|
|
20
|
+
});
|
|
21
|
+
_defineProperty(this, "onLoadStart", () => {
|
|
22
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.LOAD_START));
|
|
23
|
+
});
|
|
24
|
+
_defineProperty(this, "onLoadedData", () => {
|
|
25
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.LOADED_DATA));
|
|
26
|
+
});
|
|
27
|
+
_defineProperty(this, "onLoadedMetadata", () => {
|
|
28
|
+
var _this$_player$textTra, _this$_player$videoTr, _this$_player$audioTr;
|
|
29
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultLoadedMetadataEvent(this._player.textTracks.map(textTrack => (0, _TrackUtils.fromNativeTextTrack)(textTrack)), this._player.audioTracks.map(audioTrack => (0, _TrackUtils.fromNativeMediaTrack)(audioTrack)), this._player.videoTracks.map(videoTrack => (0, _TrackUtils.fromNativeMediaTrack)(videoTrack)), 1e3 * this._player.duration, (_this$_player$textTra = this._player.textTracks.find(track => track.mode === 'showing')) === null || _this$_player$textTra === void 0 ? void 0 : _this$_player$textTra.uid, (_this$_player$videoTr = this._player.videoTracks.find(track => track.enabled)) === null || _this$_player$videoTr === void 0 ? void 0 : _this$_player$videoTr.uid, (_this$_player$audioTr = this._player.audioTracks.find(track => track.enabled)) === null || _this$_player$audioTr === void 0 ? void 0 : _this$_player$audioTr.uid));
|
|
30
|
+
});
|
|
31
|
+
_defineProperty(this, "onError", event => {
|
|
32
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultErrorEvent({
|
|
33
|
+
errorCode: event.errorObject.code.toString(),
|
|
34
|
+
errorMessage: event.errorObject.message
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "onProgress", () => {
|
|
38
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultProgressEvent(fromTimeRanges(this._player.seekable), fromTimeRanges(this._player.buffered)));
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "onCanPlay", () => {
|
|
41
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.CANPLAY));
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "onPlay", () => {
|
|
44
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.PLAY));
|
|
45
|
+
});
|
|
46
|
+
_defineProperty(this, "onPlaying", () => {
|
|
47
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.PLAYING));
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "onPause", () => {
|
|
50
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.PAUSE));
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "onSeeking", () => {
|
|
53
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.SEEKING));
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "onSeeked", () => {
|
|
56
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.SEEKED));
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "onEnded", () => {
|
|
59
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.ENDED));
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "onWaiting", () => {
|
|
62
|
+
this._facade.dispatchEvent(new _BaseEvent.BaseEvent(_reactNativeTheoplayer.PlayerEventType.WAITING));
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "onReadyStateChanged", event => {
|
|
65
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultReadyStateChangeEvent(event.readyState));
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "onTimeUpdate", event => {
|
|
68
|
+
var _event$currentProgram;
|
|
69
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTimeupdateEvent(event.currentTime * 1e3, (_event$currentProgram = event.currentProgramDateTime) === null || _event$currentProgram === void 0 ? void 0 : _event$currentProgram.getTime()));
|
|
70
|
+
});
|
|
71
|
+
_defineProperty(this, "onDurationChange", event => {
|
|
72
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultDurationChangeEvent(event.duration * 1e3));
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(this, "onPlaybackRateChange", event => {
|
|
75
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultRateChangeEvent(event.playbackRate));
|
|
76
|
+
});
|
|
77
|
+
_defineProperty(this, "onSegmentNotFound", () => {
|
|
78
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultSegmentNotFoundEvent(0, 'Segment not found', -1));
|
|
79
|
+
});
|
|
80
|
+
_defineProperty(this, "onVolumeChangeEvent", event => {
|
|
81
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultVolumeChangeEvent(event.volume, this._player.muted));
|
|
82
|
+
});
|
|
83
|
+
_defineProperty(this, "onPresentationModeChange", event => {
|
|
84
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultPresentationModeChangeEvent(event.presentationMode, _reactNativeTheoplayer.PresentationMode.inline)); // TODO: move to extended event
|
|
85
|
+
});
|
|
86
|
+
_defineProperty(this, "onAddTextTrack", event => {
|
|
87
|
+
const track = event.track;
|
|
88
|
+
track.addEventListener('addcue', this.onAddTextTrackCue(track));
|
|
89
|
+
track.addEventListener('removecue', this.onRemoveTextTrackCue(track));
|
|
90
|
+
track.addEventListener('entercue', this.onEnterTextTrackCue(track));
|
|
91
|
+
track.addEventListener('exitcue', this.onExitTextTrackCue(track));
|
|
92
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackListEvent(_reactNativeTheoplayer.TrackListEventType.ADD_TRACK, track));
|
|
93
|
+
});
|
|
94
|
+
_defineProperty(this, "onRemoveTextTrack", event => {
|
|
95
|
+
const track = event.track;
|
|
96
|
+
track.removeEventListener('addcue', this.onAddTextTrackCue(track));
|
|
97
|
+
track.removeEventListener('removecue', this.onRemoveTextTrackCue(track));
|
|
98
|
+
track.removeEventListener('entercue', this.onEnterTextTrackCue(track));
|
|
99
|
+
track.removeEventListener('exitcue', this.onExitTextTrackCue(track));
|
|
100
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackListEvent(_reactNativeTheoplayer.TrackListEventType.REMOVE_TRACK, track));
|
|
101
|
+
});
|
|
102
|
+
_defineProperty(this, "onChangeTextTrack", event => {
|
|
103
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackListEvent(_reactNativeTheoplayer.TrackListEventType.CHANGE_TRACK, event.track));
|
|
104
|
+
});
|
|
105
|
+
_defineProperty(this, "onAddAudioTrack", event => {
|
|
106
|
+
this.onAddMediaTrack(event, _reactNativeTheoplayer.MediaTrackType.AUDIO);
|
|
107
|
+
});
|
|
108
|
+
_defineProperty(this, "onAddVideoTrack", event => {
|
|
109
|
+
this.onAddMediaTrack(event, _reactNativeTheoplayer.MediaTrackType.VIDEO);
|
|
110
|
+
});
|
|
111
|
+
_defineProperty(this, "onAddMediaTrack", (event, trackType) => {
|
|
112
|
+
const track = event.track;
|
|
113
|
+
track.addEventListener('activequalitychanged', this.onActiveQualityChanged(trackType, track));
|
|
114
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultMediaTrackListEvent(_reactNativeTheoplayer.TrackListEventType.ADD_TRACK, trackType, track));
|
|
115
|
+
});
|
|
116
|
+
_defineProperty(this, "onRemoveAudioTrack", event => {
|
|
117
|
+
this.onRemoveMediaTrack(event, _reactNativeTheoplayer.MediaTrackType.AUDIO);
|
|
118
|
+
});
|
|
119
|
+
_defineProperty(this, "onRemoveVideoTrack", event => {
|
|
120
|
+
this.onRemoveMediaTrack(event, _reactNativeTheoplayer.MediaTrackType.VIDEO);
|
|
121
|
+
});
|
|
122
|
+
_defineProperty(this, "onRemoveMediaTrack", (event, trackType) => {
|
|
123
|
+
const track = event.track;
|
|
124
|
+
track.removeEventListener('activequalitychanged', this.onActiveQualityChanged(trackType, track));
|
|
125
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultMediaTrackListEvent(_reactNativeTheoplayer.TrackListEventType.REMOVE_TRACK, trackType, track));
|
|
126
|
+
});
|
|
127
|
+
_defineProperty(this, "onChangeAudioTrack", event => {
|
|
128
|
+
this.onChangeMediaTrack(event, _reactNativeTheoplayer.MediaTrackType.AUDIO);
|
|
129
|
+
});
|
|
130
|
+
_defineProperty(this, "onChangeVideoTrack", event => {
|
|
131
|
+
this.onChangeMediaTrack(event, _reactNativeTheoplayer.MediaTrackType.VIDEO);
|
|
132
|
+
});
|
|
133
|
+
_defineProperty(this, "onChangeMediaTrack", (event, trackType) => {
|
|
134
|
+
const track = event.track;
|
|
135
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultMediaTrackListEvent(_reactNativeTheoplayer.TrackListEventType.CHANGE_TRACK, trackType, track));
|
|
136
|
+
});
|
|
137
|
+
_defineProperty(this, "onChromecastStateChange", event => {
|
|
138
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultChromecastChangeEvent(event.state));
|
|
139
|
+
});
|
|
140
|
+
_defineProperty(this, "onChromecastError", event => {
|
|
141
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultChromecastErrorEvent(event.error));
|
|
142
|
+
});
|
|
143
|
+
_defineProperty(this, "onAirplayStateChange", event => {
|
|
144
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultAirplayStateChangeEvent(event.state));
|
|
145
|
+
});
|
|
146
|
+
_defineProperty(this, "onAdEvent", event => {
|
|
147
|
+
const castedEvent = event;
|
|
148
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultAdEvent(event.type, castedEvent.ad));
|
|
149
|
+
});
|
|
150
|
+
_defineProperty(this, "onAddTextTrackCue", track => event => {
|
|
151
|
+
const {
|
|
152
|
+
cue
|
|
153
|
+
} = event;
|
|
154
|
+
if (cue) {
|
|
155
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackEvent(_reactNativeTheoplayer.TextTrackEventType.ADD_CUE, track.uid, (0, _TrackUtils.fromNativeCue)(cue)));
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
_defineProperty(this, "onRemoveTextTrackCue", track => event => {
|
|
159
|
+
const {
|
|
160
|
+
cue
|
|
161
|
+
} = event;
|
|
162
|
+
if (cue) {
|
|
163
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackEvent(_reactNativeTheoplayer.TextTrackEventType.REMOVE_CUE, track.uid, (0, _TrackUtils.fromNativeCue)(cue)));
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
_defineProperty(this, "onEnterTextTrackCue", track => event => {
|
|
167
|
+
const {
|
|
168
|
+
cue
|
|
169
|
+
} = event;
|
|
170
|
+
if (cue) {
|
|
171
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackEvent(_reactNativeTheoplayer.TextTrackEventType.ENTER_CUE, track.uid, (0, _TrackUtils.fromNativeCue)(cue)));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
_defineProperty(this, "onExitTextTrackCue", track => event => {
|
|
175
|
+
const {
|
|
176
|
+
cue
|
|
177
|
+
} = event;
|
|
178
|
+
if (cue) {
|
|
179
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultTextTrackEvent(_reactNativeTheoplayer.TextTrackEventType.EXIT_CUE, track.uid, (0, _TrackUtils.fromNativeCue)(cue)));
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
_defineProperty(this, "onActiveQualityChanged", (trackType, track) => () => {
|
|
183
|
+
const quality = track.activeQuality;
|
|
184
|
+
this._facade.dispatchEvent(new _PlayerEvents.DefaultMediaTrackEvent(_reactNativeTheoplayer.MediaTrackEventType.ACTIVE_QUALITY_CHANGED, trackType, track.uid, quality ? [quality] : undefined));
|
|
185
|
+
});
|
|
186
|
+
this._player = player;
|
|
187
|
+
this._facade = facade;
|
|
188
|
+
this.addEventListeners();
|
|
189
|
+
}
|
|
190
|
+
addEventListeners() {
|
|
191
|
+
var _this$_player$cast, _this$_player$cast$ch, _this$_player$cast2, _this$_player$cast2$c, _this$_player$cast3, _this$_player$cast3$a, _this$_player$ads;
|
|
192
|
+
this._player.addEventListener('sourcechange', this.onSourceChange);
|
|
193
|
+
this._player.addEventListener('loadstart', this.onLoadStart);
|
|
194
|
+
this._player.addEventListener('loadeddata', this.onLoadedData);
|
|
195
|
+
this._player.addEventListener('loadedmetadata', this.onLoadedMetadata);
|
|
196
|
+
this._player.addEventListener('error', this.onError);
|
|
197
|
+
this._player.addEventListener('progress', this.onProgress);
|
|
198
|
+
this._player.addEventListener('play', this.onPlay);
|
|
199
|
+
this._player.addEventListener('canplay', this.onCanPlay);
|
|
200
|
+
this._player.addEventListener('playing', this.onPlaying);
|
|
201
|
+
this._player.addEventListener('pause', this.onPause);
|
|
202
|
+
this._player.addEventListener('seeking', this.onSeeking);
|
|
203
|
+
this._player.addEventListener('seeked', this.onSeeked);
|
|
204
|
+
this._player.addEventListener('ended', this.onEnded);
|
|
205
|
+
this._player.addEventListener('waiting', this.onWaiting);
|
|
206
|
+
this._player.addEventListener('readystatechange', this.onReadyStateChanged);
|
|
207
|
+
this._player.addEventListener('timeupdate', this.onTimeUpdate);
|
|
208
|
+
this._player.addEventListener('durationchange', this.onDurationChange);
|
|
209
|
+
this._player.addEventListener('ratechange', this.onPlaybackRateChange);
|
|
210
|
+
this._player.addEventListener('segmentnotfound', this.onSegmentNotFound);
|
|
211
|
+
this._player.addEventListener('volumechange', this.onVolumeChangeEvent);
|
|
212
|
+
this._player.presentation.addEventListener('presentationmodechange', this.onPresentationModeChange);
|
|
213
|
+
this._player.textTracks.addEventListener('addtrack', this.onAddTextTrack);
|
|
214
|
+
this._player.textTracks.addEventListener('removetrack', this.onRemoveTextTrack);
|
|
215
|
+
this._player.textTracks.addEventListener('change', this.onChangeTextTrack);
|
|
216
|
+
this._player.audioTracks.addEventListener('addtrack', this.onAddAudioTrack);
|
|
217
|
+
this._player.audioTracks.addEventListener('removetrack', this.onRemoveAudioTrack);
|
|
218
|
+
this._player.audioTracks.addEventListener('change', this.onChangeAudioTrack);
|
|
219
|
+
this._player.videoTracks.addEventListener('addtrack', this.onAddVideoTrack);
|
|
220
|
+
this._player.videoTracks.addEventListener('removetrack', this.onRemoveVideoTrack);
|
|
221
|
+
this._player.videoTracks.addEventListener('change', this.onChangeVideoTrack);
|
|
222
|
+
(_this$_player$cast = this._player.cast) === null || _this$_player$cast === void 0 ? void 0 : (_this$_player$cast$ch = _this$_player$cast.chromecast) === null || _this$_player$cast$ch === void 0 ? void 0 : _this$_player$cast$ch.addEventListener('statechange', this.onChromecastStateChange);
|
|
223
|
+
(_this$_player$cast2 = this._player.cast) === null || _this$_player$cast2 === void 0 ? void 0 : (_this$_player$cast2$c = _this$_player$cast2.chromecast) === null || _this$_player$cast2$c === void 0 ? void 0 : _this$_player$cast2$c.addEventListener('error', this.onChromecastError);
|
|
224
|
+
(_this$_player$cast3 = this._player.cast) === null || _this$_player$cast3 === void 0 ? void 0 : (_this$_player$cast3$a = _this$_player$cast3.airplay) === null || _this$_player$cast3$a === void 0 ? void 0 : _this$_player$cast3$a.addEventListener('statechange', this.onAirplayStateChange);
|
|
225
|
+
(_this$_player$ads = this._player.ads) === null || _this$_player$ads === void 0 ? void 0 : _this$_player$ads.addEventListener(FORWARDED_AD_EVENTS, this.onAdEvent);
|
|
226
|
+
}
|
|
227
|
+
unload() {
|
|
228
|
+
this.removeEventListeners();
|
|
229
|
+
}
|
|
230
|
+
removeEventListeners() {
|
|
231
|
+
var _this$_player$cast4, _this$_player$cast4$c, _this$_player$cast5, _this$_player$cast5$c, _this$_player$cast6, _this$_player$cast6$a, _this$_player$ads2;
|
|
232
|
+
this._player.removeEventListener('sourcechange', this.onSourceChange);
|
|
233
|
+
this._player.removeEventListener('loadstart', this.onLoadStart);
|
|
234
|
+
this._player.removeEventListener('loadeddata', this.onLoadedData);
|
|
235
|
+
this._player.removeEventListener('loadedmetadata', this.onLoadedMetadata);
|
|
236
|
+
this._player.removeEventListener('error', this.onError);
|
|
237
|
+
this._player.removeEventListener('progress', this.onProgress);
|
|
238
|
+
this._player.removeEventListener('canplay', this.onCanPlay);
|
|
239
|
+
this._player.removeEventListener('play', this.onPlay);
|
|
240
|
+
this._player.removeEventListener('playing', this.onPlaying);
|
|
241
|
+
this._player.removeEventListener('pause', this.onPause);
|
|
242
|
+
this._player.removeEventListener('seeking', this.onSeeking);
|
|
243
|
+
this._player.removeEventListener('seeked', this.onSeeked);
|
|
244
|
+
this._player.removeEventListener('ended', this.onEnded);
|
|
245
|
+
this._player.removeEventListener('waiting', this.onWaiting);
|
|
246
|
+
this._player.removeEventListener('readystatechange', this.onReadyStateChanged);
|
|
247
|
+
this._player.removeEventListener('timeupdate', this.onTimeUpdate);
|
|
248
|
+
this._player.removeEventListener('durationchange', this.onDurationChange);
|
|
249
|
+
this._player.removeEventListener('ratechange', this.onPlaybackRateChange);
|
|
250
|
+
this._player.removeEventListener('segmentnotfound', this.onSegmentNotFound);
|
|
251
|
+
this._player.removeEventListener('volumechange', this.onVolumeChangeEvent);
|
|
252
|
+
this._player.presentation.removeEventListener('presentationmodechange', this.onPresentationModeChange);
|
|
253
|
+
this._player.textTracks.removeEventListener('addtrack', this.onAddTextTrack);
|
|
254
|
+
this._player.textTracks.removeEventListener('removetrack', this.onRemoveTextTrack);
|
|
255
|
+
this._player.textTracks.removeEventListener('change', this.onChangeTextTrack);
|
|
256
|
+
this._player.audioTracks.removeEventListener('addtrack', this.onAddAudioTrack);
|
|
257
|
+
this._player.audioTracks.removeEventListener('removetrack', this.onRemoveAudioTrack);
|
|
258
|
+
this._player.audioTracks.removeEventListener('change', this.onChangeAudioTrack);
|
|
259
|
+
this._player.videoTracks.removeEventListener('addtrack', this.onAddVideoTrack);
|
|
260
|
+
this._player.videoTracks.removeEventListener('removetrack', this.onRemoveVideoTrack);
|
|
261
|
+
this._player.videoTracks.removeEventListener('change', this.onChangeVideoTrack);
|
|
262
|
+
(_this$_player$cast4 = this._player.cast) === null || _this$_player$cast4 === void 0 ? void 0 : (_this$_player$cast4$c = _this$_player$cast4.chromecast) === null || _this$_player$cast4$c === void 0 ? void 0 : _this$_player$cast4$c.removeEventListener('statechange', this.onChromecastStateChange);
|
|
263
|
+
(_this$_player$cast5 = this._player.cast) === null || _this$_player$cast5 === void 0 ? void 0 : (_this$_player$cast5$c = _this$_player$cast5.chromecast) === null || _this$_player$cast5$c === void 0 ? void 0 : _this$_player$cast5$c.removeEventListener('error', this.onChromecastError);
|
|
264
|
+
(_this$_player$cast6 = this._player.cast) === null || _this$_player$cast6 === void 0 ? void 0 : (_this$_player$cast6$a = _this$_player$cast6.airplay) === null || _this$_player$cast6$a === void 0 ? void 0 : _this$_player$cast6$a.removeEventListener('statechange', this.onAirplayStateChange);
|
|
265
|
+
(_this$_player$ads2 = this._player.ads) === null || _this$_player$ads2 === void 0 ? void 0 : _this$_player$ads2.removeEventListener(FORWARDED_AD_EVENTS, this.onAdEvent);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.WebEventForwarder = WebEventForwarder;
|
|
269
|
+
const FORWARDED_AD_EVENTS = [_reactNativeTheoplayer.AdEventType.ADD_AD_BREAK, _reactNativeTheoplayer.AdEventType.REMOVE_AD_BREAK, _reactNativeTheoplayer.AdEventType.AD_LOADED, _reactNativeTheoplayer.AdEventType.AD_BREAK_BEGIN, _reactNativeTheoplayer.AdEventType.AD_BREAK_END, _reactNativeTheoplayer.AdEventType.AD_BREAK_CHANGE, _reactNativeTheoplayer.AdEventType.UPDATE_AD_BREAK, _reactNativeTheoplayer.AdEventType.ADD_AD, _reactNativeTheoplayer.AdEventType.AD_BEGIN, _reactNativeTheoplayer.AdEventType.AD_END, _reactNativeTheoplayer.AdEventType.UPDATE_AD, _reactNativeTheoplayer.AdEventType.AD_FIRST_QUARTILE, _reactNativeTheoplayer.AdEventType.AD_MIDPOINT, _reactNativeTheoplayer.AdEventType.AD_THIRD_QUARTILE, _reactNativeTheoplayer.AdEventType.AD_SKIP, _reactNativeTheoplayer.AdEventType.AD_IMPRESSION, _reactNativeTheoplayer.AdEventType.AD_ERROR, _reactNativeTheoplayer.AdEventType.AD_METADATA, _reactNativeTheoplayer.AdEventType.AD_BUFFERING];
|
|
270
|
+
function fromTimeRanges(timeRanges) {
|
|
271
|
+
const result = [];
|
|
272
|
+
for (let i = 0; i < timeRanges.length; i++) {
|
|
273
|
+
result.push({
|
|
274
|
+
start: timeRanges.start(i) * 1e3,
|
|
275
|
+
end: timeRanges.end(i) * 1e3
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
return result;
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=WebEventForwarder.js.map
|