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,65 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { PlayerContext } from '../../util/PlayerContext';
|
|
3
|
+
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
4
|
+
import { ControlBar } from '../../controlbar/ControlBar';
|
|
5
|
+
import { TOP_UI_CONTAINER_STYLE } from '../../uicontroller/UiContainer';
|
|
6
|
+
import { BackSvg } from '../../button/svg/BackSvg';
|
|
7
|
+
import { ActionButton } from '../../button/actionbutton/ActionButton';
|
|
8
|
+
/**
|
|
9
|
+
* The default style for the menu view.
|
|
10
|
+
*/
|
|
11
|
+
export const DEFAULT_MENU_VIEW_STYLE = {
|
|
12
|
+
flex: 1,
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
left: 0,
|
|
15
|
+
right: 0,
|
|
16
|
+
top: 0,
|
|
17
|
+
bottom: 0,
|
|
18
|
+
paddingVertical: 20,
|
|
19
|
+
paddingLeft: 50,
|
|
20
|
+
paddingRight: 40
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A component to render a fullscreen menu with a title and back button for the `react-native-theoplayer` UI.
|
|
25
|
+
*/
|
|
26
|
+
export const MenuView = props => {
|
|
27
|
+
const {
|
|
28
|
+
menu,
|
|
29
|
+
style
|
|
30
|
+
} = props;
|
|
31
|
+
const context = useContext(PlayerContext);
|
|
32
|
+
const onClose = () => {
|
|
33
|
+
context.ui.closeCurrentMenu_();
|
|
34
|
+
};
|
|
35
|
+
return /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: StyleSheet.absoluteFill
|
|
37
|
+
}, /*#__PURE__*/React.createElement(ControlBar, {
|
|
38
|
+
style: TOP_UI_CONTAINER_STYLE
|
|
39
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
40
|
+
style: {
|
|
41
|
+
flexDirection: 'row'
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
44
|
+
style: {
|
|
45
|
+
flexDirection: 'row'
|
|
46
|
+
},
|
|
47
|
+
onPress: onClose
|
|
48
|
+
}, /*#__PURE__*/React.createElement(ActionButton, {
|
|
49
|
+
touchable: false,
|
|
50
|
+
svg: /*#__PURE__*/React.createElement(BackSvg, null)
|
|
51
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
52
|
+
style: {
|
|
53
|
+
color: context.style.colors.text,
|
|
54
|
+
fontSize: 16,
|
|
55
|
+
lineHeight: 30
|
|
56
|
+
}
|
|
57
|
+
}, "Back"))), /*#__PURE__*/React.createElement(View, {
|
|
58
|
+
style: {
|
|
59
|
+
flexGrow: 1
|
|
60
|
+
}
|
|
61
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
62
|
+
style: [DEFAULT_MENU_VIEW_STYLE, style]
|
|
63
|
+
}, menu)));
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=MenuView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useContext","PlayerContext","StyleSheet","Text","TouchableOpacity","View","ControlBar","TOP_UI_CONTAINER_STYLE","BackSvg","ActionButton","DEFAULT_MENU_VIEW_STYLE","flex","flexDirection","left","right","top","bottom","paddingVertical","paddingLeft","paddingRight","MenuView","props","menu","style","context","onClose","ui","closeCurrentMenu_","createElement","Consumer","absoluteFill","onPress","touchable","svg","color","colors","text","fontSize","lineHeight","flexGrow"],"sources":["MenuView.tsx"],"sourcesContent":["import React, { ReactNode, useContext } from 'react';\nimport { PlayerContext, UiContext } from '../../util/PlayerContext';\nimport { StyleProp, StyleSheet, Text, TouchableOpacity, View, ViewStyle } from 'react-native';\nimport { ControlBar } from '../../controlbar/ControlBar';\nimport { TOP_UI_CONTAINER_STYLE } from '../../uicontroller/UiContainer';\nimport { BackSvg } from '../../button/svg/BackSvg';\nimport { ActionButton } from '../../button/actionbutton/ActionButton';\n\ninterface MenuViewProps {\n /**\n * The menu to render inside the menu view.\n */\n menu: ReactNode;\n /**\n * The style overrides for the menu view.\n */\n style?: StyleProp<ViewStyle>;\n}\n\n/**\n * The default style for the menu view.\n */\nexport const DEFAULT_MENU_VIEW_STYLE: ViewStyle = {\n flex: 1,\n flexDirection: 'row',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n paddingVertical: 20,\n paddingLeft: 50,\n paddingRight: 40,\n};\n\n/**\n * A component to render a fullscreen menu with a title and back button for the `react-native-theoplayer` UI.\n */\nexport const MenuView = (props: MenuViewProps) => {\n const { menu, style } = props;\n const context = useContext(PlayerContext);\n const onClose = () => {\n context.ui.closeCurrentMenu_();\n };\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <View style={StyleSheet.absoluteFill}>\n <ControlBar style={TOP_UI_CONTAINER_STYLE}>\n <View style={{ flexDirection: 'row' }}>\n <TouchableOpacity style={{ flexDirection: 'row' }} onPress={onClose}>\n <ActionButton touchable={false} svg={<BackSvg />} />\n <Text style={{ color: context.style.colors.text, fontSize: 16, lineHeight: 30 }}>Back</Text>\n </TouchableOpacity>\n </View>\n <View style={{ flexGrow: 1 }} />\n </ControlBar>\n <View style={[DEFAULT_MENU_VIEW_STYLE, style]}>{menu}</View>\n </View>\n )}\n </PlayerContext.Consumer>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,UAAU,QAAQ,OAAO;AACpD,SAASC,aAAa,QAAmB,0BAA0B;AACnE,SAAoBC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAA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ElC,KAAA,CAAA6B,aAAA,CAACpB,OAAO;EAAI,EAAG,eACpDT,KAAA,CAAA6B,aAAA,CAACzB,IAAI;IAACoB,KAAK,EAAE;MAAEW,KAAK,EAAEV,OAAO,CAACD,KAAK,CAACY,MAAM,CAACC,IAAI;MAAEC,QAAQ,EAAE,EAAE;MAAEC,UAAU,EAAE;IAAG;EAAE,GAAC,MAAI,CAAO,CAC3E,CACd,eACPvC,KAAA,CAAA6B,aAAA,CAACvB,IAAI;IAACkB,KAAK,EAAE;MAAEgB,QAAQ,EAAE;IAAE;EAAE,EAAG,CACrB,eACbxC,KAAA,CAAA6B,aAAA,CAACvB,IAAI;IAACkB,KAAK,EAAE,CAACb,uBAAuB,EAAEa,KAAK;EAAE,GAAED,IAAI,CAAQ,CAE/D,CACsB;AAE7B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SafeAreaView, ScrollView, View } from 'react-native';
|
|
3
|
+
import { MenuTitle } from './MenuTitle';
|
|
4
|
+
/**
|
|
5
|
+
* The default style for the scrollable menu.
|
|
6
|
+
*/
|
|
7
|
+
export const DEFAULT_SCROLLABLE_MENU_STYLE = {
|
|
8
|
+
flex: 1,
|
|
9
|
+
left: 0,
|
|
10
|
+
right: 0,
|
|
11
|
+
top: 0,
|
|
12
|
+
bottom: 0,
|
|
13
|
+
paddingRight: 10
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A menu component that provides a ScrollView for menu items for the `react-native-theoplayer` UI.
|
|
18
|
+
* @param props
|
|
19
|
+
* @constructor
|
|
20
|
+
*/
|
|
21
|
+
export const ScrollableMenu = props => {
|
|
22
|
+
const {
|
|
23
|
+
title,
|
|
24
|
+
items
|
|
25
|
+
} = props;
|
|
26
|
+
return /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
27
|
+
style: DEFAULT_SCROLLABLE_MENU_STYLE
|
|
28
|
+
}, /*#__PURE__*/React.createElement(MenuTitle, {
|
|
29
|
+
label: title
|
|
30
|
+
}), /*#__PURE__*/React.createElement(ScrollView, null, /*#__PURE__*/React.createElement(View, {
|
|
31
|
+
style: {
|
|
32
|
+
flexDirection: 'column'
|
|
33
|
+
}
|
|
34
|
+
}, items)));
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=ScrollableMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","SafeAreaView","ScrollView","View","MenuTitle","DEFAULT_SCROLLABLE_MENU_STYLE","flex","left","right","top","bottom","paddingRight","ScrollableMenu","props","title","items","createElement","style","label","flexDirection"],"sources":["ScrollableMenu.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { SafeAreaView, ScrollView, View, ViewStyle } from 'react-native';\nimport { MenuTitle } from './MenuTitle';\n\ninterface ScrollableMenuProps {\n /**\n * The title of the scrollable menu.\n */\n title: string;\n /**\n * The items to be put in the scrollable menu.\n */\n items?: ReactNode;\n}\n\n/**\n * The default style for the scrollable menu.\n */\nexport const DEFAULT_SCROLLABLE_MENU_STYLE: ViewStyle = {\n flex: 1,\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n paddingRight: 10,\n};\n\n/**\n * A menu component that provides a ScrollView for menu items for the `react-native-theoplayer` UI.\n * @param props\n * @constructor\n */\nexport const ScrollableMenu = (props: ScrollableMenuProps) => {\n const { title, items } = props;\n return (\n <SafeAreaView style={DEFAULT_SCROLLABLE_MENU_STYLE}>\n <MenuTitle label={title} />\n <ScrollView>\n <View style={{ flexDirection: 'column' }}>{items}</View>\n </ScrollView>\n </SafeAreaView>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,YAAY,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACxE,SAASC,SAAS,QAAQ,aAAa;AAavC;AACA;AACA;AACA,OAAO,MAAMC,6BAAwC,GAAG;EACtDC,IAAI,EAAE,CAAC;EACPC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,GAAG,EAAE,CAAC;EACNC,MAAM,EAAE,CAAC;EACTC,YAAY,EAAE;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,KAA0B,IAAK;EAC5D,MAAM;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGF,KAAK;EAC9B,oBACEb,KAAA,CAAAgB,aAAA,CAACf,YAAY;IAACgB,KAAK,EAAEZ;EAA8B,gBACjDL,KAAA,CAAAgB,aAAA,CAACZ,SAAS;IAACc,KAAK,EAAEJ;EAAM,EAAG,eAC3Bd,KAAA,CAAAgB,aAAA,CAACd,UAAU,qBACTF,KAAA,CAAAgB,aAAA,CAACb,IAAI;IAACc,KAAK,EAAE;MAAEE,aAAa,EAAE;IAAS;EAAE,GAAEJ,KAAK,CAAQ,CAC7C,CACA;AAEnB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PlayerContext } from '../../util/PlayerContext';
|
|
2
|
+
import { Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import { ArrowForwardSvg } from '../../button/svg/ArrowForwardSvg';
|
|
5
|
+
import { DEFAULT_MENU_BUTTON_STYLE } from './MenuRadioButton';
|
|
6
|
+
import { ActionButton } from '../../button/actionbutton/ActionButton';
|
|
7
|
+
/**
|
|
8
|
+
* A component that can be put inside a SettingsMenuButton to create a sub menu.
|
|
9
|
+
*/
|
|
10
|
+
export const SubMenuWithButton = props => {
|
|
11
|
+
const {
|
|
12
|
+
style,
|
|
13
|
+
textStyle,
|
|
14
|
+
menuConstructor,
|
|
15
|
+
label,
|
|
16
|
+
preview
|
|
17
|
+
} = props;
|
|
18
|
+
const context = useContext(PlayerContext);
|
|
19
|
+
const onTouch = () => {
|
|
20
|
+
if (menuConstructor) {
|
|
21
|
+
context.ui.openMenu_(menuConstructor);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(View, {
|
|
25
|
+
style: [{
|
|
26
|
+
height: 44,
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
width: '100%',
|
|
29
|
+
justifyContent: 'center'
|
|
30
|
+
}, style]
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
32
|
+
style: [DEFAULT_MENU_BUTTON_STYLE, {
|
|
33
|
+
color: context.style.colors.text,
|
|
34
|
+
width: '30%'
|
|
35
|
+
}, textStyle]
|
|
36
|
+
}, label), /*#__PURE__*/React.createElement(View, {
|
|
37
|
+
style: {
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
width: '40%',
|
|
40
|
+
justifyContent: 'flex-end'
|
|
41
|
+
}
|
|
42
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
43
|
+
style: {
|
|
44
|
+
flexDirection: 'row'
|
|
45
|
+
},
|
|
46
|
+
onPress: onTouch
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
style: [DEFAULT_MENU_BUTTON_STYLE, {
|
|
49
|
+
color: context.style.colors.text
|
|
50
|
+
}, textStyle]
|
|
51
|
+
}, preview), /*#__PURE__*/React.createElement(ActionButton, {
|
|
52
|
+
touchable: false,
|
|
53
|
+
svg: /*#__PURE__*/React.createElement(ArrowForwardSvg, null)
|
|
54
|
+
})))));
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=SubMenuWithButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PlayerContext","Text","TouchableOpacity","View","React","useContext","ArrowForwardSvg","DEFAULT_MENU_BUTTON_STYLE","ActionButton","SubMenuWithButton","props","style","textStyle","menuConstructor","label","preview","context","onTouch","ui","openMenu_","createElement","Consumer","height","flexDirection","width","justifyContent","color","colors","text","onPress","touchable","svg"],"sources":["SubMenuWithButton.tsx"],"sourcesContent":["import { PlayerContext, UiContext } from '../../util/PlayerContext';\nimport { StyleProp, Text, TextStyle, TouchableOpacity, View, ViewStyle } from 'react-native';\nimport React, { useContext } from 'react';\nimport { ArrowForwardSvg } from '../../button/svg/ArrowForwardSvg';\nimport type { MenuConstructor } from '../../uicontroller/UiControls';\nimport { DEFAULT_MENU_BUTTON_STYLE } from './MenuRadioButton';\nimport { ActionButton } from '../../button/actionbutton/ActionButton';\n\nexport interface SubMenuButtonProps {\n /**\n * The style overrides.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * The style overrides for the text components.\n */\n textStyle?: StyleProp<TextStyle>;\n /**\n * The sub menu that will be opened.\n */\n menuConstructor: MenuConstructor;\n /**\n * The label for the sub menu button.\n */\n label: string;\n /**\n * A preview for the currently selected value before opening the sub menu.\n */\n preview: string;\n}\n\n/**\n * A component that can be put inside a SettingsMenuButton to create a sub menu.\n */\nexport const SubMenuWithButton = (props: SubMenuButtonProps) => {\n const { style, textStyle, menuConstructor, label, preview } = props;\n const context = useContext(PlayerContext);\n const onTouch = () => {\n if (menuConstructor) {\n context.ui.openMenu_(menuConstructor);\n }\n };\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <View style={[{ height: 44, flexDirection: 'row', width: '100%', justifyContent: 'center' }, style]}>\n <Text style={[DEFAULT_MENU_BUTTON_STYLE, { color: context.style.colors.text, width: '30%' }, textStyle]}>{label}</Text>\n <View style={{ flexDirection: 'row', width: '40%', justifyContent: 'flex-end' }}>\n <TouchableOpacity style={{ flexDirection: 'row' }} onPress={onTouch}>\n <Text style={[DEFAULT_MENU_BUTTON_STYLE, { color: context.style.colors.text }, textStyle]}>{preview}</Text>\n <ActionButton touchable={false} svg={<ArrowForwardSvg />} />\n </TouchableOpacity>\n </View>\n </View>\n )}\n </PlayerContext.Consumer>\n );\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAmB,0BAA0B;AACnE,SAAoBC,IAAI,EAAaC,gBAAgB,EAAEC,IAAI,QAAmB,cAAc;AAC5F,OAA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,EAAEZ;EAAQ,gBAClEb,KAAA,CAAAgB,aAAA,CAACnB,IAAI;IAACU,KAAK,EAAE,CAACJ,yBAAyB,EAAE;MAAEmB,KAAK,EAAEV,OAAO,CAACL,KAAK,CAACgB,MAAM,CAACC;IAAK,CAAC,EAAEhB,SAAS;EAAE,GAAEG,OAAO,CAAQ,eAC3GX,KAAA,CAAAgB,aAAA,CAACZ,YAAY;IAACsB,SAAS,EAAE,KAAM;IAACC,GAAG,eAAE3B,KAAA,CAAAgB,aAAA,CAACd,eAAe;EAAI,EAAG,CAC3C,CACd,CAEV,CACsB;AAE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './MenuButton';\nexport * from './MenuTitle';\nexport * from './MenuView';\nexport * from './MenuRadioButton';\nexport * from './ScrollableMenu';\nexport * from './SubMenuWithButton';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,qBAAqB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { CastEventType, PlayerEventType } from 'react-native-theoplayer';
|
|
6
|
+
import { Text } from 'react-native';
|
|
7
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
8
|
+
/**
|
|
9
|
+
* A simple cast message showing the current state of casting for the `react-native-theoplayer` UI.
|
|
10
|
+
*/
|
|
11
|
+
export class CastMessage extends PureComponent {
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(props);
|
|
14
|
+
_defineProperty(this, "_processCastState", (state, target) => {
|
|
15
|
+
let message;
|
|
16
|
+
switch (state) {
|
|
17
|
+
case 'connecting':
|
|
18
|
+
message = `Connecting to ${target} ...`;
|
|
19
|
+
break;
|
|
20
|
+
case 'connected':
|
|
21
|
+
message = `Playing on ${target}`;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
this.setState({
|
|
25
|
+
message
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "onCastEvent", event => {
|
|
29
|
+
if (event.subType !== CastEventType.CHROMECAST_STATE_CHANGE && event.subType !== CastEventType.AIRPLAY_STATE_CHANGE) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const castTarget = event.subType === CastEventType.CHROMECAST_STATE_CHANGE ? 'Chromecast' : 'Airplay';
|
|
33
|
+
this._processCastState(event.state, castTarget);
|
|
34
|
+
});
|
|
35
|
+
this.state = {
|
|
36
|
+
message: undefined
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
componentDidMount() {
|
|
40
|
+
var _player$cast$chromeca, _player$cast$airplay;
|
|
41
|
+
const player = this.context.player;
|
|
42
|
+
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
43
|
+
const chromecastState = (_player$cast$chromeca = player.cast.chromecast) === null || _player$cast$chromeca === void 0 ? void 0 : _player$cast$chromeca.state;
|
|
44
|
+
const airplayState = (_player$cast$airplay = player.cast.airplay) === null || _player$cast$airplay === void 0 ? void 0 : _player$cast$airplay.state;
|
|
45
|
+
if (chromecastState === 'connecting' || chromecastState === 'connected') {
|
|
46
|
+
this._processCastState(chromecastState, 'Chromecast');
|
|
47
|
+
} else if (airplayState === 'connecting' || airplayState === 'connected') {
|
|
48
|
+
this._processCastState(airplayState, 'Airplay');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
componentWillUnmount() {
|
|
52
|
+
const context = this.context;
|
|
53
|
+
context.player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const {
|
|
57
|
+
message
|
|
58
|
+
} = this.state;
|
|
59
|
+
if (!message) {
|
|
60
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
61
|
+
}
|
|
62
|
+
return /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(Text, {
|
|
63
|
+
style: [context.style.text, {
|
|
64
|
+
color: context.style.colors.text
|
|
65
|
+
}]
|
|
66
|
+
}, message));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
CastMessage.contextType = PlayerContext;
|
|
70
|
+
//# sourceMappingURL=CastMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","CastEventType","PlayerEventType","Text","PlayerContext","CastMessage","constructor","props","_defineProperty","state","target","message","setState","event","subType","CHROMECAST_STATE_CHANGE","AIRPLAY_STATE_CHANGE","castTarget","_processCastState","undefined","componentDidMount","_player$cast$chromeca","_player$cast$airplay","player","context","addEventListener","CAST_EVENT","onCastEvent","chromecastState","cast","chromecast","airplayState","airplay","componentWillUnmount","removeEventListener","render","createElement","Fragment","Consumer","style","text","color","colors","contextType"],"sources":["CastMessage.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { CastEvent, CastEventType, CastState, PlayerEventType } from 'react-native-theoplayer';\nimport { Text } from 'react-native';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\n\ninterface CastMessageState {\n message: string | undefined;\n}\n\n/**\n * A simple cast message showing the current state of casting for the `react-native-theoplayer` UI.\n */\nexport class CastMessage extends PureComponent<unknown, CastMessageState> {\n constructor(props: unknown) {\n super(props);\n this.state = { message: undefined };\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);\n const chromecastState = player.cast.chromecast?.state;\n const airplayState = player.cast.airplay?.state;\n if (chromecastState === 'connecting' || chromecastState === 'connected') {\n this._processCastState(chromecastState, 'Chromecast');\n } else if (airplayState === 'connecting' || airplayState === 'connected') {\n this._processCastState(airplayState, 'Airplay');\n }\n }\n\n componentWillUnmount() {\n const context = this.context as UiContext;\n context.player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);\n }\n\n private _processCastState = (state: CastState, target: 'Chromecast' | 'Airplay') => {\n let message: string | undefined;\n switch (state) {\n case 'connecting':\n message = `Connecting to ${target} ...`;\n break;\n case 'connected':\n message = `Playing on ${target}`;\n break;\n }\n this.setState({\n message,\n });\n };\n\n private onCastEvent = (event: CastEvent) => {\n if (event.subType !== CastEventType.CHROMECAST_STATE_CHANGE && event.subType !== CastEventType.AIRPLAY_STATE_CHANGE) {\n return;\n }\n const castTarget = event.subType === CastEventType.CHROMECAST_STATE_CHANGE ? 'Chromecast' : 'Airplay';\n this._processCastState(event.state, castTarget);\n };\n\n render() {\n const { message } = this.state;\n\n if (!message) {\n return <></>;\n }\n\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => <Text style={[context.style.text, { color: context.style.colors.text }]}>{message}</Text>}\n </PlayerContext.Consumer>\n );\n }\n}\n\nCastMessage.contextType = PlayerContext;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAAoBC,aAAa,EAAaC,eAAe,QAAQ,yBAAyB;AAC9F,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,aAAa,QAAmB,uBAAuB;AAMhE;AACA;AACA;AACA,OAAO,MAAMC,WAAW,SAASL,aAAa,CAA4B;EACxEM,WAAWA,CAACC,KAAc,EAAE;IAC1B,KAAK,CAACA,KAAK,CAAC;IAACC,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CAACU,eAAe,EAAE,YAAY,CAAC;IACvD,CAAC,MAAM,IAAIG,YAAY,KAAK,YAAY,IAAIA,YAAY,KAAK,WAAW,EAAE;MACxE,IAAI,CAACb,iBAAiB,CAACa,YAAY,EAAE,SAAS,CAAC;IACjD;EACF;EAEAE,oBAAoBA,CAAA,EAAG;IACrB,MAAMT,OAAO,GAAG,IAAI,CAACA,OAAoB;IACzCA,OAAO,CAACD,MAAM,CAACW,mBAAmB,CAAChC,eAAe,CAACwB,UAAU,EAAE,IAAI,CAACC,WAAW,CAAC;EAClF;EAyBAQ,MAAMA,CAAA,EAAG;IACP,MAAM;MAAExB;IAAQ,CAAC,GAAG,IAAI,CAACF,KAAK;IAE9B,IAAI,CAACE,OAAO,EAAE;MACZ,oBAAOZ,KAAA,CAAAqC,aAAA,CAAArC,KAAA,CAAAsC,QAAA,OAAK;IACd;IAEA,oBACEtC,KAAA,CAAAqC,aAAA,CAAChC,aAAa,CAACkC,QAAQ,QACnBd,OAAkB,iBAAKzB,KAAA,CAAAqC,aAAA,CAACjC,IAAI;MAACoC,KAAK,EAAE,CAACf,OAAO,CAACe,KAAK,CAACC,IAAI,EAAE;QAAEC,KAAK,EAAEjB,OAAO,CAACe,KAAK,CAACG,MAAM,CAACF;MAAK,CAAC;IAAE,GAAE7B,OAAO,CAAQ,CAC3F;EAE7B;AACF;AAEAN,WAAW,CAACsC,WAAW,GAAGvC,aAAa"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, View } from 'react-native';
|
|
3
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
4
|
+
import { SvgContext } from '../button/svg/SvgUtils';
|
|
5
|
+
import { ErrorSvg } from '../button/svg/ErrorSvg';
|
|
6
|
+
import { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer';
|
|
7
|
+
/**
|
|
8
|
+
* A fullscreen error component for the `react-native-theoplayer` UI.
|
|
9
|
+
*/
|
|
10
|
+
export function ErrorDisplay(props) {
|
|
11
|
+
const {
|
|
12
|
+
error
|
|
13
|
+
} = props;
|
|
14
|
+
return /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(View, {
|
|
15
|
+
style: [FULLSCREEN_CENTER_STYLE, {
|
|
16
|
+
backgroundColor: context.style.colors.errorBackground
|
|
17
|
+
}]
|
|
18
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
19
|
+
style: {
|
|
20
|
+
flexDirection: 'row'
|
|
21
|
+
}
|
|
22
|
+
}, /*#__PURE__*/React.createElement(SvgContext.Provider, {
|
|
23
|
+
value: {
|
|
24
|
+
fill: context.style.colors.icon,
|
|
25
|
+
height: '100%',
|
|
26
|
+
width: '100%'
|
|
27
|
+
}
|
|
28
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
29
|
+
style: {
|
|
30
|
+
height: context.style.dimensions.controlBarHeight,
|
|
31
|
+
aspectRatio: 1,
|
|
32
|
+
padding: 5
|
|
33
|
+
}
|
|
34
|
+
}, /*#__PURE__*/React.createElement(ErrorSvg, null))), /*#__PURE__*/React.createElement(Text, {
|
|
35
|
+
style: [context.style.text, {
|
|
36
|
+
color: context.style.colors.text,
|
|
37
|
+
alignSelf: 'center',
|
|
38
|
+
paddingLeft: 5
|
|
39
|
+
}]
|
|
40
|
+
}, "Error:")), /*#__PURE__*/React.createElement(Text, {
|
|
41
|
+
style: [context.style.text, {
|
|
42
|
+
color: context.style.colors.text
|
|
43
|
+
}]
|
|
44
|
+
}, error.errorMessage)));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=ErrorDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","View","PlayerContext","SvgContext","ErrorSvg","FULLSCREEN_CENTER_STYLE","ErrorDisplay","props","error","createElement","Consumer","context","style","backgroundColor","colors","errorBackground","flexDirection","Provider","value","fill","icon","height","width","dimensions","controlBarHeight","aspectRatio","padding","text","color","alignSelf","paddingLeft","errorMessage"],"sources":["ErrorDisplay.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport type { PlayerError } from 'react-native-theoplayer';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport { SvgContext } from '../button/svg/SvgUtils';\nimport { ErrorSvg } from '../button/svg/ErrorSvg';\nimport { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer';\n\nexport interface ErrorDisplayProps {\n /**\n * The error that will be displayed.\n */\n error: PlayerError;\n}\n\n/**\n * A fullscreen error component for the `react-native-theoplayer` UI.\n */\nexport function ErrorDisplay(props: ErrorDisplayProps) {\n const { error } = props;\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <View style={[FULLSCREEN_CENTER_STYLE, { backgroundColor: context.style.colors.errorBackground }]}>\n <View style={{ flexDirection: 'row' }}>\n <SvgContext.Provider\n value={{\n fill: context.style.colors.icon,\n height: '100%',\n width: '100%',\n }}>\n <View style={{ height: context.style.dimensions.controlBarHeight, aspectRatio: 1, padding: 5 }}>\n <ErrorSvg />\n </View>\n </SvgContext.Provider>\n <Text style={[context.style.text, { color: context.style.colors.text, alignSelf: 'center', paddingLeft: 5 }]}>Error:</Text>\n </View>\n <Text style={[context.style.text, { color: context.style.colors.text }]}>{error.errorMessage}</Text>\n </View>\n )}\n </PlayerContext.Consumer>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,SAASC,aAAa,QAAmB,uBAAuB;AAChE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,uBAAuB,QAAQ,6BAA6B;AASrE;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,KAAwB,EAAE;EACrD,MAAM;IAAEC;EAAM,CAAC,GAAGD,KAAK;EACvB,oBACER,KAAA,CAAAU,aAAA,CAACP,aAAa,CAACQ,QAAQ,QAC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"sourcesContent":["export * from './CastMessage';\nexport * from './ErrorDisplay';\n"],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,gBAAgB"}
|
|
@@ -0,0 +1,184 @@
|
|
|
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 { StyleSheet, View } from 'react-native';
|
|
6
|
+
import { PlayerEventType } from 'react-native-theoplayer';
|
|
7
|
+
import { PlayerContext } from '../util/PlayerContext';
|
|
8
|
+
import Slider from '@react-native-community/slider';
|
|
9
|
+
import { SingleThumbnailView } from './thumbnail/SingleThumbnailView';
|
|
10
|
+
/**
|
|
11
|
+
* The default seek bar component for the `react-native-theoplayer` UI.
|
|
12
|
+
*/
|
|
13
|
+
export class SeekBar extends PureComponent {
|
|
14
|
+
constructor(props) {
|
|
15
|
+
var _this;
|
|
16
|
+
super(props);
|
|
17
|
+
_this = this;
|
|
18
|
+
_defineProperty(this, "_seekBlockingTimeout", void 0);
|
|
19
|
+
_defineProperty(this, "_clearIsScrubbingTimout", void 0);
|
|
20
|
+
_defineProperty(this, "_onTimeUpdate", event => {
|
|
21
|
+
if (!this.state.ignoreTimeupdate) {
|
|
22
|
+
this.setState({
|
|
23
|
+
sliderTime: event.currentTime
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
_defineProperty(this, "_onLoadedMetadata", event => this.setState({
|
|
28
|
+
duration: event.duration
|
|
29
|
+
}));
|
|
30
|
+
_defineProperty(this, "_onDurationChange", event => this.setState({
|
|
31
|
+
duration: event.duration
|
|
32
|
+
}));
|
|
33
|
+
_defineProperty(this, "_onProgress", event => this.setState({
|
|
34
|
+
seekable: event.seekable
|
|
35
|
+
}));
|
|
36
|
+
_defineProperty(this, "_onSlidingStart", value => {
|
|
37
|
+
this.setState({
|
|
38
|
+
sliderTime: value
|
|
39
|
+
});
|
|
40
|
+
this._prepareSeekStart();
|
|
41
|
+
const player = this.context.player;
|
|
42
|
+
if (!player.paused) {
|
|
43
|
+
this.debounceSeek(value);
|
|
44
|
+
player.pause();
|
|
45
|
+
this.setState({
|
|
46
|
+
pausedDueToScrubbing: true
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
_defineProperty(this, "_onValueChange", value => {
|
|
51
|
+
this.setState({
|
|
52
|
+
sliderTime: value
|
|
53
|
+
});
|
|
54
|
+
if (this.state.ignoreTimeupdate) {
|
|
55
|
+
this.debounceSeek(value);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "_onSlidingComplete", value => {
|
|
59
|
+
this.setState({
|
|
60
|
+
sliderTime: value
|
|
61
|
+
});
|
|
62
|
+
this.debounceSeek(value, true);
|
|
63
|
+
const player = this.context.player;
|
|
64
|
+
const isEnded = player.currentTime === player.duration;
|
|
65
|
+
if (this.state.pausedDueToScrubbing && !isEnded) {
|
|
66
|
+
player.play();
|
|
67
|
+
this.setState({
|
|
68
|
+
pausedDueToScrubbing: false
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
this._finishSeek();
|
|
72
|
+
});
|
|
73
|
+
_defineProperty(this, "_prepareSeekStart", () => {
|
|
74
|
+
this.setState({
|
|
75
|
+
isSeeking: true,
|
|
76
|
+
ignoreTimeupdate: true
|
|
77
|
+
});
|
|
78
|
+
clearTimeout(this._clearIsScrubbingTimout);
|
|
79
|
+
});
|
|
80
|
+
_defineProperty(this, "_finishSeek", () => {
|
|
81
|
+
this.setState({
|
|
82
|
+
isSeeking: false
|
|
83
|
+
});
|
|
84
|
+
// Wait for timeupdate events to settle after seeking, so the Slider does not jump back and forth.
|
|
85
|
+
this._clearIsScrubbingTimout = setTimeout(() => {
|
|
86
|
+
this.setState({
|
|
87
|
+
ignoreTimeupdate: false
|
|
88
|
+
});
|
|
89
|
+
}, 1000);
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "debounceSeek", function (value) {
|
|
92
|
+
let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
93
|
+
// Don't bombard the player with seeks when seeking. Allow only one seek ever X milliseconds:
|
|
94
|
+
const MAX_SEEK_INTERVAL = 200;
|
|
95
|
+
if (force || _this._seekBlockingTimeout === undefined) {
|
|
96
|
+
if (force) {
|
|
97
|
+
clearTimeout(_this._seekBlockingTimeout);
|
|
98
|
+
_this._seekBlockingTimeout = undefined;
|
|
99
|
+
}
|
|
100
|
+
_this._seekBlockingTimeout = setTimeout(() => {
|
|
101
|
+
_this._seekBlockingTimeout = undefined;
|
|
102
|
+
}, MAX_SEEK_INTERVAL);
|
|
103
|
+
// Do seek
|
|
104
|
+
const player = _this.context.player;
|
|
105
|
+
player.currentTime = value;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
this.state = SeekBar.initialState;
|
|
109
|
+
}
|
|
110
|
+
componentDidMount() {
|
|
111
|
+
const player = this.context.player;
|
|
112
|
+
player.addEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);
|
|
113
|
+
player.addEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);
|
|
114
|
+
player.addEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);
|
|
115
|
+
player.addEventListener(PlayerEventType.PROGRESS, this._onProgress);
|
|
116
|
+
this.setState({
|
|
117
|
+
...SeekBar.initialState,
|
|
118
|
+
sliderTime: player.currentTime,
|
|
119
|
+
duration: player.duration,
|
|
120
|
+
seekable: player.seekable
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
componentWillUnmount() {
|
|
124
|
+
const context = this.context;
|
|
125
|
+
context.player.removeEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);
|
|
126
|
+
context.player.removeEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);
|
|
127
|
+
context.player.removeEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);
|
|
128
|
+
context.player.removeEventListener(PlayerEventType.PROGRESS, this._onProgress);
|
|
129
|
+
clearTimeout(this._seekBlockingTimeout);
|
|
130
|
+
clearTimeout(this._clearIsScrubbingTimout);
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
const {
|
|
134
|
+
seekable,
|
|
135
|
+
sliderTime,
|
|
136
|
+
duration,
|
|
137
|
+
isSeeking,
|
|
138
|
+
width
|
|
139
|
+
} = this.state;
|
|
140
|
+
const {
|
|
141
|
+
style
|
|
142
|
+
} = this.props;
|
|
143
|
+
const seekableStart = seekable.length > 0 ? seekable[0].start : 0;
|
|
144
|
+
const seekableEnd = seekable.length > 0 ? seekable[0].end : 0;
|
|
145
|
+
return /*#__PURE__*/React.createElement(PlayerContext.Consumer, null, context => /*#__PURE__*/React.createElement(View, {
|
|
146
|
+
style: [StyleSheet.absoluteFill, style],
|
|
147
|
+
onLayout: event => {
|
|
148
|
+
this.setState({
|
|
149
|
+
width: event.nativeEvent.layout.width
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}, isSeeking && /*#__PURE__*/React.createElement(SingleThumbnailView, {
|
|
153
|
+
seekableStart: seekableStart,
|
|
154
|
+
seekableEnd: seekableEnd,
|
|
155
|
+
currentTime: sliderTime,
|
|
156
|
+
seekBarWidth: width
|
|
157
|
+
}), /*#__PURE__*/React.createElement(Slider, {
|
|
158
|
+
disabled: !(duration > 0) && seekable.length > 0,
|
|
159
|
+
style: [StyleSheet.absoluteFill, style],
|
|
160
|
+
minimumValue: seekableStart,
|
|
161
|
+
maximumValue: seekableEnd,
|
|
162
|
+
step: 1000,
|
|
163
|
+
onSlidingStart: this._onSlidingStart,
|
|
164
|
+
onValueChange: this._onValueChange,
|
|
165
|
+
onSlidingComplete: this._onSlidingComplete,
|
|
166
|
+
value: sliderTime,
|
|
167
|
+
focusable: true,
|
|
168
|
+
minimumTrackTintColor: context.style.colors.seekBarMinimum,
|
|
169
|
+
maximumTrackTintColor: context.style.colors.seekBarMaximum,
|
|
170
|
+
thumbTintColor: context.style.colors.seekBarDot
|
|
171
|
+
})));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
_defineProperty(SeekBar, "initialState", {
|
|
175
|
+
ignoreTimeupdate: false,
|
|
176
|
+
isSeeking: false,
|
|
177
|
+
sliderTime: 0,
|
|
178
|
+
duration: 0,
|
|
179
|
+
seekable: [],
|
|
180
|
+
pausedDueToScrubbing: false,
|
|
181
|
+
width: 0
|
|
182
|
+
});
|
|
183
|
+
SeekBar.contextType = PlayerContext;
|
|
184
|
+
//# sourceMappingURL=SeekBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PureComponent","StyleSheet","View","PlayerEventType","PlayerContext","Slider","SingleThumbnailView","SeekBar","constructor","props","_this","this","_defineProperty","event","state","ignoreTimeupdate","setState","sliderTime","currentTime","duration","seekable","value","_prepareSeekStart","player","context","paused","debounceSeek","pause","pausedDueToScrubbing","isEnded","play","_finishSeek","isSeeking","clearTimeout","_clearIsScrubbingTimout","setTimeout","force","arguments","length","undefined","MAX_SEEK_INTERVAL","_seekBlockingTimeout","initialState","componentDidMount","addEventListener","LOADED_METADATA","_onLoadedMetadata","DURATION_CHANGE","_onDurationChange","TIME_UPDATE","_onTimeUpdate","PROGRESS","_onProgress","componentWillUnmount","removeEventListener","render","width","style","seekableStart","start","seekableEnd","end","createElement","Consumer","absoluteFill","onLayout","nativeEvent","layout","seekBarWidth","disabled","minimumValue","maximumValue","step","onSlidingStart","_onSlidingStart","onValueChange","_onValueChange","onSlidingComplete","_onSlidingComplete","focusable","minimumTrackTintColor","colors","seekBarMinimum","maximumTrackTintColor","seekBarMaximum","thumbTintColor","seekBarDot","contextType"],"sources":["SeekBar.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport { DurationChangeEvent, LoadedMetadataEvent, PlayerEventType, ProgressEvent, TimeRange, TimeUpdateEvent } from 'react-native-theoplayer';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport Slider from '@react-native-community/slider';\nimport { SingleThumbnailView } from './thumbnail/SingleThumbnailView';\n\nexport interface SeekBarProps {\n /**\n * Optional style applied to the SeekBar.\n */\n style?: StyleProp<ViewStyle>;\n}\n\ninterface SeekBarState {\n ignoreTimeupdate: boolean;\n isSeeking: boolean;\n pausedDueToScrubbing: boolean;\n seekable: TimeRange[];\n duration: number;\n sliderTime: number;\n width: number;\n}\n\n/**\n * The default seek bar component for the `react-native-theoplayer` UI.\n */\nexport class SeekBar extends PureComponent<SeekBarProps, SeekBarState> {\n private static initialState: SeekBarState = {\n ignoreTimeupdate: false,\n isSeeking: false,\n sliderTime: 0,\n duration: 0,\n seekable: [],\n pausedDueToScrubbing: false,\n width: 0,\n };\n\n private _seekBlockingTimeout: NodeJS.Timeout | undefined;\n private _clearIsScrubbingTimout: NodeJS.Timeout | undefined;\n\n constructor(props: SeekBarProps) {\n super(props);\n this.state = SeekBar.initialState;\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);\n player.addEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);\n player.addEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);\n player.addEventListener(PlayerEventType.PROGRESS, this._onProgress);\n this.setState({\n ...SeekBar.initialState,\n sliderTime: player.currentTime,\n duration: player.duration,\n seekable: player.seekable,\n });\n }\n\n componentWillUnmount() {\n const context = this.context as UiContext;\n context.player.removeEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);\n context.player.removeEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);\n context.player.removeEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);\n context.player.removeEventListener(PlayerEventType.PROGRESS, this._onProgress);\n clearTimeout(this._seekBlockingTimeout);\n clearTimeout(this._clearIsScrubbingTimout);\n }\n\n private _onTimeUpdate = (event: TimeUpdateEvent) => {\n if (!this.state.ignoreTimeupdate) {\n this.setState({ sliderTime: event.currentTime });\n }\n };\n private _onLoadedMetadata = (event: LoadedMetadataEvent) => this.setState({ duration: event.duration });\n private _onDurationChange = (event: DurationChangeEvent) => this.setState({ duration: event.duration });\n private _onProgress = (event: ProgressEvent) => this.setState({ seekable: event.seekable });\n\n private _onSlidingStart = (value: number) => {\n this.setState({ sliderTime: value });\n this._prepareSeekStart();\n const player = (this.context as UiContext).player;\n if (!player.paused) {\n this.debounceSeek(value);\n player.pause();\n this.setState({ pausedDueToScrubbing: true });\n }\n };\n\n private _onValueChange = (value: number) => {\n this.setState({ sliderTime: value });\n if (this.state.ignoreTimeupdate) {\n this.debounceSeek(value);\n }\n };\n\n private _onSlidingComplete = (value: number) => {\n this.setState({ sliderTime: value });\n this.debounceSeek(value, true);\n const player = (this.context as UiContext).player;\n const isEnded = player.currentTime === player.duration;\n if (this.state.pausedDueToScrubbing && !isEnded) {\n player.play();\n this.setState({ pausedDueToScrubbing: false });\n }\n this._finishSeek();\n };\n\n private readonly _prepareSeekStart = () => {\n this.setState({ isSeeking: true, ignoreTimeupdate: true });\n clearTimeout(this._clearIsScrubbingTimout);\n };\n\n private readonly _finishSeek = () => {\n this.setState({ isSeeking: false });\n // Wait for timeupdate events to settle after seeking, so the Slider does not jump back and forth.\n this._clearIsScrubbingTimout = setTimeout(() => {\n this.setState({ ignoreTimeupdate: false });\n }, 1000);\n };\n\n private debounceSeek = (value: number, force = false) => {\n // Don't bombard the player with seeks when seeking. Allow only one seek ever X milliseconds:\n const MAX_SEEK_INTERVAL = 200;\n if (force || this._seekBlockingTimeout === undefined) {\n if (force) {\n clearTimeout(this._seekBlockingTimeout);\n this._seekBlockingTimeout = undefined;\n }\n this._seekBlockingTimeout = setTimeout(() => {\n this._seekBlockingTimeout = undefined;\n }, MAX_SEEK_INTERVAL);\n // Do seek\n const player = (this.context as UiContext).player;\n player.currentTime = value;\n }\n };\n\n render() {\n const { seekable, sliderTime, duration, isSeeking, width } = this.state;\n const { style } = this.props;\n const seekableStart = seekable.length > 0 ? seekable[0].start : 0;\n const seekableEnd = seekable.length > 0 ? seekable[0].end : 0;\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <View\n style={[StyleSheet.absoluteFill, style]}\n onLayout={(event: LayoutChangeEvent) => {\n this.setState({ width: event.nativeEvent.layout.width });\n }}>\n {isSeeking && (\n <SingleThumbnailView seekableStart={seekableStart} seekableEnd={seekableEnd} currentTime={sliderTime} seekBarWidth={width} />\n )}\n <Slider\n disabled={!(duration > 0) && seekable.length > 0}\n style={[StyleSheet.absoluteFill, style]}\n minimumValue={seekableStart}\n maximumValue={seekableEnd}\n step={1000}\n onSlidingStart={this._onSlidingStart}\n onValueChange={this._onValueChange}\n onSlidingComplete={this._onSlidingComplete}\n value={sliderTime}\n focusable={true}\n minimumTrackTintColor={context.style.colors.seekBarMinimum}\n maximumTrackTintColor={context.style.colors.seekBarMaximum}\n thumbTintColor={context.style.colors.seekBarDot}\n />\n </View>\n )}\n </PlayerContext.Consumer>\n );\n }\n}\n\nSeekBar.contextType = PlayerContext;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,aAAa,QAAQ,OAAO;AAC5C,SAAuCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACxF,SAAmDC,eAAe,QAAmD,yBAAyB;AAC9I,SAASC,aAAa,QAAmB,uBAAuB;AAChE,OAAOC,MAAM,MAAM,gCAAgC;AACnD,SAASC,mBAAmB,QAAQ,iCA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F,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["barrel.ts"],"sourcesContent":["export * from './SeekBar';\nexport * from './thumbnail/barrel';\n"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,oBAAoB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Dimensions, View } from 'react-native';
|
|
2
|
+
import { filterThumbnailTracks } from 'react-native-theoplayer';
|
|
3
|
+
import { PlayerContext } from '../../util/PlayerContext';
|
|
4
|
+
import { ThumbnailView } from './ThumbnailView';
|
|
5
|
+
import React, { useContext } from 'react';
|
|
6
|
+
export function SingleThumbnailView(props) {
|
|
7
|
+
const player = useContext(PlayerContext).player;
|
|
8
|
+
const thumbnailTrack = filterThumbnailTracks(player.textTracks);
|
|
9
|
+
if (!thumbnailTrack) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
11
|
+
}
|
|
12
|
+
const window = Dimensions.get('window');
|
|
13
|
+
const thumbnailSize = 0.35 * Math.min(window.height, window.width);
|
|
14
|
+
const {
|
|
15
|
+
seekableStart,
|
|
16
|
+
seekableEnd,
|
|
17
|
+
currentTime,
|
|
18
|
+
seekBarWidth
|
|
19
|
+
} = props;
|
|
20
|
+
const percentageOffset = (currentTime - seekableStart) / (seekableEnd - seekableStart);
|
|
21
|
+
const marginHorizontal = 10;
|
|
22
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
23
|
+
style: {
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
top: -(thumbnailSize * 0.6),
|
|
26
|
+
left: Math.max(0, Math.min(seekBarWidth - thumbnailSize - marginHorizontal, percentageOffset * seekBarWidth - 0.5 * thumbnailSize)),
|
|
27
|
+
marginHorizontal
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement(ThumbnailView, {
|
|
30
|
+
thumbnailTrack: thumbnailTrack,
|
|
31
|
+
duration: player.duration,
|
|
32
|
+
time: currentTime,
|
|
33
|
+
size: thumbnailSize,
|
|
34
|
+
showTimeLabel: false
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=SingleThumbnailView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","View","filterThumbnailTracks","PlayerContext","ThumbnailView","React","useContext","SingleThumbnailView","props","player","thumbnailTrack","textTracks","createElement","Fragment","window","get","thumbnailSize","Math","min","height","width","seekableStart","seekableEnd","currentTime","seekBarWidth","percentageOffset","marginHorizontal","style","position","top","left","max","duration","time","size","showTimeLabel"],"sources":["SingleThumbnailView.tsx"],"sourcesContent":["import { Dimensions, View } from 'react-native';\nimport { filterThumbnailTracks } from 'react-native-theoplayer';\nimport { PlayerContext } from '../../util/PlayerContext';\nimport { ThumbnailView } from './ThumbnailView';\nimport React, { useContext } from 'react';\n\nexport interface ThumbnailViewProps {\n seekableStart: number;\n seekableEnd: number;\n currentTime: number;\n seekBarWidth: number;\n}\n\nexport function SingleThumbnailView(props: ThumbnailViewProps) {\n const player = useContext(PlayerContext).player;\n const thumbnailTrack = filterThumbnailTracks(player.textTracks);\n if (!thumbnailTrack) {\n return <></>;\n }\n const window = Dimensions.get('window');\n const thumbnailSize = 0.35 * Math.min(window.height, window.width);\n\n const { seekableStart, seekableEnd, currentTime, seekBarWidth } = props;\n const percentageOffset = (currentTime - seekableStart) / (seekableEnd - seekableStart);\n const marginHorizontal = 10;\n\n return (\n <View\n style={{\n position: 'absolute',\n top: -(thumbnailSize * 0.6),\n left: Math.max(0, Math.min(seekBarWidth - thumbnailSize - marginHorizontal, percentageOffset * seekBarWidth - 0.5 * thumbnailSize)),\n marginHorizontal,\n }}>\n <ThumbnailView thumbnailTrack={thumbnailTrack} duration={player.duration} time={currentTime} size={thumbnailSize} showTimeLabel={false} />\n </View>\n );\n}\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D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,EAAEV,WAAY;IAACW,IAAI,EAAElB,aAAc;IAACmB,aAAa,EAAE;EAAM,EAAG,CACrI;AAEX"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function isTileMapThumbnail(thumbnail) {
|
|
2
|
+
return thumbnail.tileX !== undefined && thumbnail.tileY !== undefined && thumbnail.tileWidth !== undefined && thumbnail.tileHeight !== undefined;
|
|
3
|
+
}
|
|
4
|
+
export function isImageThumbnail(thumbnail) {
|
|
5
|
+
return !isTileMapThumbnail(thumbnail);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Description of a thumbnail, which can be either a full image or part of a tile map.
|
|
10
|
+
*/
|
|
11
|
+
//# sourceMappingURL=Thumbnail.js.map
|