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,43 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { SafeAreaView, ScrollView, View, ViewStyle } from 'react-native';
|
|
3
|
-
import { MenuTitle } from './MenuTitle';
|
|
4
|
-
|
|
5
|
-
interface ScrollableMenuProps {
|
|
6
|
-
/**
|
|
7
|
-
* The title of the scrollable menu.
|
|
8
|
-
*/
|
|
9
|
-
title: string;
|
|
10
|
-
/**
|
|
11
|
-
* The items to be put in the scrollable menu.
|
|
12
|
-
*/
|
|
13
|
-
items?: ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The default style for the scrollable menu.
|
|
18
|
-
*/
|
|
19
|
-
export const DEFAULT_SCROLLABLE_MENU_STYLE: ViewStyle = {
|
|
20
|
-
flex: 1,
|
|
21
|
-
left: 0,
|
|
22
|
-
right: 0,
|
|
23
|
-
top: 0,
|
|
24
|
-
bottom: 0,
|
|
25
|
-
paddingRight: 10,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* A menu component that provides a ScrollView for menu items for the `react-native-theoplayer` UI.
|
|
30
|
-
* @param props
|
|
31
|
-
* @constructor
|
|
32
|
-
*/
|
|
33
|
-
export const ScrollableMenu = (props: ScrollableMenuProps) => {
|
|
34
|
-
const { title, items } = props;
|
|
35
|
-
return (
|
|
36
|
-
<SafeAreaView style={DEFAULT_SCROLLABLE_MENU_STYLE}>
|
|
37
|
-
<MenuTitle label={title} />
|
|
38
|
-
<ScrollView>
|
|
39
|
-
<View style={{ flexDirection: 'column' }}>{items}</View>
|
|
40
|
-
</ScrollView>
|
|
41
|
-
</SafeAreaView>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { PlayerContext, UiContext } from '../../util/PlayerContext';
|
|
2
|
-
import { StyleProp, Text, TextStyle, TouchableOpacity, View, ViewStyle } from 'react-native';
|
|
3
|
-
import React, { useContext } from 'react';
|
|
4
|
-
import { ArrowForwardSvg } from '../../button/svg/ArrowForwardSvg';
|
|
5
|
-
import type { MenuConstructor } from '../../uicontroller/UiControls';
|
|
6
|
-
import { DEFAULT_MENU_BUTTON_STYLE } from './MenuRadioButton';
|
|
7
|
-
import { ActionButton } from '../../button/actionbutton/ActionButton';
|
|
8
|
-
|
|
9
|
-
export interface SubMenuButtonProps {
|
|
10
|
-
/**
|
|
11
|
-
* The style overrides.
|
|
12
|
-
*/
|
|
13
|
-
style?: StyleProp<ViewStyle>;
|
|
14
|
-
/**
|
|
15
|
-
* The style overrides for the text components.
|
|
16
|
-
*/
|
|
17
|
-
textStyle?: StyleProp<TextStyle>;
|
|
18
|
-
/**
|
|
19
|
-
* The sub menu that will be opened.
|
|
20
|
-
*/
|
|
21
|
-
menuConstructor: MenuConstructor;
|
|
22
|
-
/**
|
|
23
|
-
* The label for the sub menu button.
|
|
24
|
-
*/
|
|
25
|
-
label: string;
|
|
26
|
-
/**
|
|
27
|
-
* A preview for the currently selected value before opening the sub menu.
|
|
28
|
-
*/
|
|
29
|
-
preview: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* A component that can be put inside a SettingsMenuButton to create a sub menu.
|
|
34
|
-
*/
|
|
35
|
-
export const SubMenuWithButton = (props: SubMenuButtonProps) => {
|
|
36
|
-
const { style, textStyle, menuConstructor, label, preview } = props;
|
|
37
|
-
const context = useContext(PlayerContext);
|
|
38
|
-
const onTouch = () => {
|
|
39
|
-
if (menuConstructor) {
|
|
40
|
-
context.ui.openMenu_(menuConstructor);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
return (
|
|
44
|
-
<PlayerContext.Consumer>
|
|
45
|
-
{(context: UiContext) => (
|
|
46
|
-
<View style={[{ height: 44, flexDirection: 'row', width: '100%', justifyContent: 'center' }, style]}>
|
|
47
|
-
<Text style={[DEFAULT_MENU_BUTTON_STYLE, { color: context.style.colors.text, width: '30%' }, textStyle]}>{label}</Text>
|
|
48
|
-
<View style={{ flexDirection: 'row', width: '40%', justifyContent: 'flex-end' }}>
|
|
49
|
-
<TouchableOpacity style={{ flexDirection: 'row' }} onPress={onTouch}>
|
|
50
|
-
<Text style={[DEFAULT_MENU_BUTTON_STYLE, { color: context.style.colors.text }, textStyle]}>{preview}</Text>
|
|
51
|
-
<ActionButton touchable={false} svg={<ArrowForwardSvg />} />
|
|
52
|
-
</TouchableOpacity>
|
|
53
|
-
</View>
|
|
54
|
-
</View>
|
|
55
|
-
)}
|
|
56
|
-
</PlayerContext.Consumer>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react';
|
|
2
|
-
import { CastEvent, CastEventType, CastState, PlayerEventType } from 'react-native-theoplayer';
|
|
3
|
-
import { Text } from 'react-native';
|
|
4
|
-
import { PlayerContext, UiContext } from '../util/PlayerContext';
|
|
5
|
-
|
|
6
|
-
interface CastMessageState {
|
|
7
|
-
message: string | undefined;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A simple cast message showing the current state of casting for the `react-native-theoplayer` UI.
|
|
12
|
-
*/
|
|
13
|
-
export class CastMessage extends PureComponent<unknown, CastMessageState> {
|
|
14
|
-
constructor(props: unknown) {
|
|
15
|
-
super(props);
|
|
16
|
-
this.state = { message: undefined };
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
componentDidMount() {
|
|
20
|
-
const player = (this.context as UiContext).player;
|
|
21
|
-
player.addEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
22
|
-
const chromecastState = player.cast.chromecast?.state;
|
|
23
|
-
const airplayState = player.cast.airplay?.state;
|
|
24
|
-
if (chromecastState === 'connecting' || chromecastState === 'connected') {
|
|
25
|
-
this._processCastState(chromecastState, 'Chromecast');
|
|
26
|
-
} else if (airplayState === 'connecting' || airplayState === 'connected') {
|
|
27
|
-
this._processCastState(airplayState, 'Airplay');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
componentWillUnmount() {
|
|
32
|
-
const context = this.context as UiContext;
|
|
33
|
-
context.player.removeEventListener(PlayerEventType.CAST_EVENT, this.onCastEvent);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private _processCastState = (state: CastState, target: 'Chromecast' | 'Airplay') => {
|
|
37
|
-
let message: string | undefined;
|
|
38
|
-
switch (state) {
|
|
39
|
-
case 'connecting':
|
|
40
|
-
message = `Connecting to ${target} ...`;
|
|
41
|
-
break;
|
|
42
|
-
case 'connected':
|
|
43
|
-
message = `Playing on ${target}`;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
this.setState({
|
|
47
|
-
message,
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
private onCastEvent = (event: CastEvent) => {
|
|
52
|
-
if (event.subType !== CastEventType.CHROMECAST_STATE_CHANGE && event.subType !== CastEventType.AIRPLAY_STATE_CHANGE) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const castTarget = event.subType === CastEventType.CHROMECAST_STATE_CHANGE ? 'Chromecast' : 'Airplay';
|
|
56
|
-
this._processCastState(event.state, castTarget);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
render() {
|
|
60
|
-
const { message } = this.state;
|
|
61
|
-
|
|
62
|
-
if (!message) {
|
|
63
|
-
return <></>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<PlayerContext.Consumer>
|
|
68
|
-
{(context: UiContext) => <Text style={[context.style.text, { color: context.style.colors.text }]}>{message}</Text>}
|
|
69
|
-
</PlayerContext.Consumer>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
CastMessage.contextType = PlayerContext;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import type { PlayerError } from 'react-native-theoplayer';
|
|
4
|
-
import { PlayerContext, UiContext } from '../util/PlayerContext';
|
|
5
|
-
import { SvgContext } from '../button/svg/SvgUtils';
|
|
6
|
-
import { ErrorSvg } from '../button/svg/ErrorSvg';
|
|
7
|
-
import { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer';
|
|
8
|
-
|
|
9
|
-
export interface ErrorDisplayProps {
|
|
10
|
-
/**
|
|
11
|
-
* The error that will be displayed.
|
|
12
|
-
*/
|
|
13
|
-
error: PlayerError;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A fullscreen error component for the `react-native-theoplayer` UI.
|
|
18
|
-
*/
|
|
19
|
-
export function ErrorDisplay(props: ErrorDisplayProps) {
|
|
20
|
-
const { error } = props;
|
|
21
|
-
return (
|
|
22
|
-
<PlayerContext.Consumer>
|
|
23
|
-
{(context: UiContext) => (
|
|
24
|
-
<View style={[FULLSCREEN_CENTER_STYLE, { backgroundColor: context.style.colors.errorBackground }]}>
|
|
25
|
-
<View style={{ flexDirection: 'row' }}>
|
|
26
|
-
<SvgContext.Provider
|
|
27
|
-
value={{
|
|
28
|
-
fill: context.style.colors.icon,
|
|
29
|
-
height: '100%',
|
|
30
|
-
width: '100%',
|
|
31
|
-
}}>
|
|
32
|
-
<View style={{ height: context.style.dimensions.controlBarHeight, aspectRatio: 1, padding: 5 }}>
|
|
33
|
-
<ErrorSvg />
|
|
34
|
-
</View>
|
|
35
|
-
</SvgContext.Provider>
|
|
36
|
-
<Text style={[context.style.text, { color: context.style.colors.text, alignSelf: 'center', paddingLeft: 5 }]}>Error:</Text>
|
|
37
|
-
</View>
|
|
38
|
-
<Text style={[context.style.text, { color: context.style.colors.text }]}>{error.errorMessage}</Text>
|
|
39
|
-
</View>
|
|
40
|
-
)}
|
|
41
|
-
</PlayerContext.Consumer>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react';
|
|
2
|
-
import { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
-
import { DurationChangeEvent, LoadedMetadataEvent, PlayerEventType, ProgressEvent, TimeRange, TimeUpdateEvent } from 'react-native-theoplayer';
|
|
4
|
-
import { PlayerContext, UiContext } from '../util/PlayerContext';
|
|
5
|
-
import Slider from '@react-native-community/slider';
|
|
6
|
-
import { SingleThumbnailView } from './thumbnail/SingleThumbnailView';
|
|
7
|
-
|
|
8
|
-
export interface SeekBarProps {
|
|
9
|
-
/**
|
|
10
|
-
* Optional style applied to the SeekBar.
|
|
11
|
-
*/
|
|
12
|
-
style?: StyleProp<ViewStyle>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface SeekBarState {
|
|
16
|
-
ignoreTimeupdate: boolean;
|
|
17
|
-
isSeeking: boolean;
|
|
18
|
-
pausedDueToScrubbing: boolean;
|
|
19
|
-
seekable: TimeRange[];
|
|
20
|
-
duration: number;
|
|
21
|
-
sliderTime: number;
|
|
22
|
-
width: number;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The default seek bar component for the `react-native-theoplayer` UI.
|
|
27
|
-
*/
|
|
28
|
-
export class SeekBar extends PureComponent<SeekBarProps, SeekBarState> {
|
|
29
|
-
private static initialState: SeekBarState = {
|
|
30
|
-
ignoreTimeupdate: false,
|
|
31
|
-
isSeeking: false,
|
|
32
|
-
sliderTime: 0,
|
|
33
|
-
duration: 0,
|
|
34
|
-
seekable: [],
|
|
35
|
-
pausedDueToScrubbing: false,
|
|
36
|
-
width: 0,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
private _seekBlockingTimeout: NodeJS.Timeout | undefined;
|
|
40
|
-
private _clearIsScrubbingTimout: NodeJS.Timeout | undefined;
|
|
41
|
-
|
|
42
|
-
constructor(props: SeekBarProps) {
|
|
43
|
-
super(props);
|
|
44
|
-
this.state = SeekBar.initialState;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
componentDidMount() {
|
|
48
|
-
const player = (this.context as UiContext).player;
|
|
49
|
-
player.addEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);
|
|
50
|
-
player.addEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);
|
|
51
|
-
player.addEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);
|
|
52
|
-
player.addEventListener(PlayerEventType.PROGRESS, this._onProgress);
|
|
53
|
-
this.setState({
|
|
54
|
-
...SeekBar.initialState,
|
|
55
|
-
sliderTime: player.currentTime,
|
|
56
|
-
duration: player.duration,
|
|
57
|
-
seekable: player.seekable,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
componentWillUnmount() {
|
|
62
|
-
const context = this.context as UiContext;
|
|
63
|
-
context.player.removeEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);
|
|
64
|
-
context.player.removeEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);
|
|
65
|
-
context.player.removeEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);
|
|
66
|
-
context.player.removeEventListener(PlayerEventType.PROGRESS, this._onProgress);
|
|
67
|
-
clearTimeout(this._seekBlockingTimeout);
|
|
68
|
-
clearTimeout(this._clearIsScrubbingTimout);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
private _onTimeUpdate = (event: TimeUpdateEvent) => {
|
|
72
|
-
if (!this.state.ignoreTimeupdate) {
|
|
73
|
-
this.setState({ sliderTime: event.currentTime });
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
private _onLoadedMetadata = (event: LoadedMetadataEvent) => this.setState({ duration: event.duration });
|
|
77
|
-
private _onDurationChange = (event: DurationChangeEvent) => this.setState({ duration: event.duration });
|
|
78
|
-
private _onProgress = (event: ProgressEvent) => this.setState({ seekable: event.seekable });
|
|
79
|
-
|
|
80
|
-
private _onSlidingStart = (value: number) => {
|
|
81
|
-
this.setState({ sliderTime: value });
|
|
82
|
-
this._prepareSeekStart();
|
|
83
|
-
const player = (this.context as UiContext).player;
|
|
84
|
-
if (!player.paused) {
|
|
85
|
-
this.debounceSeek(value);
|
|
86
|
-
player.pause();
|
|
87
|
-
this.setState({ pausedDueToScrubbing: true });
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
private _onValueChange = (value: number) => {
|
|
92
|
-
this.setState({ sliderTime: value });
|
|
93
|
-
if (this.state.ignoreTimeupdate) {
|
|
94
|
-
this.debounceSeek(value);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
private _onSlidingComplete = (value: number) => {
|
|
99
|
-
this.setState({ sliderTime: value });
|
|
100
|
-
this.debounceSeek(value, true);
|
|
101
|
-
const player = (this.context as UiContext).player;
|
|
102
|
-
const isEnded = player.currentTime === player.duration;
|
|
103
|
-
if (this.state.pausedDueToScrubbing && !isEnded) {
|
|
104
|
-
player.play();
|
|
105
|
-
this.setState({ pausedDueToScrubbing: false });
|
|
106
|
-
}
|
|
107
|
-
this._finishSeek();
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
private readonly _prepareSeekStart = () => {
|
|
111
|
-
this.setState({ isSeeking: true, ignoreTimeupdate: true });
|
|
112
|
-
clearTimeout(this._clearIsScrubbingTimout);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
private readonly _finishSeek = () => {
|
|
116
|
-
this.setState({ isSeeking: false });
|
|
117
|
-
// Wait for timeupdate events to settle after seeking, so the Slider does not jump back and forth.
|
|
118
|
-
this._clearIsScrubbingTimout = setTimeout(() => {
|
|
119
|
-
this.setState({ ignoreTimeupdate: false });
|
|
120
|
-
}, 1000);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
private debounceSeek = (value: number, force = false) => {
|
|
124
|
-
// Don't bombard the player with seeks when seeking. Allow only one seek ever X milliseconds:
|
|
125
|
-
const MAX_SEEK_INTERVAL = 200;
|
|
126
|
-
if (force || this._seekBlockingTimeout === undefined) {
|
|
127
|
-
if (force) {
|
|
128
|
-
clearTimeout(this._seekBlockingTimeout);
|
|
129
|
-
this._seekBlockingTimeout = undefined;
|
|
130
|
-
}
|
|
131
|
-
this._seekBlockingTimeout = setTimeout(() => {
|
|
132
|
-
this._seekBlockingTimeout = undefined;
|
|
133
|
-
}, MAX_SEEK_INTERVAL);
|
|
134
|
-
// Do seek
|
|
135
|
-
const player = (this.context as UiContext).player;
|
|
136
|
-
player.currentTime = value;
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
render() {
|
|
141
|
-
const { seekable, sliderTime, duration, isSeeking, width } = this.state;
|
|
142
|
-
const { style } = this.props;
|
|
143
|
-
const seekableStart = seekable.length > 0 ? seekable[0].start : 0;
|
|
144
|
-
const seekableEnd = seekable.length > 0 ? seekable[0].end : 0;
|
|
145
|
-
return (
|
|
146
|
-
<PlayerContext.Consumer>
|
|
147
|
-
{(context: UiContext) => (
|
|
148
|
-
<View
|
|
149
|
-
style={[StyleSheet.absoluteFill, style]}
|
|
150
|
-
onLayout={(event: LayoutChangeEvent) => {
|
|
151
|
-
this.setState({ width: event.nativeEvent.layout.width });
|
|
152
|
-
}}>
|
|
153
|
-
{isSeeking && (
|
|
154
|
-
<SingleThumbnailView seekableStart={seekableStart} seekableEnd={seekableEnd} currentTime={sliderTime} seekBarWidth={width} />
|
|
155
|
-
)}
|
|
156
|
-
<Slider
|
|
157
|
-
disabled={!(duration > 0) && seekable.length > 0}
|
|
158
|
-
style={[StyleSheet.absoluteFill, style]}
|
|
159
|
-
minimumValue={seekableStart}
|
|
160
|
-
maximumValue={seekableEnd}
|
|
161
|
-
step={1000}
|
|
162
|
-
onSlidingStart={this._onSlidingStart}
|
|
163
|
-
onValueChange={this._onValueChange}
|
|
164
|
-
onSlidingComplete={this._onSlidingComplete}
|
|
165
|
-
value={sliderTime}
|
|
166
|
-
focusable={true}
|
|
167
|
-
minimumTrackTintColor={context.style.colors.seekBarMinimum}
|
|
168
|
-
maximumTrackTintColor={context.style.colors.seekBarMaximum}
|
|
169
|
-
thumbTintColor={context.style.colors.seekBarDot}
|
|
170
|
-
/>
|
|
171
|
-
</View>
|
|
172
|
-
)}
|
|
173
|
-
</PlayerContext.Consumer>
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
SeekBar.contextType = PlayerContext;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Dimensions, View } from 'react-native';
|
|
2
|
-
import { filterThumbnailTracks } from 'react-native-theoplayer';
|
|
3
|
-
import { PlayerContext } from '../../util/PlayerContext';
|
|
4
|
-
import { ThumbnailView } from './ThumbnailView';
|
|
5
|
-
import React, { useContext } from 'react';
|
|
6
|
-
|
|
7
|
-
export interface ThumbnailViewProps {
|
|
8
|
-
seekableStart: number;
|
|
9
|
-
seekableEnd: number;
|
|
10
|
-
currentTime: number;
|
|
11
|
-
seekBarWidth: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function SingleThumbnailView(props: ThumbnailViewProps) {
|
|
15
|
-
const player = useContext(PlayerContext).player;
|
|
16
|
-
const thumbnailTrack = filterThumbnailTracks(player.textTracks);
|
|
17
|
-
if (!thumbnailTrack) {
|
|
18
|
-
return <></>;
|
|
19
|
-
}
|
|
20
|
-
const window = Dimensions.get('window');
|
|
21
|
-
const thumbnailSize = 0.35 * Math.min(window.height, window.width);
|
|
22
|
-
|
|
23
|
-
const { seekableStart, seekableEnd, currentTime, seekBarWidth } = props;
|
|
24
|
-
const percentageOffset = (currentTime - seekableStart) / (seekableEnd - seekableStart);
|
|
25
|
-
const marginHorizontal = 10;
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<View
|
|
29
|
-
style={{
|
|
30
|
-
position: 'absolute',
|
|
31
|
-
top: -(thumbnailSize * 0.6),
|
|
32
|
-
left: Math.max(0, Math.min(seekBarWidth - thumbnailSize - marginHorizontal, percentageOffset * seekBarWidth - 0.5 * thumbnailSize)),
|
|
33
|
-
marginHorizontal,
|
|
34
|
-
}}>
|
|
35
|
-
<ThumbnailView thumbnailTrack={thumbnailTrack} duration={player.duration} time={currentTime} size={thumbnailSize} showTimeLabel={false} />
|
|
36
|
-
</View>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
export function isTileMapThumbnail(thumbnail: Thumbnail): thumbnail is TileMapThumbnail {
|
|
2
|
-
return thumbnail.tileX !== undefined && thumbnail.tileY !== undefined && thumbnail.tileWidth !== undefined && thumbnail.tileHeight !== undefined;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export function isImageThumbnail(thumbnail: Thumbnail): thumbnail is ImageThumbnail {
|
|
6
|
-
return !isTileMapThumbnail(thumbnail);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Description of a thumbnail, which can be either a full image or part of a tile map.
|
|
11
|
-
*/
|
|
12
|
-
export interface Thumbnail {
|
|
13
|
-
/**
|
|
14
|
-
* The url of the thumbnail image.
|
|
15
|
-
*/
|
|
16
|
-
url: string;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Horizontal offset within the tile map in case the thumbnail is part of tile map.
|
|
20
|
-
*/
|
|
21
|
-
tileX?: number;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Vertical offset within the tile map in case the thumbnail is part of tile map.
|
|
25
|
-
*/
|
|
26
|
-
tileY?: number;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Width of a tile in case the thumbnail is part of tile map.
|
|
30
|
-
*/
|
|
31
|
-
tileWidth?: number;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Height of a tile in case the thumbnail is part of tile map.
|
|
35
|
-
*/
|
|
36
|
-
tileHeight?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Description of a tile-map thumbnail.
|
|
41
|
-
*/
|
|
42
|
-
export interface TileMapThumbnail extends Thumbnail {
|
|
43
|
-
/**
|
|
44
|
-
* The url of the thumbnail image.
|
|
45
|
-
*/
|
|
46
|
-
url: string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Horizontal offset within the tile map in case the thumbnail is part of tile map.
|
|
50
|
-
*/
|
|
51
|
-
tileX: number;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Vertical offset within the tile map in case the thumbnail is part of tile map.
|
|
55
|
-
*/
|
|
56
|
-
tileY: number;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Width of a tile in case the thumbnail is part of tile map.
|
|
60
|
-
*/
|
|
61
|
-
tileWidth: number;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Height of a tile in case the thumbnail is part of tile map.
|
|
65
|
-
*/
|
|
66
|
-
tileHeight: number;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Description of a tile-map thumbnail.
|
|
71
|
-
*/
|
|
72
|
-
export type ImageThumbnail = Thumbnail;
|