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,90 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
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; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
|
+
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); }
|
|
5
|
+
import React, { PureComponent } from 'react';
|
|
6
|
+
import { DelayedActivityIndicator } from './DelayedActivityIndicator';
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
import { PlayerEventType } from 'react-native-theoplayer';
|
|
9
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
10
|
+
import { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer';
|
|
11
|
+
/**
|
|
12
|
+
* The default spinner for the `react-native-theoplayer` UI. It renders a ActivityIndicator when the player's playback is stalling due
|
|
13
|
+
* readystate changes.
|
|
14
|
+
*/
|
|
15
|
+
export class CenteredDelayedActivityIndicator extends PureComponent {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
super(props);
|
|
18
|
+
_defineProperty(this, "onReadyStateChange", event => {
|
|
19
|
+
this.maybeShowLoadingIndicator(event.readyState < 3);
|
|
20
|
+
});
|
|
21
|
+
_defineProperty(this, "onError", event => {
|
|
22
|
+
const {
|
|
23
|
+
error
|
|
24
|
+
} = event;
|
|
25
|
+
this.setState({
|
|
26
|
+
error
|
|
27
|
+
});
|
|
28
|
+
this.maybeShowLoadingIndicator(false);
|
|
29
|
+
});
|
|
30
|
+
_defineProperty(this, "onPlaying", () => {
|
|
31
|
+
this.maybeShowLoadingIndicator(false);
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "onSourceChange", () => {
|
|
34
|
+
this.setState({
|
|
35
|
+
error: undefined
|
|
36
|
+
});
|
|
37
|
+
this.maybeShowLoadingIndicator(false);
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "onLoadStart", () => {
|
|
40
|
+
this.setState({
|
|
41
|
+
error: undefined
|
|
42
|
+
});
|
|
43
|
+
this.maybeShowLoadingIndicator(true);
|
|
44
|
+
});
|
|
45
|
+
this.state = CenteredDelayedActivityIndicator.initialState;
|
|
46
|
+
}
|
|
47
|
+
componentDidMount() {
|
|
48
|
+
const player = this.context.player;
|
|
49
|
+
player.addEventListener(PlayerEventType.READYSTATE_CHANGE, this.onReadyStateChange);
|
|
50
|
+
player.addEventListener(PlayerEventType.ERROR, this.onError);
|
|
51
|
+
player.addEventListener(PlayerEventType.PLAYING, this.onPlaying);
|
|
52
|
+
player.addEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);
|
|
53
|
+
player.addEventListener(PlayerEventType.LOAD_START, this.onLoadStart);
|
|
54
|
+
}
|
|
55
|
+
componentWillUnmount() {
|
|
56
|
+
const player = this.context.player;
|
|
57
|
+
player.removeEventListener(PlayerEventType.READYSTATE_CHANGE, this.onReadyStateChange);
|
|
58
|
+
player.removeEventListener(PlayerEventType.ERROR, this.onError);
|
|
59
|
+
player.removeEventListener(PlayerEventType.PLAYING, this.onPlaying);
|
|
60
|
+
player.removeEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);
|
|
61
|
+
player.removeEventListener(PlayerEventType.LOAD_START, this.onLoadStart);
|
|
62
|
+
}
|
|
63
|
+
maybeShowLoadingIndicator(showLoading) {
|
|
64
|
+
const {
|
|
65
|
+
error
|
|
66
|
+
} = this.state;
|
|
67
|
+
// do not change state to buffering in case of an error or if the player is paused
|
|
68
|
+
const player = this.context.player;
|
|
69
|
+
this.setState({
|
|
70
|
+
showLoadingIndicator: showLoading && !error && !player.paused
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
const {
|
|
75
|
+
showLoadingIndicator
|
|
76
|
+
} = this.state;
|
|
77
|
+
const player = this.context.player;
|
|
78
|
+
return showLoadingIndicator && !player.paused && /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(View, {
|
|
79
|
+
style: FULLSCREEN_CENTER_STYLE
|
|
80
|
+
}, /*#__PURE__*/React.createElement(DelayedActivityIndicator, _extends({
|
|
81
|
+
color: context.style.colors.icon
|
|
82
|
+
}, this.props))));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
_defineProperty(CenteredDelayedActivityIndicator, "initialState", {
|
|
86
|
+
showLoadingIndicator: false,
|
|
87
|
+
error: undefined
|
|
88
|
+
});
|
|
89
|
+
CenteredDelayedActivityIndicator.contextType = PlayerContext;
|
|
90
|
+
//# sourceMappingURL=CenteredDelayedActivityIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","DelayedActivityIndicator","View","PlayerEventType","PlayerContext","FULLSCREEN_CENTER_STYLE","CenteredDelayedActivityIndicator","constructor","props","_defineProperty","event","maybeShowLoadingIndicator","readyState","error","setState","undefined","state","initialState","componentDidMount","player","context","addEventListener","READYSTATE_CHANGE","onReadyStateChange","ERROR","onError","PLAYING","onPlaying","SOURCE_CHANGE","onSourceChange","LOAD_START","onLoadStart","componentWillUnmount","removeEventListener","showLoading","showLoadingIndicator","paused","render","createElement","Consumer","style","_extends","color","colors","icon","contextType"],"sources":["CenteredDelayedActivityIndicator.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport type { DelayedActivityIndicatorProps } from './DelayedActivityIndicator';\nimport { DelayedActivityIndicator } from './DelayedActivityIndicator';\nimport { View } from 'react-native';\nimport { ErrorEvent, PlayerError, PlayerEventType, ReadyStateChangeEvent } from 'react-native-theoplayer';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer';\n\ninterface CenteredDelayedActivityIndicatorState {\n showLoadingIndicator: boolean;\n error: PlayerError | undefined;\n}\n\n/**\n * The default spinner for the `react-native-theoplayer` UI. It renders a ActivityIndicator when the player's playback is stalling due\n * readystate changes.\n */\nexport class CenteredDelayedActivityIndicator extends PureComponent<DelayedActivityIndicatorProps, CenteredDelayedActivityIndicatorState> {\n private static initialState: CenteredDelayedActivityIndicatorState = {\n showLoadingIndicator: false,\n error: undefined,\n };\n\n constructor(props: DelayedActivityIndicatorProps) {\n super(props);\n this.state = CenteredDelayedActivityIndicator.initialState;\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.READYSTATE_CHANGE, this.onReadyStateChange);\n player.addEventListener(PlayerEventType.ERROR, this.onError);\n player.addEventListener(PlayerEventType.PLAYING, this.onPlaying);\n player.addEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);\n player.addEventListener(PlayerEventType.LOAD_START, this.onLoadStart);\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.READYSTATE_CHANGE, this.onReadyStateChange);\n player.removeEventListener(PlayerEventType.ERROR, this.onError);\n player.removeEventListener(PlayerEventType.PLAYING, this.onPlaying);\n player.removeEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);\n player.removeEventListener(PlayerEventType.LOAD_START, this.onLoadStart);\n }\n\n private onReadyStateChange = (event: ReadyStateChangeEvent) => {\n this.maybeShowLoadingIndicator(event.readyState < 3);\n };\n\n private onError = (event: ErrorEvent) => {\n const { error } = event;\n this.setState({ error });\n this.maybeShowLoadingIndicator(false);\n };\n\n private onPlaying = () => {\n this.maybeShowLoadingIndicator(false);\n };\n\n private onSourceChange = () => {\n this.setState({ error: undefined });\n this.maybeShowLoadingIndicator(false);\n };\n\n private onLoadStart = () => {\n this.setState({ error: undefined });\n this.maybeShowLoadingIndicator(true);\n };\n\n private maybeShowLoadingIndicator(showLoading: boolean) {\n const { error } = this.state;\n // do not change state to buffering in case of an error or if the player is paused\n const player = (this.context as UiContext).player;\n this.setState({ showLoadingIndicator: showLoading && !error && !player.paused });\n }\n\n render() {\n const { showLoadingIndicator } = this.state;\n const player = (this.context as UiContext).player;\n return (\n showLoadingIndicator &&\n !player.paused && (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <View style={FULLSCREEN_CENTER_STYLE}>\n <DelayedActivityIndicator color={context.style.colors.icon} {...this.props} />\n </View>\n )}\n </PlayerContext.Consumer>\n )\n );\n }\n}\n\nCenteredDelayedActivityIndicator.contextType = PlayerContext;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import { ActivityIndicator } from 'react-native';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
const DEFAULT_DELAY = 200;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The DelayedActivityIndicator renders a native ActivityIndicator after a certain delay.
|
|
8
|
+
*/
|
|
9
|
+
export const DelayedActivityIndicator = props => {
|
|
10
|
+
const [showing, setShowing] = useState(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const {
|
|
13
|
+
delay
|
|
14
|
+
} = props;
|
|
15
|
+
const timer = setTimeout(() => {
|
|
16
|
+
setShowing(true);
|
|
17
|
+
}, delay || DEFAULT_DELAY);
|
|
18
|
+
return () => clearTimeout(timer);
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/React.createElement(ActivityIndicator, _extends({
|
|
21
|
+
style: {
|
|
22
|
+
opacity: showing ? 1.0 : 0.0
|
|
23
|
+
}
|
|
24
|
+
}, props));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=DelayedActivityIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActivityIndicator","React","useEffect","useState","DEFAULT_DELAY","DelayedActivityIndicator","props","showing","setShowing","delay","timer","setTimeout","clearTimeout","createElement","_extends","style","opacity"],"sources":["DelayedActivityIndicator.tsx"],"sourcesContent":["import { ActivityIndicator, ActivityIndicatorProps } from 'react-native';\nimport React, { useEffect, useState } from 'react';\n\nexport interface DelayedActivityIndicatorProps extends ActivityIndicatorProps {\n delay?: number;\n}\n\nconst DEFAULT_DELAY = 200;\n\n/**\n * The DelayedActivityIndicator renders a native ActivityIndicator after a certain delay.\n */\nexport const DelayedActivityIndicator = (props: DelayedActivityIndicatorProps) => {\n const [showing, setShowing] = useState(false);\n\n useEffect(() => {\n const { delay } = props;\n const timer = setTimeout(() => {\n setShowing(true);\n }, delay || DEFAULT_DELAY);\n return () => clearTimeout(timer);\n });\n\n return (\n <ActivityIndicator\n style={{\n opacity: showing ? 1.0 : 0.0,\n }}\n {...props}\n />\n );\n};\n"],"mappings":";AAAA,SAASA,iBAAiB,QAAgC,cAAc;AACxE,OAAOC,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAMlD,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAIC,KAAoC,IAAK;EAChF,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGL,QAAQ,CAAC,KAAK,CAAC;EAE7CD,SAAS,CAAC,MAAM;IACd,MAAM;MAAEO;IAAM,CAAC,GAAGH,KAAK;IACvB,MAAMI,KAAK,GAAGC,UAAU,CAAC,MAAM;MAC7BH,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC,EAAEC,KAAK,IAAIL,aAAa,CAAC;IAC1B,OAAO,MAAMQ,YAAY,CAACF,KAAK,CAAC;EAClC,CAAC,CAAC;EAEF,oBACET,KAAA,CAAAY,aAAA,CAACb,iBAAiB,EAAAc,QAAA;IAChBC,KAAK,EAAE;MACLC,OAAO,EAAET,OAAO,GAAG,GAAG,GAAG;IAC3B;EAAE,GACED,KAAK,EACT;AAEN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './CenteredDelayedActivityIndicator';\nexport * from './DelayedActivityIndicator';\n"],"mappings":"AAAA,cAAc,oCAAoC;AAClD,cAAc,4BAA4B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './activityindicator/barrel';
|
|
2
|
+
export * from './button/barrel';
|
|
3
|
+
export * from './controlbar/barrel';
|
|
4
|
+
export * from './menu/barrel';
|
|
5
|
+
export * from './message/barrel';
|
|
6
|
+
export * from './seekbar/barrel';
|
|
7
|
+
export * from './timelabel/barrel';
|
|
8
|
+
export * from './uicontroller/barrel';
|
|
9
|
+
export * from './util/barrel';
|
|
10
|
+
//# sourceMappingURL=barrel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './activityindicator/barrel';\nexport * from './button/barrel';\nexport * from './controlbar/barrel';\nexport * from './menu/barrel';\nexport * from './message/barrel';\nexport * from './seekbar/barrel';\nexport * from './timelabel/barrel';\nexport * from './uicontroller/barrel';\nexport * from './util/barrel';\n"],"mappings":"AAAA,cAAc,4BAA4B;AAC1C,cAAc,iBAAiB;AAC/B,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,eAAe"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
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); }
|
|
4
|
+
import React, { PureComponent } from 'react';
|
|
5
|
+
import { Platform } from 'react-native';
|
|
6
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
7
|
+
import { isConnected } from './ChromecastButton';
|
|
8
|
+
import { ActionButton } from './actionbutton/ActionButton';
|
|
9
|
+
import { AirplaySvg } from './svg/AirplaySvg';
|
|
10
|
+
import { CastEventType, CastState, PlayerEventType } from './../../../api/barrel';
|
|
11
|
+
/**
|
|
12
|
+
* The default button to enable Airplay for the `react-native-theoplayer` UI.
|
|
13
|
+
*/
|
|
14
|
+
export class AirplayButton extends PureComponent {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
_defineProperty(this, "onCastStateChangeEvent", event => {
|
|
18
|
+
if (event.subType != CastEventType.AIRPLAY_STATE_CHANGE) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
this.setState({
|
|
22
|
+
castState: event.state
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
_defineProperty(this, "onUIAirplayToggled", () => {
|
|
26
|
+
var _player$cast$airplay;
|
|
27
|
+
const player = this.context.player;
|
|
28
|
+
if (((_player$cast$airplay = player.cast.airplay) === null || _player$cast$airplay === void 0 ? void 0 : _player$cast$airplay.state) !== CastState.unavailable) {
|
|
29
|
+
var _player$cast$airplay2;
|
|
30
|
+
if (isConnected((_player$cast$airplay2 = player.cast.airplay) === null || _player$cast$airplay2 === void 0 ? void 0 : _player$cast$airplay2.state)) {
|
|
31
|
+
var _player$cast$airplay3;
|
|
32
|
+
(_player$cast$airplay3 = player.cast.airplay) === null || _player$cast$airplay3 === void 0 ? void 0 : _player$cast$airplay3.stop();
|
|
33
|
+
} else {
|
|
34
|
+
var _player$cast$airplay4;
|
|
35
|
+
(_player$cast$airplay4 = player.cast.airplay) === null || _player$cast$airplay4 === void 0 ? void 0 : _player$cast$airplay4.start();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
this.state = AirplayButton.initialState;
|
|
40
|
+
}
|
|
41
|
+
componentDidMount() {
|
|
42
|
+
var _player$cast$airplay5;
|
|
43
|
+
const player = this.context.player;
|
|
44
|
+
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
45
|
+
this.setState({
|
|
46
|
+
castState: ((_player$cast$airplay5 = player.cast.airplay) === null || _player$cast$airplay5 === void 0 ? void 0 : _player$cast$airplay5.state) ?? CastState.unavailable
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
componentWillUnmount() {
|
|
50
|
+
const player = this.context.player;
|
|
51
|
+
player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
const {
|
|
55
|
+
castState
|
|
56
|
+
} = this.state;
|
|
57
|
+
if (castState === CastState.unavailable || Platform.isTV) {
|
|
58
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
59
|
+
}
|
|
60
|
+
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
61
|
+
svg: /*#__PURE__*/React.createElement(AirplaySvg, null),
|
|
62
|
+
touchable: true,
|
|
63
|
+
onPress: this.onUIAirplayToggled,
|
|
64
|
+
highlighted: isConnected(castState)
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
_defineProperty(AirplayButton, "initialState", {
|
|
69
|
+
castState: CastState.unavailable
|
|
70
|
+
});
|
|
71
|
+
AirplayButton.contextType = PlayerContext;
|
|
72
|
+
//# sourceMappingURL=AirplayButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","Platform","PlayerContext","isConnected","ActionButton","AirplaySvg","CastEventType","CastState","PlayerEventType","AirplayButton","constructor","props","_defineProperty","event","subType","AIRPLAY_STATE_CHANGE","setState","castState","state","_player$cast$airplay","player","context","cast","airplay","unavailable","_player$cast$airplay2","_player$cast$airplay3","stop","_player$cast$airplay4","start","initialState","componentDidMount","_player$cast$airplay5","addEventListener","CAST_EVENT","onCastStateChangeEvent","componentWillUnmount","removeEventListener","render","isTV","createElement","Fragment","svg","touchable","onPress","onUIAirplayToggled","highlighted","contextType"],"sources":["AirplayButton.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { Platform } from 'react-native';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { isConnected } from './ChromecastButton';\nimport { ActionButton } from './actionbutton/ActionButton';\nimport { AirplaySvg } from './svg/AirplaySvg';\nimport { CastEvent, CastEventType, CastState, PlayerEventType } from './../../../api/barrel';\n\ninterface CastButtonState {\n castState: CastState;\n}\n\n/**\n * The default button to enable Airplay for the `react-native-theoplayer` UI.\n */\nexport class AirplayButton extends PureComponent<unknown, CastButtonState> {\n private static initialState: CastButtonState = {\n castState: CastState.unavailable,\n };\n\n constructor(props: unknown) {\n super(props);\n this.state = AirplayButton.initialState;\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);\n this.setState({ castState: player.cast.airplay?.state ?? CastState.unavailable });\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);\n }\n\n private onCastStateChangeEvent = (event: CastEvent) => {\n if (event.subType != CastEventType.AIRPLAY_STATE_CHANGE) {\n return;\n }\n this.setState({ castState: event.state });\n };\n\n private onUIAirplayToggled = () => {\n const player = (this.context as UiContext).player;\n if (player.cast.airplay?.state !== CastState.unavailable) {\n if (isConnected(player.cast.airplay?.state)) {\n player.cast.airplay?.stop();\n } else {\n player.cast.airplay?.start();\n }\n }\n };\n\n render() {\n const { castState } = this.state;\n if (castState === CastState.unavailable || Platform.isTV) {\n return <></>;\n }\n return <ActionButton svg={<AirplaySvg />} touchable={true} onPress={this.onUIAirplayToggled} highlighted={isConnected(castState)} />;\n }\n}\n\nAirplayButton.contextType = PlayerContext;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
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); }
|
|
4
|
+
import React, { PureComponent } from 'react';
|
|
5
|
+
import { CastButton } from 'react-native-google-cast';
|
|
6
|
+
import { CastEventType, PlayerEventType } from 'react-native-theoplayer';
|
|
7
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
8
|
+
import { DEFAULT_ACTION_BUTTON_STYLE } from './actionbutton/ActionButton';
|
|
9
|
+
export function isConnected(state) {
|
|
10
|
+
return state === 'connecting' || state === 'connected';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The native button to enable Chromecast for the `react-native-theoplayer` UI.
|
|
15
|
+
* This component uses the button from `react-native-google-cast` and is not supported on web.
|
|
16
|
+
*/
|
|
17
|
+
export class ChromecastButton extends PureComponent {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(props);
|
|
20
|
+
_defineProperty(this, "onCastStateChangeEvent", event => {
|
|
21
|
+
if (event.subType != CastEventType.CHROMECAST_STATE_CHANGE) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.setState({
|
|
25
|
+
connected: isConnected(event.state)
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
this.state = ChromecastButton.initialState;
|
|
29
|
+
}
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
var _player$cast;
|
|
32
|
+
const player = this.context.player;
|
|
33
|
+
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
34
|
+
this.setState({
|
|
35
|
+
connected: (_player$cast = player.cast) === null || _player$cast === void 0 ? void 0 : _player$cast.casting
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
componentWillUnmount() {
|
|
39
|
+
const player = this.context.player;
|
|
40
|
+
player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
const {
|
|
44
|
+
connected
|
|
45
|
+
} = this.state;
|
|
46
|
+
return /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(CastButton, {
|
|
47
|
+
style: DEFAULT_ACTION_BUTTON_STYLE,
|
|
48
|
+
tintColor: connected ? context.style.colors.iconSelected : context.style.colors.icon
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
_defineProperty(ChromecastButton, "initialState", {
|
|
53
|
+
connected: false
|
|
54
|
+
});
|
|
55
|
+
ChromecastButton.contextType = PlayerContext;
|
|
56
|
+
//# sourceMappingURL=ChromecastButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","CastButton","CastEventType","PlayerEventType","PlayerContext","DEFAULT_ACTION_BUTTON_STYLE","isConnected","state","ChromecastButton","constructor","props","_defineProperty","event","subType","CHROMECAST_STATE_CHANGE","setState","connected","initialState","componentDidMount","_player$cast","player","context","addEventListener","CAST_EVENT","onCastStateChangeEvent","cast","casting","componentWillUnmount","removeEventListener","render","createElement","Consumer","style","tintColor","colors","iconSelected","icon","contextType"],"sources":["ChromecastButton.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { CastButton } from 'react-native-google-cast';\nimport type { CastEvent } from 'react-native-theoplayer';\nimport { CastEventType, CastState, PlayerEventType } from 'react-native-theoplayer';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { DEFAULT_ACTION_BUTTON_STYLE } from './actionbutton/ActionButton';\n\ninterface CastButtonState {\n connected: boolean;\n}\n\nexport function isConnected(state: CastState | undefined): boolean {\n return state === 'connecting' || state === 'connected';\n}\n\n/**\n * The native button to enable Chromecast for the `react-native-theoplayer` UI.\n * This component uses the button from `react-native-google-cast` and is not supported on web.\n */\nexport class ChromecastButton extends PureComponent<unknown, CastButtonState> {\n private static initialState: CastButtonState = {\n connected: false,\n };\n\n constructor(props: unknown) {\n super(props);\n this.state = ChromecastButton.initialState;\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);\n this.setState({ connected: player.cast?.casting });\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);\n }\n\n private onCastStateChangeEvent = (event: CastEvent) => {\n if (event.subType != CastEventType.CHROMECAST_STATE_CHANGE) {\n return;\n }\n this.setState({ connected: isConnected(event.state) });\n };\n\n render() {\n const { connected } = this.state;\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <CastButton style={DEFAULT_ACTION_BUTTON_STYLE} tintColor={connected ? context.style.colors.iconSelected : context.style.colors.icon} />\n )}\n </PlayerContext.Consumer>\n );\n }\n}\n\nChromecastButton.contextType = PlayerContext;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,aAAa,EAAaC,eAAe,QAAQ,yBAAyB;AACnF,SAASC,aAAa,QAAmB,uBAAuB;AAChE,SAASC,2BAA2B,QAAQ,6BAA6B;AAMzE,OAAO,SAASC,WAAWA,CAACC,KAA4B,EAAW;EACjE,OAAOA,KAAK,KAAK,YAAY,IAAIA,KAAK,KAAK,WAAW;AACxD;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,SAASR,aAAa,CAA2B;EAK5ES,WAAWA,CAACC,KAAc,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,iCAemBC,KAAgB,IAAK;MACrD,IAAIA,KAAK,CAACC,OAAO,IAAIX,aAAa,CAACY,uBAAuB,EAAE;QAC1D;MACF;MACA,IAAI,CAACC,QAAQ,CAAC;QAAEC,SAAS,EAAEV,WAAW,CAACM,KAAK,CAACL,KAAK;MAAE,CAAC,CAAC;IACxD,CAAC;IAnBC,IAAI,CAACA,KAAK,GAAGC,gBAAgB,CAACS,YAAY;EAC5C;EAEAC,iBAAiBA,CAAA,EAAG;IAAA,IAAAC,YAAA;IAClB,MAAMC,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACE,gBAAgB,CAACnB,eAAe,CAACoB,UAAU,EAAE,IAAI,CAACC,sBAAsB,CAAC;IAChF,IAAI,CAACT,QAAQ,CAAC;MAAEC,SAAS,GAAAG,YAAA,GAAEC,MAAM,CAACK,IAAI,cAAAN,YAAA,uBAAXA,YAAA,CAAaO;IAAQ,CAAC,CAAC;EACpD;EAEAC,oBAAoBA,CAAA,EAAG;IACrB,MAAMP,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACQ,mBAAmB,CAACzB,eAAe,CAACoB,UAAU,EAAE,IAAI,CAACC,sBAAsB,CAAC;EACrF;EASAK,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEb;IAAU,CAAC,GAAG,IAAI,CAACT,KAAK;IAChC,oBACER,KAAA,CAAA+B,aAAA,CAAC1B,aAAa,CAAC2B,QAAQ,QACnBV,OAAkB,iBAClBtB,KAAA,CAAA+B,aAAA,CAAC7B,UAAU;MAAC+B,KAAK,EAAE3B,2BAA4B;MAAC4B,SAAS,EAAEjB,SAAS,GAAGK,OAAO,CAACW,KAAK,CAACE,MAAM,CAACC,YAAY,GAAGd,OAAO,CAACW,KAAK,CAACE,MAAM,CAACE;IAAK,EACtI,CACsB;EAE7B;AACF;AAACzB,eAAA,CAtCYH,gBAAgB,kBACoB;EAC7CQ,SAAS,EAAE;AACb,CAAC;AAqCHR,gBAAgB,CAAC6B,WAAW,GAAGjC,aAAa"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
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); }
|
|
4
|
+
import { CastEventType, CastState, PlayerEventType } from './../../../api/barrel';
|
|
5
|
+
import React, { PureComponent } from 'react';
|
|
6
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
7
|
+
import { ChromecastSvg } from './svg/ChromecastSvg';
|
|
8
|
+
import { Platform } from 'react-native';
|
|
9
|
+
import { ActionButton } from 'react-native-theoplayer';
|
|
10
|
+
export function isConnected(state) {
|
|
11
|
+
return state === 'connecting' || state === 'connected';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The button to enable Chromecast for web for the `react-native-theoplayer` UI
|
|
16
|
+
*/
|
|
17
|
+
export class ChromecastButton extends PureComponent {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(props);
|
|
20
|
+
_defineProperty(this, "onCastStateChangeEvent", event => {
|
|
21
|
+
if (event.subType != CastEventType.CHROMECAST_STATE_CHANGE) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.setState({
|
|
25
|
+
castState: event.state
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "onPress", () => {
|
|
29
|
+
const player = this.context.player;
|
|
30
|
+
if (isConnected(this.state.castState)) {
|
|
31
|
+
var _player$cast$chromeca;
|
|
32
|
+
(_player$cast$chromeca = player.cast.chromecast) === null || _player$cast$chromeca === void 0 ? void 0 : _player$cast$chromeca.stop();
|
|
33
|
+
} else {
|
|
34
|
+
var _player$cast$chromeca2;
|
|
35
|
+
(_player$cast$chromeca2 = player.cast.chromecast) === null || _player$cast$chromeca2 === void 0 ? void 0 : _player$cast$chromeca2.start();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
this.state = ChromecastButton.initialState;
|
|
39
|
+
}
|
|
40
|
+
componentDidMount() {
|
|
41
|
+
var _player$cast$chromeca3;
|
|
42
|
+
const player = this.context.player;
|
|
43
|
+
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
44
|
+
this.setState({
|
|
45
|
+
castState: ((_player$cast$chromeca3 = player.cast.chromecast) === null || _player$cast$chromeca3 === void 0 ? void 0 : _player$cast$chromeca3.state) ?? CastState.unavailable
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
componentWillUnmount() {
|
|
49
|
+
const player = this.context.player;
|
|
50
|
+
player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const {
|
|
54
|
+
castState
|
|
55
|
+
} = this.state;
|
|
56
|
+
// TODO: state is reported as unavailable by Android bridge when it is available.
|
|
57
|
+
if (Platform.OS === 'web' && castState === CastState.unavailable) {
|
|
58
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
59
|
+
}
|
|
60
|
+
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
61
|
+
svg: /*#__PURE__*/React.createElement(ChromecastSvg, null),
|
|
62
|
+
touchable: true,
|
|
63
|
+
onPress: this.onPress,
|
|
64
|
+
highlighted: isConnected(castState)
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
_defineProperty(ChromecastButton, "initialState", {
|
|
69
|
+
castState: CastState.unavailable
|
|
70
|
+
});
|
|
71
|
+
ChromecastButton.contextType = PlayerContext;
|
|
72
|
+
//# sourceMappingURL=ChromecastButton.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CastEventType","CastState","PlayerEventType","React","PureComponent","PlayerContext","ChromecastSvg","Platform","ActionButton","isConnected","state","ChromecastButton","constructor","props","_defineProperty","event","subType","CHROMECAST_STATE_CHANGE","setState","castState","player","context","_player$cast$chromeca","cast","chromecast","stop","_player$cast$chromeca2","start","initialState","componentDidMount","_player$cast$chromeca3","addEventListener","CAST_EVENT","onCastStateChangeEvent","unavailable","componentWillUnmount","removeEventListener","render","OS","createElement","Fragment","svg","touchable","onPress","highlighted","contextType"],"sources":["ChromecastButton.web.tsx"],"sourcesContent":["import { CastEvent, CastEventType, CastState, PlayerEventType } from './../../../api/barrel';\nimport React, { PureComponent } from 'react';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { ChromecastSvg } from './svg/ChromecastSvg';\nimport { Platform } from 'react-native';\nimport { ActionButton } from 'react-native-theoplayer';\n\ninterface CastButtonState {\n castState: CastState;\n}\n\nexport function isConnected(state: CastState | undefined): boolean {\n return state === 'connecting' || state === 'connected';\n}\n\n/**\n * The button to enable Chromecast for web for the `react-native-theoplayer` UI\n */\nexport class ChromecastButton extends PureComponent<unknown, CastButtonState> {\n private static initialState: CastButtonState = {\n castState: CastState.unavailable,\n };\n\n constructor(props: unknown) {\n super(props);\n this.state = ChromecastButton.initialState;\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);\n this.setState({ castState: player.cast.chromecast?.state ?? CastState.unavailable });\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);\n }\n\n private onCastStateChangeEvent = (event: CastEvent) => {\n if (event.subType != CastEventType.CHROMECAST_STATE_CHANGE) {\n return;\n }\n this.setState({ castState: event.state });\n };\n\n private onPress = () => {\n const player = (this.context as UiContext).player;\n if (isConnected(this.state.castState)) {\n player.cast.chromecast?.stop();\n } else {\n player.cast.chromecast?.start();\n }\n };\n\n render() {\n const { castState } = this.state;\n // TODO: state is reported as unavailable by Android bridge when it is available.\n if (Platform.OS === 'web' && castState === CastState.unavailable) {\n return <></>;\n }\n return <ActionButton svg={<ChromecastSvg />} touchable={true} onPress={this.onPress} highlighted={isConnected(castState)} />;\n }\n}\n\nChromecastButton.contextType = PlayerContext;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
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); }
|
|
4
|
+
import React, { PureComponent } from 'react';
|
|
5
|
+
import { PlayerEventType, PresentationMode } from 'react-native-theoplayer';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
7
|
+
import { ActionButton } from './actionbutton/ActionButton';
|
|
8
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
9
|
+
import { FullscreenExitSvg } from './svg/FullscreenExitSvg';
|
|
10
|
+
import { FullscreenEnterSvg } from './svg/FullscreenEnterSvg';
|
|
11
|
+
/**
|
|
12
|
+
* The button to enable/disable fullscreen for the `react-native-theoplayer` UI.
|
|
13
|
+
*/
|
|
14
|
+
export class FullscreenButton extends PureComponent {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
_defineProperty(this, "onPresentationModeChange", event => {
|
|
18
|
+
this.setState({
|
|
19
|
+
presentationMode: event.presentationMode
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
_defineProperty(this, "toggleFullScreen", () => {
|
|
23
|
+
const player = this.context.player;
|
|
24
|
+
switch (player.presentationMode) {
|
|
25
|
+
case 'picture-in-picture':
|
|
26
|
+
case 'inline':
|
|
27
|
+
player.presentationMode = PresentationMode.fullscreen;
|
|
28
|
+
break;
|
|
29
|
+
case 'fullscreen':
|
|
30
|
+
player.presentationMode = PresentationMode.inline;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
this.state = {
|
|
35
|
+
presentationMode: PresentationMode.inline
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
componentDidMount() {
|
|
39
|
+
const player = this.context.player;
|
|
40
|
+
player.addEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);
|
|
41
|
+
this.setState({
|
|
42
|
+
presentationMode: player.presentationMode
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
componentWillUnmount() {
|
|
46
|
+
const player = this.context.player;
|
|
47
|
+
player.removeEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const {
|
|
51
|
+
presentationMode
|
|
52
|
+
} = this.state;
|
|
53
|
+
if (Platform.isTV) {
|
|
54
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
55
|
+
}
|
|
56
|
+
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
57
|
+
svg: presentationMode === 'fullscreen' ? /*#__PURE__*/React.createElement(FullscreenExitSvg, null) : /*#__PURE__*/React.createElement(FullscreenEnterSvg, null),
|
|
58
|
+
onPress: this.toggleFullScreen
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
FullscreenButton.contextType = PlayerContext;
|
|
63
|
+
//# sourceMappingURL=FullscreenButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","PlayerEventType","PresentationMode","Platform","ActionButton","PlayerContext","FullscreenExitSvg","FullscreenEnterSvg","FullscreenButton","constructor","props","_defineProperty","event","setState","presentationMode","player","context","fullscreen","inline","state","componentDidMount","addEventListener","PRESENTATIONMODE_CHANGE","onPresentationModeChange","componentWillUnmount","removeEventListener","render","isTV","createElement","Fragment","svg","onPress","toggleFullScreen","contextType"],"sources":["FullscreenButton.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport type { PresentationModeChangeEvent } from 'react-native-theoplayer';\nimport { PlayerEventType, PresentationMode } from 'react-native-theoplayer';\nimport { Platform } from 'react-native';\nimport { ActionButton } from './actionbutton/ActionButton';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { FullscreenExitSvg } from './svg/FullscreenExitSvg';\nimport { FullscreenEnterSvg } from './svg/FullscreenEnterSvg';\n\ninterface FullscreenButtonState {\n presentationMode: PresentationMode;\n}\n\n/**\n * The button to enable/disable fullscreen for the `react-native-theoplayer` UI.\n */\nexport class FullscreenButton extends PureComponent<unknown, FullscreenButtonState> {\n constructor(props: unknown) {\n super(props);\n this.state = { presentationMode: PresentationMode.inline };\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);\n this.setState({ presentationMode: player.presentationMode });\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);\n }\n\n private readonly onPresentationModeChange = (event: PresentationModeChangeEvent) => {\n this.setState({ presentationMode: event.presentationMode });\n };\n\n private toggleFullScreen = () => {\n const player = (this.context as UiContext).player;\n switch (player.presentationMode) {\n case 'picture-in-picture':\n case 'inline':\n player.presentationMode = PresentationMode.fullscreen;\n break;\n case 'fullscreen':\n player.presentationMode = PresentationMode.inline;\n break;\n }\n };\n\n render() {\n const { presentationMode } = this.state;\n if (Platform.isTV) {\n return <></>;\n }\n return <ActionButton svg={presentationMode === 'fullscreen' ? <FullscreenExitSvg /> : <FullscreenEnterSvg />} onPress={this.toggleFullScreen} />;\n }\n}\n\nFullscreenButton.contextType = PlayerContext;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAE5C,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,yBAAyB;AAC3E,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,aAAa,QAAmB,uBAAuB;AAChE,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,kBAAkB,QAAQ,0BAA0B;AAM7D;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,SAASR,aAAa,CAAiC;EAClFS,WAAWA,CAACC,KAAc,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,mCAe8BC,KAAkC,IAAK;MAClF,IAAI,CAACC,QAAQ,CAAC;QAAEC,gBAAgB,EAAEF,KAAK,CAACE;MAAiB,CAAC,CAAC;IAC7D,CAAC;IAAAH,eAAA,2BAE0B,MAAM;MAC/B,MAAMI,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;MACjD,QAAQA,MAAM,CAACD,gBAAgB;QAC7B,KAAK,oBAAoB;QACzB,KAAK,QAAQ;UACXC,MAAM,CAACD,gBAAgB,GAAGZ,gBAAgB,CAACe,UAAU;UACrD;QACF,KAAK,YAAY;UACfF,MAAM,CAACD,gBAAgB,GAAGZ,gBAAgB,CAACgB,MAAM;UACjD;MAAM;IAEZ,CAAC;IA7BC,IAAI,CAACC,KAAK,GAAG;MAAEL,gBAAgB,EAAEZ,gBAAgB,CAACgB;IAAO,CAAC;EAC5D;EAEAE,iBAAiBA,CAAA,EAAG;IAClB,MAAML,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACM,gBAAgB,CAACpB,eAAe,CAACqB,uBAAuB,EAAE,IAAI,CAACC,wBAAwB,CAAC;IAC/F,IAAI,CAACV,QAAQ,CAAC;MAAEC,gBAAgB,EAAEC,MAAM,CAACD;IAAiB,CAAC,CAAC;EAC9D;EAEAU,oBAAoBA,CAAA,EAAG;IACrB,MAAMT,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACU,mBAAmB,CAACxB,eAAe,CAACqB,uBAAuB,EAAE,IAAI,CAACC,wBAAwB,CAAC;EACpG;EAmBAG,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEZ;IAAiB,CAAC,GAAG,IAAI,CAACK,KAAK;IACvC,IAAIhB,QAAQ,CAACwB,IAAI,EAAE;MACjB,oBAAO5B,KAAA,CAAA6B,aAAA,CAAA7B,KAAA,CAAA8B,QAAA,OAAK;IACd;IACA,oBAAO9B,KAAA,CAAA6B,aAAA,CAACxB,YAAY;MAAC0B,GAAG,EAAEhB,gBAAgB,KAAK,YAAY,gBAAGf,KAAA,CAAA6B,aAAA,CAACtB,iBAAiB,OAAG,gBAAGP,KAAA,CAAA6B,aAAA,CAACrB,kBAAkB,OAAI;MAACwB,OAAO,EAAE,IAAI,CAACC;IAAiB,EAAG;EAClJ;AACF;AAEAxB,gBAAgB,CAACyB,WAAW,GAAG5B,aAAa"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
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); }
|
|
4
|
+
import { ActionButton } from './actionbutton/ActionButton';
|
|
5
|
+
import React, { PureComponent } from 'react';
|
|
6
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
7
|
+
import { PlayerEventType } from 'react-native-theoplayer';
|
|
8
|
+
import { Platform } from 'react-native';
|
|
9
|
+
import { VolumeOffSvg } from './svg/VolumeOffSvg';
|
|
10
|
+
import { VolumeUpSvg } from './svg/VolumeUpSvg';
|
|
11
|
+
/**
|
|
12
|
+
* The default mute button for the `react-native-theoplayer` UI.
|
|
13
|
+
*/
|
|
14
|
+
export class MuteButton extends PureComponent {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
_defineProperty(this, "onVolumeChange", _ => {
|
|
18
|
+
const player = this.context.player;
|
|
19
|
+
this.setState({
|
|
20
|
+
muted: player.muted
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
_defineProperty(this, "toggleMuted", () => {
|
|
24
|
+
const player = this.context.player;
|
|
25
|
+
player.muted = !player.muted;
|
|
26
|
+
});
|
|
27
|
+
this.state = {
|
|
28
|
+
muted: false
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
componentDidMount() {
|
|
32
|
+
const player = this.context.player;
|
|
33
|
+
player.addEventListener(PlayerEventType.VOLUME_CHANGE, this.onVolumeChange);
|
|
34
|
+
this.setState({
|
|
35
|
+
muted: player.muted
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
componentWillUnmount() {
|
|
39
|
+
const player = this.context.player;
|
|
40
|
+
player.removeEventListener(PlayerEventType.VOLUME_CHANGE, this.onVolumeChange);
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
const {
|
|
44
|
+
muted
|
|
45
|
+
} = this.state;
|
|
46
|
+
if (Platform.isTV) {
|
|
47
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
50
|
+
svg: muted ? /*#__PURE__*/React.createElement(VolumeOffSvg, null) : /*#__PURE__*/React.createElement(VolumeUpSvg, null),
|
|
51
|
+
onPress: this.toggleMuted,
|
|
52
|
+
touchable: true
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
MuteButton.contextType = PlayerContext;
|
|
57
|
+
//# sourceMappingURL=MuteButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActionButton","React","PureComponent","PlayerContext","PlayerEventType","Platform","VolumeOffSvg","VolumeUpSvg","MuteButton","constructor","props","_defineProperty","_","player","context","setState","muted","state","componentDidMount","addEventListener","VOLUME_CHANGE","onVolumeChange","componentWillUnmount","removeEventListener","render","isTV","createElement","Fragment","svg","onPress","toggleMuted","touchable","contextType"],"sources":["MuteButton.tsx"],"sourcesContent":["import { ActionButton } from './actionbutton/ActionButton';\nimport React, { PureComponent } from 'react';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { PlayerEventType, VolumeChangeEvent } from 'react-native-theoplayer';\nimport { Platform } from 'react-native';\nimport { VolumeOffSvg } from './svg/VolumeOffSvg';\nimport { VolumeUpSvg } from './svg/VolumeUpSvg';\n\ninterface MuteButtonState {\n muted: boolean;\n}\n\n/**\n * The default mute button for the `react-native-theoplayer` UI.\n */\nexport class MuteButton extends PureComponent<unknown, MuteButtonState> {\n constructor(props: unknown) {\n super(props);\n this.state = { muted: false };\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.VOLUME_CHANGE, this.onVolumeChange);\n this.setState({ muted: player.muted });\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.VOLUME_CHANGE, this.onVolumeChange);\n }\n\n private onVolumeChange = (_: VolumeChangeEvent) => {\n const player = (this.context as UiContext).player;\n this.setState({ muted: player.muted });\n };\n\n private toggleMuted = () => {\n const player = (this.context as UiContext).player;\n player.muted = !player.muted;\n };\n\n render() {\n const { muted } = this.state;\n if (Platform.isTV) {\n return <></>;\n }\n return <ActionButton svg={muted ? <VolumeOffSvg /> : <VolumeUpSvg />} onPress={this.toggleMuted} touchable={true} />;\n }\n}\n\nMuteButton.contextType = PlayerContext;\n"],"mappings":";;;AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,OAAOC,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAASC,aAAa,QAAmB,uBAAuB;AAChE,SAASC,eAAe,QAA2B,yBAAyB;AAC5E,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,WAAW,QAAQ,mBAAmB;AAM/C;AACA;AACA;AACA,OAAO,MAAMC,UAAU,SAASN,aAAa,CAA2B;EACtEO,WAAWA,CAACC,KAAc,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,yBAeWC,CAAoB,IAAK;MACjD,MAAMC,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;MACjD,IAAI,CAACE,QAAQ,CAAC;QAAEC,KAAK,EAAEH,MAAM,CAACG;MAAM,CAAC,CAAC;IACxC,CAAC;IAAAL,eAAA,sBAEqB,MAAM;MAC1B,MAAME,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;MACjDA,MAAM,CAACG,KAAK,GAAG,CAACH,MAAM,CAACG,KAAK;IAC9B,CAAC;IAtBC,IAAI,CAACC,KAAK,GAAG;MAAED,KAAK,EAAE;IAAM,CAAC;EAC/B;EAEAE,iBAAiBA,CAAA,EAAG;IAClB,MAAML,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACM,gBAAgB,CAACf,eAAe,CAACgB,aAAa,EAAE,IAAI,CAACC,cAAc,CAAC;IAC3E,IAAI,CAACN,QAAQ,CAAC;MAAEC,KAAK,EAAEH,MAAM,CAACG;IAAM,CAAC,CAAC;EACxC;EAEAM,oBAAoBA,CAAA,EAAG;IACrB,MAAMT,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACU,mBAAmB,CAACnB,eAAe,CAACgB,aAAa,EAAE,IAAI,CAACC,cAAc,CAAC;EAChF;EAYAG,MAAMA,CAAA,EAAG;IACP,MAAM;MAAER;IAAM,CAAC,GAAG,IAAI,CAACC,KAAK;IAC5B,IAAIZ,QAAQ,CAACoB,IAAI,EAAE;MACjB,oBAAOxB,KAAA,CAAAyB,aAAA,CAAAzB,KAAA,CAAA0B,QAAA,OAAK;IACd;IACA,oBAAO1B,KAAA,CAAAyB,aAAA,CAAC1B,YAAY;MAAC4B,GAAG,EAAEZ,KAAK,gBAAGf,KAAA,CAAAyB,aAAA,CAACpB,YAAY,OAAG,gBAAGL,KAAA,CAAAyB,aAAA,CAACnB,WAAW,OAAI;MAACsB,OAAO,EAAE,IAAI,CAACC,WAAY;MAACC,SAAS,EAAE;IAAK,EAAG;EACtH;AACF;AAEAvB,UAAU,CAACwB,WAAW,GAAG7B,aAAa"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
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); }
|
|
4
|
+
import React, { PureComponent } from 'react';
|
|
5
|
+
import { PlayerEventType, PresentationMode } from 'react-native-theoplayer';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
7
|
+
import { ActionButton } from './actionbutton/ActionButton';
|
|
8
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
9
|
+
import { PipExitSvg } from './svg/PipExitSvg';
|
|
10
|
+
import { PipEnterSvg } from './svg/PipEnterSvg';
|
|
11
|
+
/**
|
|
12
|
+
* The default button to enable picture-in-picture for the `react-native-theoplayer` UI.
|
|
13
|
+
*/
|
|
14
|
+
export class PipButton extends PureComponent {
|
|
15
|
+
constructor(props) {
|
|
16
|
+
super(props);
|
|
17
|
+
_defineProperty(this, "onPresentationModeChange", event => {
|
|
18
|
+
this.setState({
|
|
19
|
+
presentationMode: event.presentationMode
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
_defineProperty(this, "togglePip", () => {
|
|
23
|
+
const player = this.context.player;
|
|
24
|
+
switch (player.presentationMode) {
|
|
25
|
+
case 'inline':
|
|
26
|
+
case 'fullscreen':
|
|
27
|
+
player.presentationMode = PresentationMode.pip;
|
|
28
|
+
break;
|
|
29
|
+
case 'picture-in-picture':
|
|
30
|
+
player.presentationMode = PresentationMode.inline;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
this.state = {
|
|
35
|
+
presentationMode: PresentationMode.inline
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
componentDidMount() {
|
|
39
|
+
const player = this.context.player;
|
|
40
|
+
player.addEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);
|
|
41
|
+
this.setState({
|
|
42
|
+
presentationMode: player.presentationMode
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
componentWillUnmount() {
|
|
46
|
+
const player = this.context.player;
|
|
47
|
+
player.removeEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
if (Platform.isTV) {
|
|
51
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
52
|
+
}
|
|
53
|
+
const {
|
|
54
|
+
presentationMode
|
|
55
|
+
} = this.state;
|
|
56
|
+
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
57
|
+
svg: presentationMode === 'picture-in-picture' ? /*#__PURE__*/React.createElement(PipExitSvg, null) : /*#__PURE__*/React.createElement(PipEnterSvg, null),
|
|
58
|
+
onPress: this.togglePip
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
PipButton.contextType = PlayerContext;
|
|
63
|
+
//# sourceMappingURL=PipButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","PlayerEventType","PresentationMode","Platform","ActionButton","PlayerContext","PipExitSvg","PipEnterSvg","PipButton","constructor","props","_defineProperty","event","setState","presentationMode","player","context","pip","inline","state","componentDidMount","addEventListener","PRESENTATIONMODE_CHANGE","onPresentationModeChange","componentWillUnmount","removeEventListener","render","isTV","createElement","Fragment","svg","onPress","togglePip","contextType"],"sources":["PipButton.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport type { PresentationModeChangeEvent } from 'react-native-theoplayer';\nimport { PlayerEventType, PresentationMode } from 'react-native-theoplayer';\nimport { Platform } from 'react-native';\nimport { ActionButton } from './actionbutton/ActionButton';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { PipExitSvg } from './svg/PipExitSvg';\nimport { PipEnterSvg } from './svg/PipEnterSvg';\n\ninterface PipButtonState {\n presentationMode: PresentationMode;\n}\n\n/**\n * The default button to enable picture-in-picture for the `react-native-theoplayer` UI.\n */\nexport class PipButton extends PureComponent<unknown, PipButtonState> {\n constructor(props: unknown) {\n super(props);\n this.state = { presentationMode: PresentationMode.inline };\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);\n this.setState({ presentationMode: player.presentationMode });\n }\n\n componentWillUnmount() {\n const player = (this.context as UiContext).player;\n player.removeEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);\n }\n\n private readonly onPresentationModeChange = (event: PresentationModeChangeEvent) => {\n this.setState({ presentationMode: event.presentationMode });\n };\n\n private togglePip = () => {\n const player = (this.context as UiContext).player;\n switch (player.presentationMode) {\n case 'inline':\n case 'fullscreen':\n player.presentationMode = PresentationMode.pip;\n break;\n case 'picture-in-picture':\n player.presentationMode = PresentationMode.inline;\n break;\n }\n };\n\n render() {\n if (Platform.isTV) {\n return <></>;\n }\n const { presentationMode } = this.state;\n\n return <ActionButton svg={presentationMode === 'picture-in-picture' ? <PipExitSvg /> : <PipEnterSvg />} onPress={this.togglePip} />;\n }\n}\n\nPipButton.contextType = PlayerContext;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAE5C,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,yBAAyB;AAC3E,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,aAAa,QAAmB,uBAAuB;AAChE,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,WAAW,QAAQ,mBAAmB;AAM/C;AACA;AACA;AACA,OAAO,MAAMC,SAAS,SAASR,aAAa,CAA0B;EACpES,WAAWA,CAACC,KAAc,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,mCAe8BC,KAAkC,IAAK;MAClF,IAAI,CAACC,QAAQ,CAAC;QAAEC,gBAAgB,EAAEF,KAAK,CAACE;MAAiB,CAAC,CAAC;IAC7D,CAAC;IAAAH,eAAA,oBAEmB,MAAM;MACxB,MAAMI,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;MACjD,QAAQA,MAAM,CAACD,gBAAgB;QAC7B,KAAK,QAAQ;QACb,KAAK,YAAY;UACfC,MAAM,CAACD,gBAAgB,GAAGZ,gBAAgB,CAACe,GAAG;UAC9C;QACF,KAAK,oBAAoB;UACvBF,MAAM,CAACD,gBAAgB,GAAGZ,gBAAgB,CAACgB,MAAM;UACjD;MAAM;IAEZ,CAAC;IA7BC,IAAI,CAACC,KAAK,GAAG;MAAEL,gBAAgB,EAAEZ,gBAAgB,CAACgB;IAAO,CAAC;EAC5D;EAEAE,iBAAiBA,CAAA,EAAG;IAClB,MAAML,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACM,gBAAgB,CAACpB,eAAe,CAACqB,uBAAuB,EAAE,IAAI,CAACC,wBAAwB,CAAC;IAC/F,IAAI,CAACV,QAAQ,CAAC;MAAEC,gBAAgB,EAAEC,MAAM,CAACD;IAAiB,CAAC,CAAC;EAC9D;EAEAU,oBAAoBA,CAAA,EAAG;IACrB,MAAMT,MAAM,GAAI,IAAI,CAACC,OAAO,CAAeD,MAAM;IACjDA,MAAM,CAACU,mBAAmB,CAACxB,eAAe,CAACqB,uBAAuB,EAAE,IAAI,CAACC,wBAAwB,CAAC;EACpG;EAmBAG,MAAMA,CAAA,EAAG;IACP,IAAIvB,QAAQ,CAACwB,IAAI,EAAE;MACjB,oBAAO5B,KAAA,CAAA6B,aAAA,CAAA7B,KAAA,CAAA8B,QAAA,OAAK;IACd;IACA,MAAM;MAAEf;IAAiB,CAAC,GAAG,IAAI,CAACK,KAAK;IAEvC,oBAAOpB,KAAA,CAAA6B,aAAA,CAACxB,YAAY;MAAC0B,GAAG,EAAEhB,gBAAgB,KAAK,oBAAoB,gBAAGf,KAAA,CAAA6B,aAAA,CAACtB,UAAU,OAAG,gBAAGP,KAAA,CAAA6B,aAAA,CAACrB,WAAW,OAAI;MAACwB,OAAO,EAAE,IAAI,CAACC;IAAU,EAAG;EACrI;AACF;AAEAxB,SAAS,CAACyB,WAAW,GAAG5B,aAAa"}
|