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,355 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent, ReactNode } from 'react';
|
|
2
|
-
import { Animated, Platform, StyleProp, View, ViewStyle } from 'react-native';
|
|
3
|
-
import { PlayerContext } from '../util/PlayerContext';
|
|
4
|
-
import type { PresentationModeChangeEvent, THEOplayer } from 'react-native-theoplayer';
|
|
5
|
-
import { CastEvent, CastEventType, ErrorEvent, PlayerError, PlayerEventType, PresentationMode } from 'react-native-theoplayer';
|
|
6
|
-
import type { THEOplayerTheme } from '../../THEOplayerTheme';
|
|
7
|
-
import type { MenuConstructor, UiControls } from './UiControls';
|
|
8
|
-
import { ErrorDisplay } from '../message/ErrorDisplay';
|
|
9
|
-
|
|
10
|
-
interface UiContainerProps {
|
|
11
|
-
/**
|
|
12
|
-
* The player that is provided to all children using PlayerContext.
|
|
13
|
-
*/
|
|
14
|
-
player: THEOplayer;
|
|
15
|
-
/**
|
|
16
|
-
* The theme that is provided to all children using PlayerContext.
|
|
17
|
-
*/
|
|
18
|
-
theme: THEOplayerTheme;
|
|
19
|
-
/**
|
|
20
|
-
* The style of the container.
|
|
21
|
-
*/
|
|
22
|
-
style?: StyleProp<ViewStyle>;
|
|
23
|
-
/**
|
|
24
|
-
* The style of the top slot.
|
|
25
|
-
*/
|
|
26
|
-
topStyle?: StyleProp<ViewStyle>;
|
|
27
|
-
/**
|
|
28
|
-
* The style of the center slot.
|
|
29
|
-
*/
|
|
30
|
-
centerStyle?: StyleProp<ViewStyle>;
|
|
31
|
-
/**
|
|
32
|
-
* The style of the button slot.
|
|
33
|
-
*/
|
|
34
|
-
bottomStyle?: StyleProp<ViewStyle>;
|
|
35
|
-
/**
|
|
36
|
-
* The components to be put in the top slot.
|
|
37
|
-
*/
|
|
38
|
-
top?: ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* The components to be put in the center slot.
|
|
41
|
-
*/
|
|
42
|
-
center?: ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* The components to be put in the bottom slot.
|
|
45
|
-
*/
|
|
46
|
-
bottom?: ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* A slot to put components behind the UI background.
|
|
49
|
-
*/
|
|
50
|
-
behind?: ReactNode;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The default style for a fullscreen centered view.
|
|
55
|
-
*/
|
|
56
|
-
export const FULLSCREEN_CENTER_STYLE: ViewStyle = {
|
|
57
|
-
position: 'absolute',
|
|
58
|
-
top: 0,
|
|
59
|
-
left: 0,
|
|
60
|
-
bottom: 0,
|
|
61
|
-
right: 0,
|
|
62
|
-
alignItems: 'center',
|
|
63
|
-
justifyContent: 'center',
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The default style for the center container.
|
|
68
|
-
*/
|
|
69
|
-
export const UI_CONTAINER_STYLE: ViewStyle = {
|
|
70
|
-
position: 'absolute',
|
|
71
|
-
top: 0,
|
|
72
|
-
left: 0,
|
|
73
|
-
bottom: 0,
|
|
74
|
-
right: 0,
|
|
75
|
-
zIndex: 0,
|
|
76
|
-
justifyContent: 'center',
|
|
77
|
-
overflow: 'hidden',
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The default style for the top container.
|
|
82
|
-
*/
|
|
83
|
-
export const TOP_UI_CONTAINER_STYLE: ViewStyle = {
|
|
84
|
-
position: 'absolute',
|
|
85
|
-
top: 0,
|
|
86
|
-
left: 0,
|
|
87
|
-
right: 0,
|
|
88
|
-
zIndex: 1,
|
|
89
|
-
paddingTop: 10,
|
|
90
|
-
paddingLeft: 10,
|
|
91
|
-
paddingRight: 10,
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* The default style for the center container.
|
|
96
|
-
*/
|
|
97
|
-
export const CENTER_UI_CONTAINER_STYLE: ViewStyle = {
|
|
98
|
-
alignSelf: 'center',
|
|
99
|
-
width: '60%',
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The default style for the bottom container.
|
|
104
|
-
*/
|
|
105
|
-
export const BOTTOM_UI_CONTAINER_STYLE: ViewStyle = {
|
|
106
|
-
position: 'absolute',
|
|
107
|
-
left: 0,
|
|
108
|
-
right: 0,
|
|
109
|
-
bottom: 0,
|
|
110
|
-
zIndex: 1,
|
|
111
|
-
paddingBottom: 10,
|
|
112
|
-
paddingLeft: 10,
|
|
113
|
-
paddingRight: 10,
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
interface UiContainerState {
|
|
117
|
-
fadeAnimation: Animated.Value;
|
|
118
|
-
currentMenu: ReactNode | undefined;
|
|
119
|
-
showing: boolean;
|
|
120
|
-
buttonsEnabled: boolean;
|
|
121
|
-
error: PlayerError | undefined;
|
|
122
|
-
firstPlay: boolean;
|
|
123
|
-
paused: boolean;
|
|
124
|
-
casting: boolean;
|
|
125
|
-
pip: boolean;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* A component that does all the coordination between UI components.
|
|
130
|
-
* - It provides all UI components with the PlayerContext, so they can access the styling and player.
|
|
131
|
-
* - It provides slots for UI components to be places in the top/center/bottom positions.
|
|
132
|
-
* - It uses animations to fade the UI in and out when applicable.
|
|
133
|
-
*/
|
|
134
|
-
export class UiContainer extends PureComponent<React.PropsWithChildren<UiContainerProps>, UiContainerState> implements UiControls {
|
|
135
|
-
private _currentFadeOutTimeout: number | undefined = undefined;
|
|
136
|
-
|
|
137
|
-
private _menus: MenuConstructor[] = [];
|
|
138
|
-
|
|
139
|
-
static initialState: UiContainerState = {
|
|
140
|
-
fadeAnimation: new Animated.Value(1),
|
|
141
|
-
currentMenu: undefined,
|
|
142
|
-
showing: true,
|
|
143
|
-
buttonsEnabled: true,
|
|
144
|
-
error: undefined,
|
|
145
|
-
firstPlay: false,
|
|
146
|
-
paused: true,
|
|
147
|
-
casting: false,
|
|
148
|
-
pip: false,
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
constructor(props: UiContainerProps) {
|
|
152
|
-
super(props);
|
|
153
|
-
this.state = UiContainer.initialState;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
componentDidMount() {
|
|
157
|
-
const player = this.props.player;
|
|
158
|
-
player.addEventListener(PlayerEventType.LOAD_START, this.onLoadStart);
|
|
159
|
-
player.addEventListener(PlayerEventType.ERROR, this.onError);
|
|
160
|
-
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
161
|
-
player.addEventListener(PlayerEventType.PLAY, this.onPlay);
|
|
162
|
-
player.addEventListener(PlayerEventType.PLAYING, this.onPlay);
|
|
163
|
-
player.addEventListener(PlayerEventType.PAUSE, this.onPause);
|
|
164
|
-
player.addEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);
|
|
165
|
-
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
166
|
-
player.addEventListener(PlayerEventType.ENDED, this.onEnded);
|
|
167
|
-
player.addEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);
|
|
168
|
-
if (player.source !== undefined && player.currentTime !== 0) {
|
|
169
|
-
this.onPlay();
|
|
170
|
-
}
|
|
171
|
-
this.setState({ pip: player.presentationMode === 'picture-in-picture' });
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
componentWillUnmount() {
|
|
175
|
-
const player = this.props.player;
|
|
176
|
-
player.removeEventListener(PlayerEventType.LOAD_START, this.onLoadStart);
|
|
177
|
-
player.removeEventListener(PlayerEventType.ERROR, this.onError);
|
|
178
|
-
player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
179
|
-
player.removeEventListener(PlayerEventType.PLAY, this.onPlay);
|
|
180
|
-
player.removeEventListener(PlayerEventType.PLAYING, this.onPlay);
|
|
181
|
-
player.removeEventListener(PlayerEventType.PAUSE, this.onPause);
|
|
182
|
-
player.removeEventListener(PlayerEventType.SOURCE_CHANGE, this.onSourceChange);
|
|
183
|
-
player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
184
|
-
player.removeEventListener(PlayerEventType.ENDED, this.onEnded);
|
|
185
|
-
player.removeEventListener(PlayerEventType.PRESENTATIONMODE_CHANGE, this.onPresentationModeChange);
|
|
186
|
-
clearTimeout(this._currentFadeOutTimeout);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
private onPlay = () => {
|
|
190
|
-
this.setState({ firstPlay: true, paused: false });
|
|
191
|
-
this.resumeAnimationsIfPossible_();
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
private onPause = () => {
|
|
195
|
-
this.setState({ firstPlay: true, paused: true });
|
|
196
|
-
this.stopAnimationsAndShowUi_();
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
private onSourceChange = () => {
|
|
200
|
-
this.setState({ paused: this.props.player.paused });
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
private onLoadStart = () => {
|
|
204
|
-
this.setState({ error: undefined });
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
private onError = (event: ErrorEvent) => {
|
|
208
|
-
const { error } = event;
|
|
209
|
-
this.setState({ error });
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
private onCastEvent = (event: CastEvent) => {
|
|
213
|
-
if (event.subType === CastEventType.CHROMECAST_STATE_CHANGE || event.subType === CastEventType.AIRPLAY_STATE_CHANGE) {
|
|
214
|
-
this.setState({ casting: event.state === 'connecting' || event.state === 'connected' });
|
|
215
|
-
this.resumeAnimationsIfPossible_();
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
private onEnded = () => {
|
|
220
|
-
this.stopAnimationsAndShowUi_();
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
private onPresentationModeChange = (event: PresentationModeChangeEvent) => {
|
|
224
|
-
this.setState({ pip: event.presentationMode === PresentationMode.pip });
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
get buttonsEnabled_(): boolean {
|
|
228
|
-
return this.state.buttonsEnabled;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Request to show the UI due to user input.
|
|
233
|
-
*/
|
|
234
|
-
public onUserAction_ = () => {
|
|
235
|
-
if (!this.state.firstPlay) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
this.stopAnimationsAndShowUi_();
|
|
239
|
-
this.resumeAnimationsIfPossible_();
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
public openMenu_ = (menuConstructor: () => ReactNode) => {
|
|
243
|
-
this._menus.push(menuConstructor);
|
|
244
|
-
this.setState({ currentMenu: menuConstructor() });
|
|
245
|
-
this.stopAnimationsAndShowUi_();
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
public closeCurrentMenu_ = () => {
|
|
249
|
-
this._menus.pop();
|
|
250
|
-
const nextMenu = this._menus.length > 0 ? this._menus[this._menus.length - 1] : undefined;
|
|
251
|
-
this.setState({ currentMenu: nextMenu?.() });
|
|
252
|
-
this.resumeAnimationsIfPossible_();
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
private stopAnimationsAndShowUi_() {
|
|
256
|
-
clearTimeout(this._currentFadeOutTimeout);
|
|
257
|
-
this._currentFadeOutTimeout = undefined;
|
|
258
|
-
if (!this.state.showing) {
|
|
259
|
-
this.doFadeIn_();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
private resumeAnimationsIfPossible_() {
|
|
264
|
-
clearTimeout(this._currentFadeOutTimeout);
|
|
265
|
-
if (this.animationsBlocked_) {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
// Only resume animation when paused except for web.
|
|
269
|
-
// This is because mobile users can tap away the UI when paused, but desktop users can't.
|
|
270
|
-
if (Platform.OS === 'web' || !this.state.paused) {
|
|
271
|
-
// @ts-ignore
|
|
272
|
-
this._currentFadeOutTimeout = setTimeout(this.doFadeOut_, this.props.theme.fadeAnimationTimoutMs);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
private doFadeIn_ = () => {
|
|
277
|
-
const { fadeAnimation } = this.state;
|
|
278
|
-
this.setState({ showing: true });
|
|
279
|
-
Animated.timing(fadeAnimation, {
|
|
280
|
-
useNativeDriver: true,
|
|
281
|
-
toValue: 1,
|
|
282
|
-
duration: 200,
|
|
283
|
-
}).start(() => {
|
|
284
|
-
this.setState({ buttonsEnabled: true });
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
private doFadeOut_ = () => {
|
|
289
|
-
if (this.animationsBlocked_) {
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
clearTimeout(this._currentFadeOutTimeout);
|
|
293
|
-
const { fadeAnimation } = this.state;
|
|
294
|
-
this.setState({ buttonsEnabled: false });
|
|
295
|
-
Animated.timing(fadeAnimation, {
|
|
296
|
-
useNativeDriver: true,
|
|
297
|
-
toValue: 0,
|
|
298
|
-
duration: 200,
|
|
299
|
-
}).start(() => {
|
|
300
|
-
this.setState({ showing: false });
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
private get animationsBlocked_(): boolean {
|
|
305
|
-
const { firstPlay, currentMenu, casting, pip } = this.state;
|
|
306
|
-
return !firstPlay || currentMenu !== undefined || casting || pip;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
render() {
|
|
310
|
-
const { player, theme, top, center, bottom, children, style, topStyle, centerStyle, bottomStyle, behind } = this.props;
|
|
311
|
-
const { fadeAnimation, currentMenu, error, firstPlay, pip } = this.state;
|
|
312
|
-
|
|
313
|
-
if (error !== undefined) {
|
|
314
|
-
return <ErrorDisplay error={error} />;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
if (Platform.OS !== 'web' && pip) {
|
|
318
|
-
return <></>;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
const combinedContainerStyle = [UI_CONTAINER_STYLE, style];
|
|
322
|
-
|
|
323
|
-
return (
|
|
324
|
-
<PlayerContext.Provider value={{ player, style: theme, ui: this }}>
|
|
325
|
-
{/* The View behind the UI, that is always visible.*/}
|
|
326
|
-
<View style={FULLSCREEN_CENTER_STYLE}>{behind}</View>
|
|
327
|
-
{/* The Animated.View is for showing and hiding the UI*/}
|
|
328
|
-
<Animated.View
|
|
329
|
-
style={[combinedContainerStyle, { opacity: fadeAnimation }]}
|
|
330
|
-
onTouchStart={this.onUserAction_}
|
|
331
|
-
{...(Platform.OS === 'web' ? { onMouseMove: this.onUserAction_, onMouseLeave: this.doFadeOut_ } : {})}>
|
|
332
|
-
<>
|
|
333
|
-
{/* The UI background */}
|
|
334
|
-
<View style={[combinedContainerStyle, { backgroundColor: theme.colors.uiBackground }]} onTouchStart={this.doFadeOut_} />
|
|
335
|
-
|
|
336
|
-
{/* The Settings Menu */}
|
|
337
|
-
{currentMenu !== undefined && <View style={[combinedContainerStyle]}>{currentMenu}</View>}
|
|
338
|
-
|
|
339
|
-
{/* The UI control bars*/}
|
|
340
|
-
{currentMenu === undefined && (
|
|
341
|
-
<>
|
|
342
|
-
{firstPlay && <View style={[TOP_UI_CONTAINER_STYLE, topStyle]}>{top}</View>}
|
|
343
|
-
<View style={[CENTER_UI_CONTAINER_STYLE, centerStyle]}>{center}</View>
|
|
344
|
-
{firstPlay && <View style={[BOTTOM_UI_CONTAINER_STYLE, bottomStyle]}>{bottom}</View>}
|
|
345
|
-
{children}
|
|
346
|
-
</>
|
|
347
|
-
)}
|
|
348
|
-
</>
|
|
349
|
-
</Animated.View>
|
|
350
|
-
</PlayerContext.Provider>
|
|
351
|
-
);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
UiContainer.contextType = PlayerContext;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A callback function to render a menu when needed.
|
|
5
|
-
*/
|
|
6
|
-
export type MenuConstructor = () => ReactNode;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The API provided to all UI components in `react-native-theoplayer` so they can communicate with the UI.
|
|
10
|
-
*/
|
|
11
|
-
export interface UiControls {
|
|
12
|
-
/*
|
|
13
|
-
* Whether the UI buttons are enabled.
|
|
14
|
-
*/
|
|
15
|
-
readonly buttonsEnabled_: boolean;
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
* Used to notify the UI that a user pressed did an action, so the UI can be faded in.
|
|
19
|
-
*/
|
|
20
|
-
onUserAction_: () => void;
|
|
21
|
-
|
|
22
|
-
/*
|
|
23
|
-
* Opens a new menu on top of the player.
|
|
24
|
-
*/
|
|
25
|
-
openMenu_: (menuConstructor: MenuConstructor) => void;
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
* Closes the current menu. If this was a sub-menu, the parent menu will re-open.
|
|
29
|
-
*/
|
|
30
|
-
closeCurrentMenu_: () => void;
|
|
31
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { THEOplayer } from 'react-native-theoplayer';
|
|
3
|
-
import type { THEOplayerTheme } from '../../THEOplayerTheme';
|
|
4
|
-
import { DEFAULT_THEOPLAYER_THEME } from '../../THEOplayerTheme';
|
|
5
|
-
import type { UiControls } from '../uicontroller/UiControls';
|
|
6
|
-
|
|
7
|
-
export interface UiContext {
|
|
8
|
-
/**
|
|
9
|
-
* The THEOplayer from the THEOplayerView.
|
|
10
|
-
*/
|
|
11
|
-
readonly player: THEOplayer;
|
|
12
|
-
/**
|
|
13
|
-
* The configured THEOplayerTheme.
|
|
14
|
-
*/
|
|
15
|
-
readonly style: THEOplayerTheme;
|
|
16
|
-
/**
|
|
17
|
-
* UI controls for the components to communicate with the UI.
|
|
18
|
-
*/
|
|
19
|
-
readonly ui: UiControls;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The context for all UI components of `react-native-theoplayer`.
|
|
24
|
-
*/
|
|
25
|
-
export const PlayerContext = React.createContext<UiContext>({
|
|
26
|
-
player: undefined as unknown as THEOplayer,
|
|
27
|
-
style: DEFAULT_THEOPLAYER_THEME,
|
|
28
|
-
ui: undefined as unknown as UiControls,
|
|
29
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { MediaTrack, TextTrack } from 'react-native-theoplayer';
|
|
2
|
-
import { TrackListEventType, VideoQuality } from 'react-native-theoplayer';
|
|
3
|
-
import { getISO639LanguageByCode } from '../../utils/language/Language';
|
|
4
|
-
|
|
5
|
-
export function getTrackLabel(track: MediaTrack | TextTrack): string {
|
|
6
|
-
if (track.label) {
|
|
7
|
-
return track.label;
|
|
8
|
-
}
|
|
9
|
-
const languageCode: string = track.language;
|
|
10
|
-
if (languageCode) {
|
|
11
|
-
const iso639Language = getISO639LanguageByCode(languageCode);
|
|
12
|
-
if (iso639Language) {
|
|
13
|
-
return iso639Language.local;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return languageCode || '';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function stringFromTextTrackListEvent(type: TrackListEventType): string {
|
|
20
|
-
switch (type) {
|
|
21
|
-
case TrackListEventType.ADD_TRACK:
|
|
22
|
-
return 'AddTrack';
|
|
23
|
-
case TrackListEventType.REMOVE_TRACK:
|
|
24
|
-
return 'RemoveTrack';
|
|
25
|
-
case TrackListEventType.CHANGE_TRACK:
|
|
26
|
-
return 'ChangeTrack';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Retain renderable tracks.
|
|
32
|
-
* https://html.spec.whatwg.org/multipage/embedded-content.html#text-track-showing
|
|
33
|
-
*/
|
|
34
|
-
export function filterRenderableTracks(textTracks: TextTrack[]): TextTrack[] {
|
|
35
|
-
return textTracks.filter((textTrack) => textTrack.kind === 'subtitles' || textTrack.kind === 'captions');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function getVideoQualityLabel(quality: VideoQuality | undefined, withBandWidth = true): string {
|
|
39
|
-
if (!quality) {
|
|
40
|
-
return 'auto';
|
|
41
|
-
}
|
|
42
|
-
if (quality.label && quality.label !== '') {
|
|
43
|
-
return quality.label;
|
|
44
|
-
}
|
|
45
|
-
let label = '';
|
|
46
|
-
if (quality.height) {
|
|
47
|
-
label = quality.height + 'p';
|
|
48
|
-
}
|
|
49
|
-
if (!withBandWidth || !quality.bandwidth) {
|
|
50
|
-
return label;
|
|
51
|
-
}
|
|
52
|
-
let bandwidth;
|
|
53
|
-
if (quality.bandwidth > 1e7) {
|
|
54
|
-
bandwidth = (quality.bandwidth / 1e6).toFixed(0) + 'Mbps';
|
|
55
|
-
} else if (quality.bandwidth > 1e6) {
|
|
56
|
-
bandwidth = (quality.bandwidth / 1e6).toFixed(1) + 'Mbps';
|
|
57
|
-
} else {
|
|
58
|
-
bandwidth = (quality.bandwidth / 1e3).toFixed(0) + 'kbps';
|
|
59
|
-
}
|
|
60
|
-
const isHD = quality.height ? quality.height >= 720 : false;
|
|
61
|
-
return `${label} - ${bandwidth} ${isHD ? '(HD)' : ''}`;
|
|
62
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PlayerContext';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function arrayRemoveElement<T>(array: T[], element: T): boolean {
|
|
2
|
-
const index = array.indexOf(element);
|
|
3
|
-
if (index === -1) {
|
|
4
|
-
return false;
|
|
5
|
-
}
|
|
6
|
-
arrayRemoveAt(array, index);
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function arrayRemoveAt<T>(array: T[], index: number): void {
|
|
11
|
-
array.splice(index, 1);
|
|
12
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import languages from './languages.json';
|
|
2
|
-
|
|
3
|
-
export interface ISO639Language {
|
|
4
|
-
name: string;
|
|
5
|
-
local: string;
|
|
6
|
-
'1': string;
|
|
7
|
-
'2': string;
|
|
8
|
-
'2T': string;
|
|
9
|
-
'2B': string;
|
|
10
|
-
'3': string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* "und" is intended for cases where the language in the data
|
|
15
|
-
* has not been identified, such as when it is mislabeled
|
|
16
|
-
* or never had been labeled.
|
|
17
|
-
*
|
|
18
|
-
* https://en.wikipedia.org/wiki/ISO_639:und
|
|
19
|
-
*/
|
|
20
|
-
export const ISO639_UNDETERMINED = 'und';
|
|
21
|
-
|
|
22
|
-
export function getISO639LanguageByCode(code: string): ISO639Language | undefined {
|
|
23
|
-
if (code === ISO639_UNDETERMINED) {
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
const lcCode = code.toLowerCase();
|
|
27
|
-
for (const lang of iso639Data) {
|
|
28
|
-
if (lang['1'] === lcCode || lang['2'] === lcCode || lang['2T'] === lcCode || lang['2B'] === lcCode || lang['3'] === lcCode) {
|
|
29
|
-
return lang;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Original: nodejs-langs by Andrew Lawson
|
|
36
|
-
// License: MIT
|
|
37
|
-
// https://github.com/adlawson/nodejs-langs/blob/bdbf8cfbc26c78dfeeb7f8032889dd88e2219441/data.js
|
|
38
|
-
export const iso639Data: ISO639Language[] = languages;
|