react-native-theoplayer 2.7.0 → 2.9.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 +76 -13
- package/README.md +16 -2
- package/android/build.gradle +1 -1
- package/android/local/com/theoplayer/android-connector/mediasession/5.2.0-local/mediasession-5.2.0-local.aar +0 -0
- package/android/local/com/theoplayer/android-connector/mediasession/{4.12.0-local/mediasession-4.12.0-local.pom → 5.2.0-local/mediasession-5.2.0-local.pom} +1 -1
- package/android/local/com/theoplayer/android-connector/mediasession/maven-metadata-local.xml +4 -4
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +1 -1
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerContext.kt +36 -20
- package/android/src/main/java/com/theoplayer/media/CustomMediaButtonReceiver.kt +25 -0
- package/android/src/main/java/com/theoplayer/{audio → media}/MediaNotificationBuilder.kt +6 -1
- package/android/src/main/java/com/theoplayer/{audio → media}/MediaPlaybackService.kt +39 -11
- package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +12 -0
- package/android/src/main/java/com/theoplayer/track/TrackListAdapter.kt +17 -13
- package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegration.swift +19 -29
- package/lib/commonjs/api/cast/Chromecast.js.map +1 -1
- package/lib/commonjs/api/source/dash/DashPlaybackConfiguration.js.map +1 -1
- package/lib/commonjs/api/track/TextTrack.js.map +1 -1
- package/lib/commonjs/index.js +0 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js +17 -0
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/commonjs/internal/adapter/web/FullscreenAPI.js +41 -0
- package/lib/commonjs/internal/adapter/web/FullscreenAPI.js.map +1 -0
- package/lib/commonjs/internal/adapter/web/WebPresentationModeManager.js +45 -39
- package/lib/commonjs/internal/adapter/web/WebPresentationModeManager.js.map +1 -1
- package/lib/commonjs/internal/utils/CommonUtils.js +10 -0
- package/lib/commonjs/internal/utils/CommonUtils.js.map +1 -0
- package/lib/module/api/cast/Chromecast.js.map +1 -1
- package/lib/module/api/source/dash/DashPlaybackConfiguration.js.map +1 -1
- package/lib/module/api/track/TextTrack.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerAdapter.js +18 -1
- package/lib/module/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/module/internal/adapter/web/FullscreenAPI.js +34 -0
- package/lib/module/internal/adapter/web/FullscreenAPI.js.map +1 -0
- package/lib/module/internal/adapter/web/WebPresentationModeManager.js +45 -39
- package/lib/module/internal/adapter/web/WebPresentationModeManager.js.map +1 -1
- package/lib/module/internal/utils/CommonUtils.js +4 -0
- package/lib/module/internal/utils/CommonUtils.js.map +1 -0
- package/lib/typescript/api/cast/Chromecast.d.ts +1 -1
- package/lib/typescript/api/source/dash/DashPlaybackConfiguration.d.ts +52 -0
- package/lib/typescript/api/track/TextTrack.d.ts +2 -2
- package/lib/typescript/index.d.ts +0 -1
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts +1 -0
- package/lib/typescript/internal/adapter/web/FullscreenAPI.d.ts +9 -0
- package/lib/typescript/internal/utils/CommonUtils.d.ts +1 -0
- package/package.json +2 -8
- package/react-native-theoplayer.podspec +1 -1
- package/src/api/cast/Chromecast.ts +1 -1
- package/src/api/source/dash/DashPlaybackConfiguration.ts +56 -0
- package/src/api/track/TextTrack.ts +2 -2
- package/src/index.tsx +0 -1
- package/src/internal/adapter/THEOplayerAdapter.ts +19 -0
- package/src/internal/adapter/web/FullscreenAPI.ts +59 -0
- package/src/internal/adapter/web/WebPresentationModeManager.ts +29 -22
- package/src/internal/utils/CommonUtils.ts +3 -0
- package/android/local/com/theoplayer/android-connector/mediasession/4.12.0-local/mediasession-4.12.0-local.aar +0 -0
- package/lib/commonjs/ui/THEOplayerDefaultUi.js +0 -82
- package/lib/commonjs/ui/THEOplayerDefaultUi.js.map +0 -1
- package/lib/commonjs/ui/THEOplayerTheme.js +0 -48
- package/lib/commonjs/ui/THEOplayerTheme.js.map +0 -1
- package/lib/commonjs/ui/barrel.js +0 -39
- package/lib/commonjs/ui/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +0 -99
- package/lib/commonjs/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +0 -1
- package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js +0 -35
- package/lib/commonjs/ui/components/activityindicator/DelayedActivityIndicator.js.map +0 -1
- package/lib/commonjs/ui/components/activityindicator/barrel.js +0 -28
- package/lib/commonjs/ui/components/activityindicator/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/barrel.js +0 -105
- package/lib/commonjs/ui/components/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/button/AirplayButton.js +0 -81
- package/lib/commonjs/ui/components/button/AirplayButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/ChromecastButton.js +0 -66
- package/lib/commonjs/ui/components/button/ChromecastButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/ChromecastButton.web.js +0 -82
- package/lib/commonjs/ui/components/button/ChromecastButton.web.js.map +0 -1
- package/lib/commonjs/ui/components/button/FullscreenButton.js +0 -72
- package/lib/commonjs/ui/components/button/FullscreenButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/MuteButton.js +0 -66
- package/lib/commonjs/ui/components/button/MuteButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/PipButton.js +0 -72
- package/lib/commonjs/ui/components/button/PipButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/PlayButton.js +0 -113
- package/lib/commonjs/ui/components/button/PlayButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/SkipButton.js +0 -122
- package/lib/commonjs/ui/components/button/SkipButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js +0 -82
- package/lib/commonjs/ui/components/button/actionbutton/ActionButton.js.map +0 -1
- package/lib/commonjs/ui/components/button/barrel.js +0 -105
- package/lib/commonjs/ui/components/button/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/AirplaySvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/AirplaySvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/ArrowForwardSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/BackSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/BackSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/BackwardSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/BackwardSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/ChromecastSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/ErrorSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/ErrorSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/ForwardSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/ForwardSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/FullscreenEnterSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/FullscreenExitSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/LanguageSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/LanguageSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/ListSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/ListSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/PauseSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/PauseSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/PipEnterSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/PipExitSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/PipExitSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/PlaySvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/PlaySvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/ReplaySvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/ReplaySvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/SettingsSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/SettingsSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/SvgUtils.js +0 -13
- package/lib/commonjs/ui/components/button/svg/SvgUtils.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/VolumeOffSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js +0 -22
- package/lib/commonjs/ui/components/button/svg/VolumeUpSvg.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/barrel.js +0 -226
- package/lib/commonjs/ui/components/button/svg/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/button/svg/res/AirPlayButton.html +0 -6
- package/lib/commonjs/ui/components/button/svg/res/Airplay.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/ChromecastButton.html +0 -25
- package/lib/commonjs/ui/components/button/svg/res/arrow_forward.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/back.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/backward.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/chromecast-48px.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/close.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/error.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/forward.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/language.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/list.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/live.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/pause.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/pip_enter.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/pip_exit.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/play.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/replay.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/settings.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/skip-next.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/volume-high.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/volume-low.svg +0 -1
- package/lib/commonjs/ui/components/button/svg/res/volume-off.svg +0 -1
- package/lib/commonjs/ui/components/controlbar/ControlBar.js +0 -61
- package/lib/commonjs/ui/components/controlbar/ControlBar.js.map +0 -1
- package/lib/commonjs/ui/components/controlbar/Spacer.js +0 -21
- package/lib/commonjs/ui/components/controlbar/Spacer.js.map +0 -1
- package/lib/commonjs/ui/components/controlbar/barrel.js +0 -28
- package/lib/commonjs/ui/components/controlbar/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/menu/LanguageMenuButton.js +0 -175
- package/lib/commonjs/ui/components/menu/LanguageMenuButton.js.map +0 -1
- package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js +0 -91
- package/lib/commonjs/ui/components/menu/PlaybackRateSubMenu.js.map +0 -1
- package/lib/commonjs/ui/components/menu/QualitySubMenu.js +0 -145
- package/lib/commonjs/ui/components/menu/QualitySubMenu.js.map +0 -1
- package/lib/commonjs/ui/components/menu/SettingsMenuButton.js +0 -36
- package/lib/commonjs/ui/components/menu/SettingsMenuButton.js.map +0 -1
- package/lib/commonjs/ui/components/menu/barrel.js +0 -61
- package/lib/commonjs/ui/components/menu/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/MenuButton.js +0 -34
- package/lib/commonjs/ui/components/menu/common/MenuButton.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js +0 -47
- package/lib/commonjs/ui/components/menu/common/MenuRadioButton.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/MenuTitle.js +0 -38
- package/lib/commonjs/ui/components/menu/common/MenuTitle.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/MenuView.js +0 -75
- package/lib/commonjs/ui/components/menu/common/MenuView.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js +0 -45
- package/lib/commonjs/ui/components/menu/common/ScrollableMenu.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js +0 -65
- package/lib/commonjs/ui/components/menu/common/SubMenuWithButton.js.map +0 -1
- package/lib/commonjs/ui/components/menu/common/barrel.js +0 -72
- package/lib/commonjs/ui/components/menu/common/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/message/CastMessage.js +0 -79
- package/lib/commonjs/ui/components/message/CastMessage.js.map +0 -1
- package/lib/commonjs/ui/components/message/ErrorDisplay.js +0 -53
- package/lib/commonjs/ui/components/message/ErrorDisplay.js.map +0 -1
- package/lib/commonjs/ui/components/message/barrel.js +0 -28
- package/lib/commonjs/ui/components/message/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/SeekBar.js +0 -194
- package/lib/commonjs/ui/components/seekbar/SeekBar.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/barrel.js +0 -28
- package/lib/commonjs/ui/components/seekbar/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js +0 -45
- package/lib/commonjs/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js +0 -18
- package/lib/commonjs/ui/components/seekbar/thumbnail/Thumbnail.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js +0 -256
- package/lib/commonjs/ui/components/seekbar/thumbnail/ThumbnailView.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js +0 -17
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +0 -17
- package/lib/commonjs/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +0 -1
- package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js +0 -28
- package/lib/commonjs/ui/components/seekbar/thumbnail/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js +0 -55
- package/lib/commonjs/ui/components/timelabel/StaticTimeLabel.js.map +0 -1
- package/lib/commonjs/ui/components/timelabel/TimeLabel.js +0 -88
- package/lib/commonjs/ui/components/timelabel/TimeLabel.js.map +0 -1
- package/lib/commonjs/ui/components/timelabel/barrel.js +0 -28
- package/lib/commonjs/ui/components/timelabel/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/uicontroller/UiContainer.js +0 -350
- package/lib/commonjs/ui/components/uicontroller/UiContainer.js.map +0 -1
- package/lib/commonjs/ui/components/uicontroller/UiControls.js +0 -6
- package/lib/commonjs/ui/components/uicontroller/UiControls.js.map +0 -1
- package/lib/commonjs/ui/components/uicontroller/barrel.js +0 -28
- package/lib/commonjs/ui/components/uicontroller/barrel.js.map +0 -1
- package/lib/commonjs/ui/components/util/PlayerContext.js +0 -19
- package/lib/commonjs/ui/components/util/PlayerContext.js.map +0 -1
- package/lib/commonjs/ui/components/util/TrackUtils.js +0 -69
- package/lib/commonjs/ui/components/util/TrackUtils.js.map +0 -1
- package/lib/commonjs/ui/components/util/barrel.js +0 -17
- package/lib/commonjs/ui/components/util/barrel.js.map +0 -1
- package/lib/commonjs/ui/utils/ArrayUtils.js +0 -19
- package/lib/commonjs/ui/utils/ArrayUtils.js.map +0 -1
- package/lib/commonjs/ui/utils/language/Language.js +0 -38
- package/lib/commonjs/ui/utils/language/Language.js.map +0 -1
- package/lib/commonjs/ui/utils/language/languages.json +0 -1658
- package/lib/commonjs/web/platform/BrowserDetection.js +0 -34
- package/lib/commonjs/web/platform/BrowserDetection.js.map +0 -1
- package/lib/module/ui/THEOplayerDefaultUi.js +0 -74
- package/lib/module/ui/THEOplayerDefaultUi.js.map +0 -1
- package/lib/module/ui/THEOplayerTheme.js +0 -41
- package/lib/module/ui/THEOplayerTheme.js.map +0 -1
- package/lib/module/ui/barrel.js +0 -4
- package/lib/module/ui/barrel.js.map +0 -1
- package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js +0 -90
- package/lib/module/ui/components/activityindicator/CenteredDelayedActivityIndicator.js.map +0 -1
- package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js +0 -26
- package/lib/module/ui/components/activityindicator/DelayedActivityIndicator.js.map +0 -1
- package/lib/module/ui/components/activityindicator/barrel.js +0 -3
- package/lib/module/ui/components/activityindicator/barrel.js.map +0 -1
- package/lib/module/ui/components/barrel.js +0 -10
- package/lib/module/ui/components/barrel.js.map +0 -1
- package/lib/module/ui/components/button/AirplayButton.js +0 -72
- package/lib/module/ui/components/button/AirplayButton.js.map +0 -1
- package/lib/module/ui/components/button/ChromecastButton.js +0 -56
- package/lib/module/ui/components/button/ChromecastButton.js.map +0 -1
- package/lib/module/ui/components/button/ChromecastButton.web.js +0 -72
- package/lib/module/ui/components/button/ChromecastButton.web.js.map +0 -1
- package/lib/module/ui/components/button/FullscreenButton.js +0 -63
- package/lib/module/ui/components/button/FullscreenButton.js.map +0 -1
- package/lib/module/ui/components/button/MuteButton.js +0 -57
- package/lib/module/ui/components/button/MuteButton.js.map +0 -1
- package/lib/module/ui/components/button/PipButton.js +0 -63
- package/lib/module/ui/components/button/PipButton.js.map +0 -1
- package/lib/module/ui/components/button/PlayButton.js +0 -104
- package/lib/module/ui/components/button/PlayButton.js.map +0 -1
- package/lib/module/ui/components/button/SkipButton.js +0 -113
- package/lib/module/ui/components/button/SkipButton.js.map +0 -1
- package/lib/module/ui/components/button/actionbutton/ActionButton.js +0 -72
- package/lib/module/ui/components/button/actionbutton/ActionButton.js.map +0 -1
- package/lib/module/ui/components/button/barrel.js +0 -10
- package/lib/module/ui/components/button/barrel.js.map +0 -1
- package/lib/module/ui/components/button/svg/AirplaySvg.js +0 -12
- package/lib/module/ui/components/button/svg/AirplaySvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/ArrowForwardSvg.js +0 -12
- package/lib/module/ui/components/button/svg/ArrowForwardSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/BackSvg.js +0 -12
- package/lib/module/ui/components/button/svg/BackSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/BackwardSvg.js +0 -12
- package/lib/module/ui/components/button/svg/BackwardSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/ChromecastSvg.js +0 -12
- package/lib/module/ui/components/button/svg/ChromecastSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/ErrorSvg.js +0 -12
- package/lib/module/ui/components/button/svg/ErrorSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/ForwardSvg.js +0 -12
- package/lib/module/ui/components/button/svg/ForwardSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js +0 -12
- package/lib/module/ui/components/button/svg/FullscreenEnterSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/FullscreenExitSvg.js +0 -12
- package/lib/module/ui/components/button/svg/FullscreenExitSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/LanguageSvg.js +0 -12
- package/lib/module/ui/components/button/svg/LanguageSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/ListSvg.js +0 -12
- package/lib/module/ui/components/button/svg/ListSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/PauseSvg.js +0 -12
- package/lib/module/ui/components/button/svg/PauseSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/PipEnterSvg.js +0 -12
- package/lib/module/ui/components/button/svg/PipEnterSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/PipExitSvg.js +0 -12
- package/lib/module/ui/components/button/svg/PipExitSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/PlaySvg.js +0 -12
- package/lib/module/ui/components/button/svg/PlaySvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/ReplaySvg.js +0 -12
- package/lib/module/ui/components/button/svg/ReplaySvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/SettingsSvg.js +0 -12
- package/lib/module/ui/components/button/svg/SettingsSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/SvgUtils.js +0 -5
- package/lib/module/ui/components/button/svg/SvgUtils.js.map +0 -1
- package/lib/module/ui/components/button/svg/VolumeOffSvg.js +0 -12
- package/lib/module/ui/components/button/svg/VolumeOffSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/VolumeUpSvg.js +0 -12
- package/lib/module/ui/components/button/svg/VolumeUpSvg.js.map +0 -1
- package/lib/module/ui/components/button/svg/barrel.js +0 -21
- package/lib/module/ui/components/button/svg/barrel.js.map +0 -1
- package/lib/module/ui/components/button/svg/res/AirPlayButton.html +0 -6
- package/lib/module/ui/components/button/svg/res/Airplay.svg +0 -1
- package/lib/module/ui/components/button/svg/res/ChromecastButton.html +0 -25
- package/lib/module/ui/components/button/svg/res/arrow_forward.svg +0 -1
- package/lib/module/ui/components/button/svg/res/back.svg +0 -1
- package/lib/module/ui/components/button/svg/res/backward.svg +0 -1
- package/lib/module/ui/components/button/svg/res/chromecast-48px.svg +0 -1
- package/lib/module/ui/components/button/svg/res/close.svg +0 -1
- package/lib/module/ui/components/button/svg/res/error.svg +0 -1
- package/lib/module/ui/components/button/svg/res/forward.svg +0 -1
- package/lib/module/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
- package/lib/module/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
- package/lib/module/ui/components/button/svg/res/language.svg +0 -1
- package/lib/module/ui/components/button/svg/res/list.svg +0 -1
- package/lib/module/ui/components/button/svg/res/live.svg +0 -1
- package/lib/module/ui/components/button/svg/res/pause.svg +0 -1
- package/lib/module/ui/components/button/svg/res/pip_enter.svg +0 -1
- package/lib/module/ui/components/button/svg/res/pip_exit.svg +0 -1
- package/lib/module/ui/components/button/svg/res/play.svg +0 -1
- package/lib/module/ui/components/button/svg/res/replay.svg +0 -1
- package/lib/module/ui/components/button/svg/res/settings.svg +0 -1
- package/lib/module/ui/components/button/svg/res/skip-next.svg +0 -1
- package/lib/module/ui/components/button/svg/res/volume-high.svg +0 -1
- package/lib/module/ui/components/button/svg/res/volume-low.svg +0 -1
- package/lib/module/ui/components/button/svg/res/volume-off.svg +0 -1
- package/lib/module/ui/components/controlbar/ControlBar.js +0 -52
- package/lib/module/ui/components/controlbar/ControlBar.js.map +0 -1
- package/lib/module/ui/components/controlbar/Spacer.js +0 -14
- package/lib/module/ui/components/controlbar/Spacer.js.map +0 -1
- package/lib/module/ui/components/controlbar/barrel.js +0 -3
- package/lib/module/ui/components/controlbar/barrel.js.map +0 -1
- package/lib/module/ui/components/menu/LanguageMenuButton.js +0 -165
- package/lib/module/ui/components/menu/LanguageMenuButton.js.map +0 -1
- package/lib/module/ui/components/menu/PlaybackRateSubMenu.js +0 -80
- package/lib/module/ui/components/menu/PlaybackRateSubMenu.js.map +0 -1
- package/lib/module/ui/components/menu/QualitySubMenu.js +0 -135
- package/lib/module/ui/components/menu/QualitySubMenu.js.map +0 -1
- package/lib/module/ui/components/menu/SettingsMenuButton.js +0 -28
- package/lib/module/ui/components/menu/SettingsMenuButton.js.map +0 -1
- package/lib/module/ui/components/menu/barrel.js +0 -6
- package/lib/module/ui/components/menu/barrel.js.map +0 -1
- package/lib/module/ui/components/menu/common/MenuButton.js +0 -26
- package/lib/module/ui/components/menu/common/MenuButton.js.map +0 -1
- package/lib/module/ui/components/menu/common/MenuRadioButton.js +0 -38
- package/lib/module/ui/components/menu/common/MenuRadioButton.js.map +0 -1
- package/lib/module/ui/components/menu/common/MenuTitle.js +0 -29
- package/lib/module/ui/components/menu/common/MenuTitle.js.map +0 -1
- package/lib/module/ui/components/menu/common/MenuView.js +0 -65
- package/lib/module/ui/components/menu/common/MenuView.js.map +0 -1
- package/lib/module/ui/components/menu/common/ScrollableMenu.js +0 -36
- package/lib/module/ui/components/menu/common/ScrollableMenu.js.map +0 -1
- package/lib/module/ui/components/menu/common/SubMenuWithButton.js +0 -56
- package/lib/module/ui/components/menu/common/SubMenuWithButton.js.map +0 -1
- package/lib/module/ui/components/menu/common/barrel.js +0 -7
- package/lib/module/ui/components/menu/common/barrel.js.map +0 -1
- package/lib/module/ui/components/message/CastMessage.js +0 -70
- package/lib/module/ui/components/message/CastMessage.js.map +0 -1
- package/lib/module/ui/components/message/ErrorDisplay.js +0 -46
- package/lib/module/ui/components/message/ErrorDisplay.js.map +0 -1
- package/lib/module/ui/components/message/barrel.js +0 -3
- package/lib/module/ui/components/message/barrel.js.map +0 -1
- package/lib/module/ui/components/seekbar/SeekBar.js +0 -184
- package/lib/module/ui/components/seekbar/SeekBar.js.map +0 -1
- package/lib/module/ui/components/seekbar/barrel.js +0 -3
- package/lib/module/ui/components/seekbar/barrel.js.map +0 -1
- package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js +0 -37
- package/lib/module/ui/components/seekbar/thumbnail/SingleThumbnailView.js.map +0 -1
- package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js +0 -11
- package/lib/module/ui/components/seekbar/thumbnail/Thumbnail.js.map +0 -1
- package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js +0 -246
- package/lib/module/ui/components/seekbar/thumbnail/ThumbnailView.js.map +0 -1
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js +0 -2
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.js.map +0 -1
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js +0 -3
- package/lib/module/ui/components/seekbar/thumbnail/Urlpolyfill.web.js.map +0 -1
- package/lib/module/ui/components/seekbar/thumbnail/barrel.js +0 -3
- package/lib/module/ui/components/seekbar/thumbnail/barrel.js.map +0 -1
- package/lib/module/ui/components/timelabel/StaticTimeLabel.js +0 -48
- package/lib/module/ui/components/timelabel/StaticTimeLabel.js.map +0 -1
- package/lib/module/ui/components/timelabel/TimeLabel.js +0 -78
- package/lib/module/ui/components/timelabel/TimeLabel.js.map +0 -1
- package/lib/module/ui/components/timelabel/barrel.js +0 -3
- package/lib/module/ui/components/timelabel/barrel.js.map +0 -1
- package/lib/module/ui/components/uicontroller/UiContainer.js +0 -336
- package/lib/module/ui/components/uicontroller/UiContainer.js.map +0 -1
- package/lib/module/ui/components/uicontroller/UiControls.js +0 -2
- package/lib/module/ui/components/uicontroller/UiControls.js.map +0 -1
- package/lib/module/ui/components/uicontroller/barrel.js +0 -3
- package/lib/module/ui/components/uicontroller/barrel.js.map +0 -1
- package/lib/module/ui/components/util/PlayerContext.js +0 -11
- package/lib/module/ui/components/util/PlayerContext.js.map +0 -1
- package/lib/module/ui/components/util/TrackUtils.js +0 -60
- package/lib/module/ui/components/util/TrackUtils.js.map +0 -1
- package/lib/module/ui/components/util/barrel.js +0 -2
- package/lib/module/ui/components/util/barrel.js.map +0 -1
- package/lib/module/ui/utils/ArrayUtils.js +0 -12
- package/lib/module/ui/utils/ArrayUtils.js.map +0 -1
- package/lib/module/ui/utils/language/Language.js +0 -27
- package/lib/module/ui/utils/language/Language.js.map +0 -1
- package/lib/module/ui/utils/language/languages.json +0 -1658
- package/lib/module/web/platform/BrowserDetection.js +0 -27
- package/lib/module/web/platform/BrowserDetection.js.map +0 -1
- package/lib/typescript/ui/THEOplayerDefaultUi.d.ts +0 -35
- package/lib/typescript/ui/THEOplayerTheme.d.ts +0 -84
- package/lib/typescript/ui/barrel.d.ts +0 -3
- package/lib/typescript/ui/components/activityindicator/CenteredDelayedActivityIndicator.d.ts +0 -25
- package/lib/typescript/ui/components/activityindicator/DelayedActivityIndicator.d.ts +0 -9
- package/lib/typescript/ui/components/activityindicator/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/barrel.d.ts +0 -9
- package/lib/typescript/ui/components/button/AirplayButton.d.ts +0 -18
- package/lib/typescript/ui/components/button/ChromecastButton.d.ts +0 -19
- package/lib/typescript/ui/components/button/ChromecastButton.web.d.ts +0 -19
- package/lib/typescript/ui/components/button/FullscreenButton.d.ts +0 -17
- package/lib/typescript/ui/components/button/MuteButton.d.ts +0 -16
- package/lib/typescript/ui/components/button/PipButton.d.ts +0 -17
- package/lib/typescript/ui/components/button/PlayButton.d.ts +0 -28
- package/lib/typescript/ui/components/button/SkipButton.d.ts +0 -33
- package/lib/typescript/ui/components/button/actionbutton/ActionButton.d.ts +0 -41
- package/lib/typescript/ui/components/button/barrel.d.ts +0 -9
- package/lib/typescript/ui/components/button/svg/AirplaySvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/ArrowForwardSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/BackSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/BackwardSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/ChromecastSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/ErrorSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/ForwardSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/FullscreenEnterSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/FullscreenExitSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/LanguageSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/ListSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/PauseSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/PipEnterSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/PipExitSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/PlaySvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/ReplaySvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/SettingsSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/SvgUtils.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/VolumeOffSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/VolumeUpSvg.d.ts +0 -3
- package/lib/typescript/ui/components/button/svg/barrel.d.ts +0 -20
- package/lib/typescript/ui/components/controlbar/ControlBar.d.ts +0 -39
- package/lib/typescript/ui/components/controlbar/Spacer.d.ts +0 -5
- package/lib/typescript/ui/components/controlbar/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/menu/LanguageMenuButton.d.ts +0 -40
- package/lib/typescript/ui/components/menu/PlaybackRateSubMenu.d.ts +0 -36
- package/lib/typescript/ui/components/menu/QualitySubMenu.d.ts +0 -29
- package/lib/typescript/ui/components/menu/SettingsMenuButton.d.ts +0 -12
- package/lib/typescript/ui/components/menu/barrel.d.ts +0 -5
- package/lib/typescript/ui/components/menu/common/MenuButton.d.ts +0 -25
- package/lib/typescript/ui/components/menu/common/MenuRadioButton.d.ts +0 -33
- package/lib/typescript/ui/components/menu/common/MenuTitle.d.ts +0 -20
- package/lib/typescript/ui/components/menu/common/MenuView.d.ts +0 -21
- package/lib/typescript/ui/components/menu/common/ScrollableMenu.d.ts +0 -23
- package/lib/typescript/ui/components/menu/common/SubMenuWithButton.d.ts +0 -29
- package/lib/typescript/ui/components/menu/common/barrel.d.ts +0 -6
- package/lib/typescript/ui/components/message/CastMessage.d.ts +0 -16
- package/lib/typescript/ui/components/message/ErrorDisplay.d.ts +0 -12
- package/lib/typescript/ui/components/message/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/seekbar/SeekBar.d.ts +0 -41
- package/lib/typescript/ui/components/seekbar/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/seekbar/thumbnail/SingleThumbnailView.d.ts +0 -8
- package/lib/typescript/ui/components/seekbar/thumbnail/Thumbnail.d.ts +0 -56
- package/lib/typescript/ui/components/seekbar/thumbnail/ThumbnailView.d.ts +0 -60
- package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.d.ts +0 -1
- package/lib/typescript/ui/components/seekbar/thumbnail/Urlpolyfill.web.d.ts +0 -1
- package/lib/typescript/ui/components/seekbar/thumbnail/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/timelabel/StaticTimeLabel.d.ts +0 -24
- package/lib/typescript/ui/components/timelabel/TimeLabel.d.ts +0 -32
- package/lib/typescript/ui/components/timelabel/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/uicontroller/UiContainer.d.ts +0 -115
- package/lib/typescript/ui/components/uicontroller/UiControls.d.ts +0 -14
- package/lib/typescript/ui/components/uicontroller/barrel.d.ts +0 -2
- package/lib/typescript/ui/components/util/PlayerContext.d.ts +0 -22
- package/lib/typescript/ui/components/util/TrackUtils.d.ts +0 -10
- package/lib/typescript/ui/components/util/barrel.d.ts +0 -1
- package/lib/typescript/ui/utils/ArrayUtils.d.ts +0 -2
- package/lib/typescript/ui/utils/language/Language.d.ts +0 -19
- package/lib/typescript/web/platform/BrowserDetection.d.ts +0 -23
- package/src/ui/THEOplayerDefaultUi.tsx +0 -108
- package/src/ui/THEOplayerTheme.ts +0 -112
- package/src/ui/barrel.ts +0 -3
- package/src/ui/components/activityindicator/CenteredDelayedActivityIndicator.tsx +0 -96
- package/src/ui/components/activityindicator/DelayedActivityIndicator.tsx +0 -32
- package/src/ui/components/activityindicator/barrel.ts +0 -2
- package/src/ui/components/barrel.ts +0 -9
- package/src/ui/components/button/AirplayButton.tsx +0 -64
- package/src/ui/components/button/ChromecastButton.tsx +0 -60
- package/src/ui/components/button/ChromecastButton.web.tsx +0 -66
- package/src/ui/components/button/FullscreenButton.tsx +0 -60
- package/src/ui/components/button/MuteButton.tsx +0 -52
- package/src/ui/components/button/PipButton.tsx +0 -61
- package/src/ui/components/button/PlayButton.tsx +0 -107
- package/src/ui/components/button/SkipButton.tsx +0 -112
- package/src/ui/components/button/actionbutton/ActionButton.tsx +0 -105
- package/src/ui/components/button/barrel.ts +0 -9
- package/src/ui/components/button/svg/AirplaySvg.tsx +0 -18
- package/src/ui/components/button/svg/ArrowForwardSvg.tsx +0 -18
- package/src/ui/components/button/svg/BackSvg.tsx +0 -18
- package/src/ui/components/button/svg/BackwardSvg.tsx +0 -18
- package/src/ui/components/button/svg/ChromecastSvg.tsx +0 -18
- package/src/ui/components/button/svg/ErrorSvg.tsx +0 -18
- package/src/ui/components/button/svg/ForwardSvg.tsx +0 -18
- package/src/ui/components/button/svg/FullscreenEnterSvg.tsx +0 -18
- package/src/ui/components/button/svg/FullscreenExitSvg.tsx +0 -18
- package/src/ui/components/button/svg/LanguageSvg.tsx +0 -18
- package/src/ui/components/button/svg/ListSvg.tsx +0 -18
- package/src/ui/components/button/svg/PauseSvg.tsx +0 -18
- package/src/ui/components/button/svg/PipEnterSvg.tsx +0 -18
- package/src/ui/components/button/svg/PipExitSvg.tsx +0 -18
- package/src/ui/components/button/svg/PlaySvg.tsx +0 -18
- package/src/ui/components/button/svg/ReplaySvg.tsx +0 -18
- package/src/ui/components/button/svg/SettingsSvg.tsx +0 -18
- package/src/ui/components/button/svg/SvgUtils.ts +0 -4
- package/src/ui/components/button/svg/VolumeOffSvg.tsx +0 -18
- package/src/ui/components/button/svg/VolumeUpSvg.tsx +0 -18
- package/src/ui/components/button/svg/barrel.ts +0 -20
- package/src/ui/components/button/svg/res/AirPlayButton.html +0 -6
- package/src/ui/components/button/svg/res/Airplay.svg +0 -1
- package/src/ui/components/button/svg/res/ChromecastButton.html +0 -25
- package/src/ui/components/button/svg/res/arrow_forward.svg +0 -1
- package/src/ui/components/button/svg/res/back.svg +0 -1
- package/src/ui/components/button/svg/res/backward.svg +0 -1
- package/src/ui/components/button/svg/res/chromecast-48px.svg +0 -1
- package/src/ui/components/button/svg/res/close.svg +0 -1
- package/src/ui/components/button/svg/res/error.svg +0 -1
- package/src/ui/components/button/svg/res/forward.svg +0 -1
- package/src/ui/components/button/svg/res/fullscreen-enter.svg +0 -1
- package/src/ui/components/button/svg/res/fullscreen-exit.svg +0 -1
- package/src/ui/components/button/svg/res/language.svg +0 -1
- package/src/ui/components/button/svg/res/list.svg +0 -1
- package/src/ui/components/button/svg/res/live.svg +0 -1
- package/src/ui/components/button/svg/res/pause.svg +0 -1
- package/src/ui/components/button/svg/res/pip_enter.svg +0 -1
- package/src/ui/components/button/svg/res/pip_exit.svg +0 -1
- package/src/ui/components/button/svg/res/play.svg +0 -1
- package/src/ui/components/button/svg/res/replay.svg +0 -1
- package/src/ui/components/button/svg/res/settings.svg +0 -1
- package/src/ui/components/button/svg/res/skip-next.svg +0 -1
- package/src/ui/components/button/svg/res/volume-high.svg +0 -1
- package/src/ui/components/button/svg/res/volume-low.svg +0 -1
- package/src/ui/components/button/svg/res/volume-off.svg +0 -1
- package/src/ui/components/controlbar/ControlBar.tsx +0 -69
- package/src/ui/components/controlbar/Spacer.tsx +0 -9
- package/src/ui/components/controlbar/barrel.ts +0 -2
- package/src/ui/components/menu/LanguageMenuButton.tsx +0 -192
- package/src/ui/components/menu/PlaybackRateSubMenu.tsx +0 -93
- package/src/ui/components/menu/QualitySubMenu.tsx +0 -148
- package/src/ui/components/menu/SettingsMenuButton.tsx +0 -25
- package/src/ui/components/menu/barrel.ts +0 -5
- package/src/ui/components/menu/common/MenuButton.tsx +0 -49
- package/src/ui/components/menu/common/MenuRadioButton.tsx +0 -65
- package/src/ui/components/menu/common/MenuTitle.tsx +0 -37
- package/src/ui/components/menu/common/MenuView.tsx +0 -62
- package/src/ui/components/menu/common/ScrollableMenu.tsx +0 -43
- package/src/ui/components/menu/common/SubMenuWithButton.tsx +0 -58
- package/src/ui/components/menu/common/barrel.ts +0 -6
- package/src/ui/components/message/CastMessage.tsx +0 -74
- package/src/ui/components/message/ErrorDisplay.tsx +0 -43
- package/src/ui/components/message/barrel.ts +0 -2
- package/src/ui/components/seekbar/SeekBar.tsx +0 -178
- package/src/ui/components/seekbar/barrel.ts +0 -2
- package/src/ui/components/seekbar/thumbnail/SingleThumbnailView.tsx +0 -38
- package/src/ui/components/seekbar/thumbnail/Thumbnail.ts +0 -72
- package/src/ui/components/seekbar/thumbnail/ThumbnailView.tsx +0 -266
- package/src/ui/components/seekbar/thumbnail/Urlpolyfill.ts +0 -1
- package/src/ui/components/seekbar/thumbnail/Urlpolyfill.web.ts +0 -2
- package/src/ui/components/seekbar/thumbnail/barrel.ts +0 -2
- package/src/ui/components/timelabel/StaticTimeLabel.tsx +0 -63
- package/src/ui/components/timelabel/TimeLabel.tsx +0 -79
- package/src/ui/components/timelabel/barrel.ts +0 -2
- package/src/ui/components/uicontroller/UiContainer.tsx +0 -355
- package/src/ui/components/uicontroller/UiControls.ts +0 -31
- package/src/ui/components/uicontroller/barrel.ts +0 -2
- package/src/ui/components/util/PlayerContext.ts +0 -29
- package/src/ui/components/util/TrackUtils.ts +0 -62
- package/src/ui/components/util/barrel.ts +0 -1
- package/src/ui/utils/ArrayUtils.ts +0 -12
- package/src/ui/utils/language/Language.ts +0 -38
- package/src/ui/utils/language/languages.json +0 -1658
- package/src/web/platform/BrowserDetection.ts +0 -38
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent, ReactNode } from 'react';
|
|
2
|
-
import { Animated, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import type { THEOplayer } from 'react-native-theoplayer';
|
|
4
|
-
import { PlayerError } from 'react-native-theoplayer';
|
|
5
|
-
import type { THEOplayerTheme } from '../../THEOplayerTheme';
|
|
6
|
-
import type { UiControls } from './UiControls';
|
|
7
|
-
interface UiContainerProps {
|
|
8
|
-
/**
|
|
9
|
-
* The player that is provided to all children using PlayerContext.
|
|
10
|
-
*/
|
|
11
|
-
player: THEOplayer;
|
|
12
|
-
/**
|
|
13
|
-
* The theme that is provided to all children using PlayerContext.
|
|
14
|
-
*/
|
|
15
|
-
theme: THEOplayerTheme;
|
|
16
|
-
/**
|
|
17
|
-
* The style of the container.
|
|
18
|
-
*/
|
|
19
|
-
style?: StyleProp<ViewStyle>;
|
|
20
|
-
/**
|
|
21
|
-
* The style of the top slot.
|
|
22
|
-
*/
|
|
23
|
-
topStyle?: StyleProp<ViewStyle>;
|
|
24
|
-
/**
|
|
25
|
-
* The style of the center slot.
|
|
26
|
-
*/
|
|
27
|
-
centerStyle?: StyleProp<ViewStyle>;
|
|
28
|
-
/**
|
|
29
|
-
* The style of the button slot.
|
|
30
|
-
*/
|
|
31
|
-
bottomStyle?: StyleProp<ViewStyle>;
|
|
32
|
-
/**
|
|
33
|
-
* The components to be put in the top slot.
|
|
34
|
-
*/
|
|
35
|
-
top?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* The components to be put in the center slot.
|
|
38
|
-
*/
|
|
39
|
-
center?: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* The components to be put in the bottom slot.
|
|
42
|
-
*/
|
|
43
|
-
bottom?: ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* A slot to put components behind the UI background.
|
|
46
|
-
*/
|
|
47
|
-
behind?: ReactNode;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* The default style for a fullscreen centered view.
|
|
51
|
-
*/
|
|
52
|
-
export declare const FULLSCREEN_CENTER_STYLE: ViewStyle;
|
|
53
|
-
/**
|
|
54
|
-
* The default style for the center container.
|
|
55
|
-
*/
|
|
56
|
-
export declare const UI_CONTAINER_STYLE: ViewStyle;
|
|
57
|
-
/**
|
|
58
|
-
* The default style for the top container.
|
|
59
|
-
*/
|
|
60
|
-
export declare const TOP_UI_CONTAINER_STYLE: ViewStyle;
|
|
61
|
-
/**
|
|
62
|
-
* The default style for the center container.
|
|
63
|
-
*/
|
|
64
|
-
export declare const CENTER_UI_CONTAINER_STYLE: ViewStyle;
|
|
65
|
-
/**
|
|
66
|
-
* The default style for the bottom container.
|
|
67
|
-
*/
|
|
68
|
-
export declare const BOTTOM_UI_CONTAINER_STYLE: ViewStyle;
|
|
69
|
-
interface UiContainerState {
|
|
70
|
-
fadeAnimation: Animated.Value;
|
|
71
|
-
currentMenu: ReactNode | undefined;
|
|
72
|
-
showing: boolean;
|
|
73
|
-
buttonsEnabled: boolean;
|
|
74
|
-
error: PlayerError | undefined;
|
|
75
|
-
firstPlay: boolean;
|
|
76
|
-
paused: boolean;
|
|
77
|
-
casting: boolean;
|
|
78
|
-
pip: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* A component that does all the coordination between UI components.
|
|
82
|
-
* - It provides all UI components with the PlayerContext, so they can access the styling and player.
|
|
83
|
-
* - It provides slots for UI components to be places in the top/center/bottom positions.
|
|
84
|
-
* - It uses animations to fade the UI in and out when applicable.
|
|
85
|
-
*/
|
|
86
|
-
export declare class UiContainer extends PureComponent<React.PropsWithChildren<UiContainerProps>, UiContainerState> implements UiControls {
|
|
87
|
-
private _currentFadeOutTimeout;
|
|
88
|
-
private _menus;
|
|
89
|
-
static initialState: UiContainerState;
|
|
90
|
-
constructor(props: UiContainerProps);
|
|
91
|
-
componentDidMount(): void;
|
|
92
|
-
componentWillUnmount(): void;
|
|
93
|
-
private onPlay;
|
|
94
|
-
private onPause;
|
|
95
|
-
private onSourceChange;
|
|
96
|
-
private onLoadStart;
|
|
97
|
-
private onError;
|
|
98
|
-
private onCastEvent;
|
|
99
|
-
private onEnded;
|
|
100
|
-
private onPresentationModeChange;
|
|
101
|
-
get buttonsEnabled_(): boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Request to show the UI due to user input.
|
|
104
|
-
*/
|
|
105
|
-
onUserAction_: () => void;
|
|
106
|
-
openMenu_: (menuConstructor: () => ReactNode) => void;
|
|
107
|
-
closeCurrentMenu_: () => void;
|
|
108
|
-
private stopAnimationsAndShowUi_;
|
|
109
|
-
private resumeAnimationsIfPossible_;
|
|
110
|
-
private doFadeIn_;
|
|
111
|
-
private doFadeOut_;
|
|
112
|
-
private get animationsBlocked_();
|
|
113
|
-
render(): JSX.Element;
|
|
114
|
-
}
|
|
115
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* A callback function to render a menu when needed.
|
|
4
|
-
*/
|
|
5
|
-
export declare type MenuConstructor = () => ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
* The API provided to all UI components in `react-native-theoplayer` so they can communicate with the UI.
|
|
8
|
-
*/
|
|
9
|
-
export interface UiControls {
|
|
10
|
-
readonly buttonsEnabled_: boolean;
|
|
11
|
-
onUserAction_: () => void;
|
|
12
|
-
openMenu_: (menuConstructor: MenuConstructor) => void;
|
|
13
|
-
closeCurrentMenu_: () => void;
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { THEOplayer } from 'react-native-theoplayer';
|
|
3
|
-
import type { THEOplayerTheme } from '../../THEOplayerTheme';
|
|
4
|
-
import type { UiControls } from '../uicontroller/UiControls';
|
|
5
|
-
export interface UiContext {
|
|
6
|
-
/**
|
|
7
|
-
* The THEOplayer from the THEOplayerView.
|
|
8
|
-
*/
|
|
9
|
-
readonly player: THEOplayer;
|
|
10
|
-
/**
|
|
11
|
-
* The configured THEOplayerTheme.
|
|
12
|
-
*/
|
|
13
|
-
readonly style: THEOplayerTheme;
|
|
14
|
-
/**
|
|
15
|
-
* UI controls for the components to communicate with the UI.
|
|
16
|
-
*/
|
|
17
|
-
readonly ui: UiControls;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The context for all UI components of `react-native-theoplayer`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const PlayerContext: React.Context<UiContext>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { MediaTrack, TextTrack } from 'react-native-theoplayer';
|
|
2
|
-
import { TrackListEventType, VideoQuality } from 'react-native-theoplayer';
|
|
3
|
-
export declare function getTrackLabel(track: MediaTrack | TextTrack): string;
|
|
4
|
-
export declare function stringFromTextTrackListEvent(type: TrackListEventType): string;
|
|
5
|
-
/**
|
|
6
|
-
* Retain renderable tracks.
|
|
7
|
-
* https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-showing
|
|
8
|
-
*/
|
|
9
|
-
export declare function filterRenderableTracks(textTracks: TextTrack[]): TextTrack[];
|
|
10
|
-
export declare function getVideoQualityLabel(quality: VideoQuality | undefined, withBandWidth?: boolean): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PlayerContext';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface ISO639Language {
|
|
2
|
-
name: string;
|
|
3
|
-
local: string;
|
|
4
|
-
'1': string;
|
|
5
|
-
'2': string;
|
|
6
|
-
'2T': string;
|
|
7
|
-
'2B': string;
|
|
8
|
-
'3': string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* "und" is intended for cases where the language in the data
|
|
12
|
-
* has not been identified, such as when it is mislabeled
|
|
13
|
-
* or never had been labeled.
|
|
14
|
-
*
|
|
15
|
-
* https://en.wikipedia.org/wiki/ISO_639:und
|
|
16
|
-
*/
|
|
17
|
-
export declare const ISO639_UNDETERMINED = "und";
|
|
18
|
-
export declare function getISO639LanguageByCode(code: string): ISO639Language | undefined;
|
|
19
|
-
export declare const iso639Data: ISO639Language[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
ActiveXObject?: any;
|
|
4
|
-
DocumentTouch?: any;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
declare class BrowserDetection {
|
|
8
|
-
static readonly instance_: BrowserDetection;
|
|
9
|
-
private readonly _isWindowsPhone;
|
|
10
|
-
private readonly _isIphone;
|
|
11
|
-
private readonly _isIpad;
|
|
12
|
-
private readonly _isIpod;
|
|
13
|
-
private readonly _isMac;
|
|
14
|
-
private readonly _isTizen;
|
|
15
|
-
private readonly _isTouch;
|
|
16
|
-
private readonly _isIpadOs;
|
|
17
|
-
private readonly _isIos;
|
|
18
|
-
private readonly _isSafari;
|
|
19
|
-
get IS_IOS_(): boolean;
|
|
20
|
-
get IS_SAFARI_(): boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare const browserDetection: BrowserDetection;
|
|
23
|
-
export {};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, useState } from 'react';
|
|
2
|
-
import { FULLSCREEN_CENTER_STYLE, PlayerConfiguration, THEOplayer, THEOplayerView } from 'react-native-theoplayer';
|
|
3
|
-
import { SeekBar } from './components/seekbar/SeekBar';
|
|
4
|
-
import { AirplayButton } from './components/button/AirplayButton';
|
|
5
|
-
import { CenteredControlBar, ControlBar } from './components/controlbar/ControlBar';
|
|
6
|
-
import { TimeLabel } from './components/timelabel/TimeLabel';
|
|
7
|
-
import { FullscreenButton } from './components/button/FullscreenButton';
|
|
8
|
-
import { LanguageMenuButton } from './components/menu/LanguageMenuButton';
|
|
9
|
-
import { MuteButton } from './components/button/MuteButton';
|
|
10
|
-
import { CastMessage } from './components/message/CastMessage';
|
|
11
|
-
import { DEFAULT_THEOPLAYER_THEME, THEOplayerTheme } from './THEOplayerTheme';
|
|
12
|
-
import { Platform, StyleProp, View, ViewStyle } from 'react-native';
|
|
13
|
-
import { UiContainer } from './components/uicontroller/UiContainer';
|
|
14
|
-
import { PlayButton } from './components/button/PlayButton';
|
|
15
|
-
import { SkipButton } from './components/button/SkipButton';
|
|
16
|
-
import { Spacer } from './components/controlbar/Spacer';
|
|
17
|
-
import { ChromecastButton } from './components/button/ChromecastButton';
|
|
18
|
-
import { CenteredDelayedActivityIndicator } from './components/activityindicator/CenteredDelayedActivityIndicator';
|
|
19
|
-
|
|
20
|
-
export interface THEOplayerDefaultUiProps {
|
|
21
|
-
/**
|
|
22
|
-
* The style for the container.
|
|
23
|
-
*/
|
|
24
|
-
style?: StyleProp<ViewStyle>;
|
|
25
|
-
/**
|
|
26
|
-
* The theme for all components.
|
|
27
|
-
*/
|
|
28
|
-
theme?: Partial<THEOplayerTheme>;
|
|
29
|
-
/**
|
|
30
|
-
* The player configuration with THEOplayer license.
|
|
31
|
-
*/
|
|
32
|
-
config?: PlayerConfiguration;
|
|
33
|
-
/**
|
|
34
|
-
* The callback that is called when the internal THEOplayer is created.
|
|
35
|
-
* @param player the internal THEOplayer
|
|
36
|
-
*/
|
|
37
|
-
onPlayerReady?: (player: THEOplayer) => void;
|
|
38
|
-
/**
|
|
39
|
-
* A slot in the top right to add additional UI components.
|
|
40
|
-
*/
|
|
41
|
-
topSlot?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* A slot in the bottom right to add additional UI components.
|
|
44
|
-
*/
|
|
45
|
-
bottomSlot?: ReactNode;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* A default UI layout which uses UI components from `react-native-theoplayer` to create a basic playback UI around a THEOplayerView.
|
|
50
|
-
*/
|
|
51
|
-
export function THEOplayerDefaultUi(props: THEOplayerDefaultUiProps) {
|
|
52
|
-
const { theme, config, topSlot, bottomSlot, style } = props;
|
|
53
|
-
const [player, setPlayer] = useState<THEOplayer | undefined>(undefined);
|
|
54
|
-
const chromeless = config?.chromeless ?? false;
|
|
55
|
-
|
|
56
|
-
const onPlayerReady = (player: THEOplayer) => {
|
|
57
|
-
setPlayer(player);
|
|
58
|
-
props.onPlayerReady?.(player);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<View style={style}>
|
|
63
|
-
<View style={[FULLSCREEN_CENTER_STYLE, { backgroundColor: '#000000' }]} />
|
|
64
|
-
<THEOplayerView config={config} onPlayerReady={onPlayerReady}>
|
|
65
|
-
{player !== undefined && chromeless && (
|
|
66
|
-
<UiContainer
|
|
67
|
-
theme={{ ...DEFAULT_THEOPLAYER_THEME, ...theme }}
|
|
68
|
-
player={player}
|
|
69
|
-
behind={<CenteredDelayedActivityIndicator size={50} />}
|
|
70
|
-
top={
|
|
71
|
-
<ControlBar>
|
|
72
|
-
{topSlot}
|
|
73
|
-
{!Platform.isTV && (
|
|
74
|
-
<>
|
|
75
|
-
<AirplayButton />
|
|
76
|
-
<ChromecastButton />
|
|
77
|
-
</>
|
|
78
|
-
)}
|
|
79
|
-
<LanguageMenuButton />
|
|
80
|
-
</ControlBar>
|
|
81
|
-
}
|
|
82
|
-
center={<CenteredControlBar left={<SkipButton skip={-10} />} middle={<PlayButton />} right={<SkipButton skip={30} />} />}
|
|
83
|
-
bottom={
|
|
84
|
-
<>
|
|
85
|
-
<ControlBar style={{ justifyContent: 'flex-start' }}>
|
|
86
|
-
<CastMessage />
|
|
87
|
-
</ControlBar>
|
|
88
|
-
<ControlBar>
|
|
89
|
-
<SeekBar />
|
|
90
|
-
</ControlBar>
|
|
91
|
-
|
|
92
|
-
<ControlBar>
|
|
93
|
-
<MuteButton />
|
|
94
|
-
<TimeLabel showDuration={true} />
|
|
95
|
-
|
|
96
|
-
<Spacer />
|
|
97
|
-
|
|
98
|
-
{bottomSlot}
|
|
99
|
-
<FullscreenButton />
|
|
100
|
-
</ControlBar>
|
|
101
|
-
</>
|
|
102
|
-
}
|
|
103
|
-
/>
|
|
104
|
-
)}
|
|
105
|
-
</THEOplayerView>
|
|
106
|
-
</View>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { TextStyle } from 'react-native';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The theme colors.
|
|
5
|
-
*/
|
|
6
|
-
export interface ColorTheme {
|
|
7
|
-
/**
|
|
8
|
-
* The color of the UI background.
|
|
9
|
-
*/
|
|
10
|
-
uiBackground: string;
|
|
11
|
-
/**
|
|
12
|
-
* The color of the error display background.
|
|
13
|
-
*/
|
|
14
|
-
errorBackground: string;
|
|
15
|
-
/**
|
|
16
|
-
* The color of the SVG icons.
|
|
17
|
-
*/
|
|
18
|
-
icon: string;
|
|
19
|
-
/**
|
|
20
|
-
* The color of the SVG icons when they are selected.
|
|
21
|
-
*/
|
|
22
|
-
iconSelected: string;
|
|
23
|
-
/**
|
|
24
|
-
* The color of the text components.
|
|
25
|
-
*/
|
|
26
|
-
text: string;
|
|
27
|
-
/**
|
|
28
|
-
* The color of the text components when they are selected.
|
|
29
|
-
*/
|
|
30
|
-
textSelected: string;
|
|
31
|
-
/**
|
|
32
|
-
* The color of the text component background when it is selected.
|
|
33
|
-
*/
|
|
34
|
-
textSelectedBackground: string;
|
|
35
|
-
/**
|
|
36
|
-
* The color of the left side of the seek bar.
|
|
37
|
-
*/
|
|
38
|
-
seekBarMinimum: string;
|
|
39
|
-
/**
|
|
40
|
-
* The color of the right side of the seek bar.
|
|
41
|
-
*/
|
|
42
|
-
seekBarMaximum: string;
|
|
43
|
-
/**
|
|
44
|
-
* The color of the dot on the seek bar.
|
|
45
|
-
*/
|
|
46
|
-
seekBarDot: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The dimensions of various UI components.
|
|
51
|
-
*/
|
|
52
|
-
export interface Dimensions {
|
|
53
|
-
/**
|
|
54
|
-
* The height of the center control bar.
|
|
55
|
-
*/
|
|
56
|
-
centerControlBarHeight: number;
|
|
57
|
-
/**
|
|
58
|
-
* The height of all other control bars.
|
|
59
|
-
*/
|
|
60
|
-
controlBarHeight: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The theme used by `react-native-theoplayer` UI components.
|
|
65
|
-
*/
|
|
66
|
-
export interface THEOplayerTheme {
|
|
67
|
-
/**
|
|
68
|
-
* The theme colors.
|
|
69
|
-
*/
|
|
70
|
-
colors: ColorTheme;
|
|
71
|
-
/**
|
|
72
|
-
* The styling for all text components.
|
|
73
|
-
*/
|
|
74
|
-
text: TextStyle;
|
|
75
|
-
/**
|
|
76
|
-
* The amount of time after a user action where UI animations will resume.
|
|
77
|
-
*/
|
|
78
|
-
fadeAnimationTimoutMs: number;
|
|
79
|
-
/**
|
|
80
|
-
* The dimensions of various UI components.
|
|
81
|
-
*/
|
|
82
|
-
dimensions: Dimensions;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The default theme for the UI.
|
|
87
|
-
*/
|
|
88
|
-
export const DEFAULT_THEOPLAYER_THEME: THEOplayerTheme = {
|
|
89
|
-
colors: {
|
|
90
|
-
uiBackground: '#00000080',
|
|
91
|
-
errorBackground: '#2C2C2C',
|
|
92
|
-
icon: '#FFFFFF',
|
|
93
|
-
iconSelected: '#FFC50F',
|
|
94
|
-
text: '#FFFFFF',
|
|
95
|
-
textSelected: '#2C2C2C',
|
|
96
|
-
textSelectedBackground: '#FFFFFF',
|
|
97
|
-
seekBarMinimum: '#FFFFFF',
|
|
98
|
-
seekBarMaximum: '#FFFFFF50',
|
|
99
|
-
seekBarDot: '#FFFFFF',
|
|
100
|
-
},
|
|
101
|
-
text: {
|
|
102
|
-
textAlignVertical: 'center',
|
|
103
|
-
textAlign: 'center',
|
|
104
|
-
alignSelf: 'center',
|
|
105
|
-
fontSize: 16,
|
|
106
|
-
},
|
|
107
|
-
fadeAnimationTimoutMs: 2500,
|
|
108
|
-
dimensions: {
|
|
109
|
-
controlBarHeight: 40,
|
|
110
|
-
centerControlBarHeight: 52,
|
|
111
|
-
},
|
|
112
|
-
};
|
package/src/ui/barrel.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react';
|
|
2
|
-
import type { DelayedActivityIndicatorProps } from './DelayedActivityIndicator';
|
|
3
|
-
import { DelayedActivityIndicator } from './DelayedActivityIndicator';
|
|
4
|
-
import { View } from 'react-native';
|
|
5
|
-
import { ErrorEvent, PlayerError, PlayerEventType, ReadyStateChangeEvent } from 'react-native-theoplayer';
|
|
6
|
-
import { PlayerContext, UiContext } from '../util/PlayerContext';
|
|
7
|
-
import { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer';
|
|
8
|
-
|
|
9
|
-
interface CenteredDelayedActivityIndicatorState {
|
|
10
|
-
showLoadingIndicator: boolean;
|
|
11
|
-
error: PlayerError | undefined;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The default spinner for the `react-native-theoplayer` UI. It renders a ActivityIndicator when the player's playback is stalling due
|
|
16
|
-
* readystate changes.
|
|
17
|
-
*/
|
|
18
|
-
export class CenteredDelayedActivityIndicator extends PureComponent<DelayedActivityIndicatorProps, CenteredDelayedActivityIndicatorState> {
|
|
19
|
-
private static initialState: CenteredDelayedActivityIndicatorState = {
|
|
20
|
-
showLoadingIndicator: false,
|
|
21
|
-
error: undefined,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
constructor(props: DelayedActivityIndicatorProps) {
|
|
25
|
-
super(props);
|
|
26
|
-
this.state = CenteredDelayedActivityIndicator.initialState;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
componentDidMount() {
|
|
30
|
-
const player = (this.context as UiContext).player;
|
|
31
|
-
player.addEventListener(PlayerEventType.READYSTATE_CHANGE, this.onReadyStateChange);
|
|
32
|
-
player.addEventListener(PlayerEventType.ERROR, this.onError);
|
|
33
|
-
player.addEventListener(PlayerEventType.PLAYING, this.onPlaying);
|
|
34
|
-
player.addEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);
|
|
35
|
-
player.addEventListener(PlayerEventType.LOAD_START, this.onLoadStart);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
componentWillUnmount() {
|
|
39
|
-
const player = (this.context as UiContext).player;
|
|
40
|
-
player.removeEventListener(PlayerEventType.READYSTATE_CHANGE, this.onReadyStateChange);
|
|
41
|
-
player.removeEventListener(PlayerEventType.ERROR, this.onError);
|
|
42
|
-
player.removeEventListener(PlayerEventType.PLAYING, this.onPlaying);
|
|
43
|
-
player.removeEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);
|
|
44
|
-
player.removeEventListener(PlayerEventType.LOAD_START, this.onLoadStart);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
private onReadyStateChange = (event: ReadyStateChangeEvent) => {
|
|
48
|
-
this.maybeShowLoadingIndicator(event.readyState < 3);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
private onError = (event: ErrorEvent) => {
|
|
52
|
-
const { error } = event;
|
|
53
|
-
this.setState({ error });
|
|
54
|
-
this.maybeShowLoadingIndicator(false);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
private onPlaying = () => {
|
|
58
|
-
this.maybeShowLoadingIndicator(false);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
private onSourceChange = () => {
|
|
62
|
-
this.setState({ error: undefined });
|
|
63
|
-
this.maybeShowLoadingIndicator(false);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
private onLoadStart = () => {
|
|
67
|
-
this.setState({ error: undefined });
|
|
68
|
-
this.maybeShowLoadingIndicator(true);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
private maybeShowLoadingIndicator(showLoading: boolean) {
|
|
72
|
-
const { error } = this.state;
|
|
73
|
-
// do not change state to buffering in case of an error or if the player is paused
|
|
74
|
-
const player = (this.context as UiContext).player;
|
|
75
|
-
this.setState({ showLoadingIndicator: showLoading && !error && !player.paused });
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
render() {
|
|
79
|
-
const { showLoadingIndicator } = this.state;
|
|
80
|
-
const player = (this.context as UiContext).player;
|
|
81
|
-
return (
|
|
82
|
-
showLoadingIndicator &&
|
|
83
|
-
!player.paused && (
|
|
84
|
-
<PlayerContext.Consumer>
|
|
85
|
-
{(context: UiContext) => (
|
|
86
|
-
<View style={FULLSCREEN_CENTER_STYLE}>
|
|
87
|
-
<DelayedActivityIndicator color={context.style.colors.icon} {...this.props} />
|
|
88
|
-
</View>
|
|
89
|
-
)}
|
|
90
|
-
</PlayerContext.Consumer>
|
|
91
|
-
)
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
CenteredDelayedActivityIndicator.contextType = PlayerContext;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ActivityIndicator, ActivityIndicatorProps } from 'react-native';
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
-
|
|
4
|
-
export interface DelayedActivityIndicatorProps extends ActivityIndicatorProps {
|
|
5
|
-
delay?: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const DEFAULT_DELAY = 200;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The DelayedActivityIndicator renders a native ActivityIndicator after a certain delay.
|
|
12
|
-
*/
|
|
13
|
-
export const DelayedActivityIndicator = (props: DelayedActivityIndicatorProps) => {
|
|
14
|
-
const [showing, setShowing] = useState(false);
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const { delay } = props;
|
|
18
|
-
const timer = setTimeout(() => {
|
|
19
|
-
setShowing(true);
|
|
20
|
-
}, delay || DEFAULT_DELAY);
|
|
21
|
-
return () => clearTimeout(timer);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<ActivityIndicator
|
|
26
|
-
style={{
|
|
27
|
-
opacity: showing ? 1.0 : 0.0,
|
|
28
|
-
}}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './activityindicator/barrel';
|
|
2
|
-
export * from './button/barrel';
|
|
3
|
-
export * from './controlbar/barrel';
|
|
4
|
-
export * from './menu/barrel';
|
|
5
|
-
export * from './message/barrel';
|
|
6
|
-
export * from './seekbar/barrel';
|
|
7
|
-
export * from './timelabel/barrel';
|
|
8
|
-
export * from './uicontroller/barrel';
|
|
9
|
-
export * from './util/barrel';
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import { PlayerContext, UiContext } from '../util/PlayerContext';
|
|
4
|
-
import { isConnected } from './ChromecastButton';
|
|
5
|
-
import { ActionButton } from './actionbutton/ActionButton';
|
|
6
|
-
import { AirplaySvg } from './svg/AirplaySvg';
|
|
7
|
-
import { CastEvent, CastEventType, CastState, PlayerEventType } from './../../../api/barrel';
|
|
8
|
-
|
|
9
|
-
interface CastButtonState {
|
|
10
|
-
castState: CastState;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The default button to enable Airplay for the `react-native-theoplayer` UI.
|
|
15
|
-
*/
|
|
16
|
-
export class AirplayButton extends PureComponent<unknown, CastButtonState> {
|
|
17
|
-
private static initialState: CastButtonState = {
|
|
18
|
-
castState: CastState.unavailable,
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
constructor(props: unknown) {
|
|
22
|
-
super(props);
|
|
23
|
-
this.state = AirplayButton.initialState;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
componentDidMount() {
|
|
27
|
-
const player = (this.context as UiContext).player;
|
|
28
|
-
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
29
|
-
this.setState({ castState: player.cast.airplay?.state ?? CastState.unavailable });
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
componentWillUnmount() {
|
|
33
|
-
const player = (this.context as UiContext).player;
|
|
34
|
-
player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastStateChangeEvent);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
private onCastStateChangeEvent = (event: CastEvent) => {
|
|
38
|
-
if (event.subType != CastEventType.AIRPLAY_STATE_CHANGE) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
this.setState({ castState: event.state });
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
private onUIAirplayToggled = () => {
|
|
45
|
-
const player = (this.context as UiContext).player;
|
|
46
|
-
if (player.cast.airplay?.state !== CastState.unavailable) {
|
|
47
|
-
if (isConnected(player.cast.airplay?.state)) {
|
|
48
|
-
player.cast.airplay?.stop();
|
|
49
|
-
} else {
|
|
50
|
-
player.cast.airplay?.start();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
render() {
|
|
56
|
-
const { castState } = this.state;
|
|
57
|
-
if (castState === CastState.unavailable || Platform.isTV) {
|
|
58
|
-
return <></>;
|
|
59
|
-
}
|
|
60
|
-
return <ActionButton svg={<AirplaySvg />} touchable={true} onPress={this.onUIAirplayToggled} highlighted={isConnected(castState)} />;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
AirplayButton.contextType = PlayerContext;
|