react-native-theoplayer 2.8.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 +49 -13
- package/README.md +16 -2
- package/android/src/main/java/com/theoplayer/media/MediaNotificationBuilder.kt +5 -0
- package/android/src/main/java/com/theoplayer/media/MediaPlaybackService.kt +31 -8
- package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegration.swift +19 -29
- package/lib/commonjs/api/cast/Chromecast.js.map +1 -1
- package/lib/commonjs/index.js +0 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/api/cast/Chromecast.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/api/cast/Chromecast.d.ts +1 -1
- package/lib/typescript/index.d.ts +0 -1
- package/package.json +2 -8
- package/react-native-theoplayer.podspec +1 -1
- package/src/api/cast/Chromecast.ts +1 -1
- package/src/index.tsx +0 -1
- 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 -10
- 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/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 -4
- 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/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 -8
- 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/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 -3
- 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
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _CastMessage = require("./CastMessage");
|
|
7
|
-
Object.keys(_CastMessage).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _CastMessage[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _CastMessage[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _ErrorDisplay = require("./ErrorDisplay");
|
|
18
|
-
Object.keys(_ErrorDisplay).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _ErrorDisplay[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _ErrorDisplay[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=barrel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_CastMessage","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_ErrorDisplay"],"sources":["barrel.ts"],"sourcesContent":["export * from './CastMessage';\nexport * from './ErrorDisplay';\n"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,aAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,aAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,aAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SeekBar = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeTheoplayer = require("react-native-theoplayer");
|
|
10
|
-
var _PlayerContext = require("../util/PlayerContext");
|
|
11
|
-
var _slider = _interopRequireDefault(require("@react-native-community/slider"));
|
|
12
|
-
var _SingleThumbnailView = require("./thumbnail/SingleThumbnailView");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
-
/**
|
|
20
|
-
* The default seek bar component for the `react-native-theoplayer` UI.
|
|
21
|
-
*/
|
|
22
|
-
class SeekBar extends _react.PureComponent {
|
|
23
|
-
constructor(props) {
|
|
24
|
-
var _this;
|
|
25
|
-
super(props);
|
|
26
|
-
_this = this;
|
|
27
|
-
_defineProperty(this, "_seekBlockingTimeout", void 0);
|
|
28
|
-
_defineProperty(this, "_clearIsScrubbingTimout", void 0);
|
|
29
|
-
_defineProperty(this, "_onTimeUpdate", event => {
|
|
30
|
-
if (!this.state.ignoreTimeupdate) {
|
|
31
|
-
this.setState({
|
|
32
|
-
sliderTime: event.currentTime
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
_defineProperty(this, "_onLoadedMetadata", event => this.setState({
|
|
37
|
-
duration: event.duration
|
|
38
|
-
}));
|
|
39
|
-
_defineProperty(this, "_onDurationChange", event => this.setState({
|
|
40
|
-
duration: event.duration
|
|
41
|
-
}));
|
|
42
|
-
_defineProperty(this, "_onProgress", event => this.setState({
|
|
43
|
-
seekable: event.seekable
|
|
44
|
-
}));
|
|
45
|
-
_defineProperty(this, "_onSlidingStart", value => {
|
|
46
|
-
this.setState({
|
|
47
|
-
sliderTime: value
|
|
48
|
-
});
|
|
49
|
-
this._prepareSeekStart();
|
|
50
|
-
const player = this.context.player;
|
|
51
|
-
if (!player.paused) {
|
|
52
|
-
this.debounceSeek(value);
|
|
53
|
-
player.pause();
|
|
54
|
-
this.setState({
|
|
55
|
-
pausedDueToScrubbing: true
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
_defineProperty(this, "_onValueChange", value => {
|
|
60
|
-
this.setState({
|
|
61
|
-
sliderTime: value
|
|
62
|
-
});
|
|
63
|
-
if (this.state.ignoreTimeupdate) {
|
|
64
|
-
this.debounceSeek(value);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
_defineProperty(this, "_onSlidingComplete", value => {
|
|
68
|
-
this.setState({
|
|
69
|
-
sliderTime: value
|
|
70
|
-
});
|
|
71
|
-
this.debounceSeek(value, true);
|
|
72
|
-
const player = this.context.player;
|
|
73
|
-
const isEnded = player.currentTime === player.duration;
|
|
74
|
-
if (this.state.pausedDueToScrubbing && !isEnded) {
|
|
75
|
-
player.play();
|
|
76
|
-
this.setState({
|
|
77
|
-
pausedDueToScrubbing: false
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
this._finishSeek();
|
|
81
|
-
});
|
|
82
|
-
_defineProperty(this, "_prepareSeekStart", () => {
|
|
83
|
-
this.setState({
|
|
84
|
-
isSeeking: true,
|
|
85
|
-
ignoreTimeupdate: true
|
|
86
|
-
});
|
|
87
|
-
clearTimeout(this._clearIsScrubbingTimout);
|
|
88
|
-
});
|
|
89
|
-
_defineProperty(this, "_finishSeek", () => {
|
|
90
|
-
this.setState({
|
|
91
|
-
isSeeking: false
|
|
92
|
-
});
|
|
93
|
-
// Wait for timeupdate events to settle after seeking, so the Slider does not jump back and forth.
|
|
94
|
-
this._clearIsScrubbingTimout = setTimeout(() => {
|
|
95
|
-
this.setState({
|
|
96
|
-
ignoreTimeupdate: false
|
|
97
|
-
});
|
|
98
|
-
}, 1000);
|
|
99
|
-
});
|
|
100
|
-
_defineProperty(this, "debounceSeek", function (value) {
|
|
101
|
-
let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
102
|
-
// Don't bombard the player with seeks when seeking. Allow only one seek ever X milliseconds:
|
|
103
|
-
const MAX_SEEK_INTERVAL = 200;
|
|
104
|
-
if (force || _this._seekBlockingTimeout === undefined) {
|
|
105
|
-
if (force) {
|
|
106
|
-
clearTimeout(_this._seekBlockingTimeout);
|
|
107
|
-
_this._seekBlockingTimeout = undefined;
|
|
108
|
-
}
|
|
109
|
-
_this._seekBlockingTimeout = setTimeout(() => {
|
|
110
|
-
_this._seekBlockingTimeout = undefined;
|
|
111
|
-
}, MAX_SEEK_INTERVAL);
|
|
112
|
-
// Do seek
|
|
113
|
-
const player = _this.context.player;
|
|
114
|
-
player.currentTime = value;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
this.state = SeekBar.initialState;
|
|
118
|
-
}
|
|
119
|
-
componentDidMount() {
|
|
120
|
-
const player = this.context.player;
|
|
121
|
-
player.addEventListener(_reactNativeTheoplayer.PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);
|
|
122
|
-
player.addEventListener(_reactNativeTheoplayer.PlayerEventType.DURATION_CHANGE, this._onDurationChange);
|
|
123
|
-
player.addEventListener(_reactNativeTheoplayer.PlayerEventType.TIME_UPDATE, this._onTimeUpdate);
|
|
124
|
-
player.addEventListener(_reactNativeTheoplayer.PlayerEventType.PROGRESS, this._onProgress);
|
|
125
|
-
this.setState({
|
|
126
|
-
...SeekBar.initialState,
|
|
127
|
-
sliderTime: player.currentTime,
|
|
128
|
-
duration: player.duration,
|
|
129
|
-
seekable: player.seekable
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
componentWillUnmount() {
|
|
133
|
-
const context = this.context;
|
|
134
|
-
context.player.removeEventListener(_reactNativeTheoplayer.PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);
|
|
135
|
-
context.player.removeEventListener(_reactNativeTheoplayer.PlayerEventType.DURATION_CHANGE, this._onDurationChange);
|
|
136
|
-
context.player.removeEventListener(_reactNativeTheoplayer.PlayerEventType.TIME_UPDATE, this._onTimeUpdate);
|
|
137
|
-
context.player.removeEventListener(_reactNativeTheoplayer.PlayerEventType.PROGRESS, this._onProgress);
|
|
138
|
-
clearTimeout(this._seekBlockingTimeout);
|
|
139
|
-
clearTimeout(this._clearIsScrubbingTimout);
|
|
140
|
-
}
|
|
141
|
-
render() {
|
|
142
|
-
const {
|
|
143
|
-
seekable,
|
|
144
|
-
sliderTime,
|
|
145
|
-
duration,
|
|
146
|
-
isSeeking,
|
|
147
|
-
width
|
|
148
|
-
} = this.state;
|
|
149
|
-
const {
|
|
150
|
-
style
|
|
151
|
-
} = this.props;
|
|
152
|
-
const seekableStart = seekable.length > 0 ? seekable[0].start : 0;
|
|
153
|
-
const seekableEnd = seekable.length > 0 ? seekable[0].end : 0;
|
|
154
|
-
return /*#__PURE__*/_react.default.createElement(_PlayerContext.PlayerContext.Consumer, null, context => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
155
|
-
style: [_reactNative.StyleSheet.absoluteFill, style],
|
|
156
|
-
onLayout: event => {
|
|
157
|
-
this.setState({
|
|
158
|
-
width: event.nativeEvent.layout.width
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}, isSeeking && /*#__PURE__*/_react.default.createElement(_SingleThumbnailView.SingleThumbnailView, {
|
|
162
|
-
seekableStart: seekableStart,
|
|
163
|
-
seekableEnd: seekableEnd,
|
|
164
|
-
currentTime: sliderTime,
|
|
165
|
-
seekBarWidth: width
|
|
166
|
-
}), /*#__PURE__*/_react.default.createElement(_slider.default, {
|
|
167
|
-
disabled: !(duration > 0) && seekable.length > 0,
|
|
168
|
-
style: [_reactNative.StyleSheet.absoluteFill, style],
|
|
169
|
-
minimumValue: seekableStart,
|
|
170
|
-
maximumValue: seekableEnd,
|
|
171
|
-
step: 1000,
|
|
172
|
-
onSlidingStart: this._onSlidingStart,
|
|
173
|
-
onValueChange: this._onValueChange,
|
|
174
|
-
onSlidingComplete: this._onSlidingComplete,
|
|
175
|
-
value: sliderTime,
|
|
176
|
-
focusable: true,
|
|
177
|
-
minimumTrackTintColor: context.style.colors.seekBarMinimum,
|
|
178
|
-
maximumTrackTintColor: context.style.colors.seekBarMaximum,
|
|
179
|
-
thumbTintColor: context.style.colors.seekBarDot
|
|
180
|
-
})));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
exports.SeekBar = SeekBar;
|
|
184
|
-
_defineProperty(SeekBar, "initialState", {
|
|
185
|
-
ignoreTimeupdate: false,
|
|
186
|
-
isSeeking: false,
|
|
187
|
-
sliderTime: 0,
|
|
188
|
-
duration: 0,
|
|
189
|
-
seekable: [],
|
|
190
|
-
pausedDueToScrubbing: false,
|
|
191
|
-
width: 0
|
|
192
|
-
});
|
|
193
|
-
SeekBar.contextType = _PlayerContext.PlayerContext;
|
|
194
|
-
//# sourceMappingURL=SeekBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeTheoplayer","_PlayerContext","_slider","_interopRequireDefault","_SingleThumbnailView","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_defineProperty","value","_toPropertyKey","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","SeekBar","PureComponent","constructor","props","_this","this","event","state","ignoreTimeupdate","setState","sliderTime","currentTime","duration","seekable","_prepareSeekStart","player","context","paused","debounceSeek","pause","pausedDueToScrubbing","isEnded","play","_finishSeek","isSeeking","clearTimeout","_clearIsScrubbingTimout","setTimeout","force","arguments","length","MAX_SEEK_INTERVAL","_seekBlockingTimeout","initialState","componentDidMount","addEventListener","PlayerEventType","LOADED_METADATA","_onLoadedMetadata","DURATION_CHANGE","_onDurationChange","TIME_UPDATE","_onTimeUpdate","PROGRESS","_onProgress","componentWillUnmount","removeEventListener","render","width","style","seekableStart","start","seekableEnd","end","createElement","PlayerContext","Consumer","View","StyleSheet","absoluteFill","onLayout","nativeEvent","layout","SingleThumbnailView","seekBarWidth","disabled","minimumValue","maximumValue","step","onSlidingStart","_onSlidingStart","onValueChange","_onValueChange","onSlidingComplete","_onSlidingComplete","focusable","minimumTrackTintColor","colors","seekBarMinimum","maximumTrackTintColor","seekBarMaximum","thumbTintColor","seekBarDot","exports","contextType"],"sources":["SeekBar.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\nimport { DurationChangeEvent, LoadedMetadataEvent, PlayerEventType, ProgressEvent, TimeRange, TimeUpdateEvent } from 'react-native-theoplayer';\nimport { PlayerContext, UiContext } from '../util/PlayerContext';\nimport Slider from '@react-native-community/slider';\nimport { SingleThumbnailView } from './thumbnail/SingleThumbnailView';\n\nexport interface SeekBarProps {\n /**\n * Optional style applied to the SeekBar.\n */\n style?: StyleProp<ViewStyle>;\n}\n\ninterface SeekBarState {\n ignoreTimeupdate: boolean;\n isSeeking: boolean;\n pausedDueToScrubbing: boolean;\n seekable: TimeRange[];\n duration: number;\n sliderTime: number;\n width: number;\n}\n\n/**\n * The default seek bar component for the `react-native-theoplayer` UI.\n */\nexport class SeekBar extends PureComponent<SeekBarProps, SeekBarState> {\n private static initialState: SeekBarState = {\n ignoreTimeupdate: false,\n isSeeking: false,\n sliderTime: 0,\n duration: 0,\n seekable: [],\n pausedDueToScrubbing: false,\n width: 0,\n };\n\n private _seekBlockingTimeout: NodeJS.Timeout | undefined;\n private _clearIsScrubbingTimout: NodeJS.Timeout | undefined;\n\n constructor(props: SeekBarProps) {\n super(props);\n this.state = SeekBar.initialState;\n }\n\n componentDidMount() {\n const player = (this.context as UiContext).player;\n player.addEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);\n player.addEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);\n player.addEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);\n player.addEventListener(PlayerEventType.PROGRESS, this._onProgress);\n this.setState({\n ...SeekBar.initialState,\n sliderTime: player.currentTime,\n duration: player.duration,\n seekable: player.seekable,\n });\n }\n\n componentWillUnmount() {\n const context = this.context as UiContext;\n context.player.removeEventListener(PlayerEventType.LOADED_METADATA, this._onLoadedMetadata);\n context.player.removeEventListener(PlayerEventType.DURATION_CHANGE, this._onDurationChange);\n context.player.removeEventListener(PlayerEventType.TIME_UPDATE, this._onTimeUpdate);\n context.player.removeEventListener(PlayerEventType.PROGRESS, this._onProgress);\n clearTimeout(this._seekBlockingTimeout);\n clearTimeout(this._clearIsScrubbingTimout);\n }\n\n private _onTimeUpdate = (event: TimeUpdateEvent) => {\n if (!this.state.ignoreTimeupdate) {\n this.setState({ sliderTime: event.currentTime });\n }\n };\n private _onLoadedMetadata = (event: LoadedMetadataEvent) => this.setState({ duration: event.duration });\n private _onDurationChange = (event: DurationChangeEvent) => this.setState({ duration: event.duration });\n private _onProgress = (event: ProgressEvent) => this.setState({ seekable: event.seekable });\n\n private _onSlidingStart = (value: number) => {\n this.setState({ sliderTime: value });\n this._prepareSeekStart();\n const player = (this.context as UiContext).player;\n if (!player.paused) {\n this.debounceSeek(value);\n player.pause();\n this.setState({ pausedDueToScrubbing: true });\n }\n };\n\n private _onValueChange = (value: number) => {\n this.setState({ sliderTime: value });\n if (this.state.ignoreTimeupdate) {\n this.debounceSeek(value);\n }\n };\n\n private _onSlidingComplete = (value: number) => {\n this.setState({ sliderTime: value });\n this.debounceSeek(value, true);\n const player = (this.context as UiContext).player;\n const isEnded = player.currentTime === player.duration;\n if (this.state.pausedDueToScrubbing && !isEnded) {\n player.play();\n this.setState({ pausedDueToScrubbing: false });\n }\n this._finishSeek();\n };\n\n private readonly _prepareSeekStart = () => {\n this.setState({ isSeeking: true, ignoreTimeupdate: true });\n clearTimeout(this._clearIsScrubbingTimout);\n };\n\n private readonly _finishSeek = () => {\n this.setState({ isSeeking: false });\n // Wait for timeupdate events to settle after seeking, so the Slider does not jump back and forth.\n this._clearIsScrubbingTimout = setTimeout(() => {\n this.setState({ ignoreTimeupdate: false });\n }, 1000);\n };\n\n private debounceSeek = (value: number, force = false) => {\n // Don't bombard the player with seeks when seeking. Allow only one seek ever X milliseconds:\n const MAX_SEEK_INTERVAL = 200;\n if (force || this._seekBlockingTimeout === undefined) {\n if (force) {\n clearTimeout(this._seekBlockingTimeout);\n this._seekBlockingTimeout = undefined;\n }\n this._seekBlockingTimeout = setTimeout(() => {\n this._seekBlockingTimeout = undefined;\n }, MAX_SEEK_INTERVAL);\n // Do seek\n const player = (this.context as UiContext).player;\n player.currentTime = value;\n }\n };\n\n render() {\n const { seekable, sliderTime, duration, isSeeking, width } = this.state;\n const { style } = this.props;\n const seekableStart = seekable.length > 0 ? seekable[0].start : 0;\n const seekableEnd = seekable.length > 0 ? seekable[0].end : 0;\n return (\n <PlayerContext.Consumer>\n {(context: UiContext) => (\n <View\n style={[StyleSheet.absoluteFill, style]}\n onLayout={(event: LayoutChangeEvent) => {\n this.setState({ width: event.nativeEvent.layout.width });\n }}>\n {isSeeking && (\n <SingleThumbnailView seekableStart={seekableStart} seekableEnd={seekableEnd} currentTime={sliderTime} seekBarWidth={width} />\n )}\n <Slider\n disabled={!(duration > 0) && seekable.length > 0}\n style={[StyleSheet.absoluteFill, style]}\n minimumValue={seekableStart}\n maximumValue={seekableEnd}\n step={1000}\n onSlidingStart={this._onSlidingStart}\n onValueChange={this._onValueChange}\n onSlidingComplete={this._onSlidingComplete}\n value={sliderTime}\n focusable={true}\n minimumTrackTintColor={context.style.colors.seekBarMinimum}\n maximumTrackTintColor={context.style.colors.seekBarMaximum}\n thumbTintColor={context.style.colors.seekBarDot}\n />\n </View>\n )}\n </PlayerContext.Consumer>\n );\n }\n}\n\nSeekBar.contextType = PlayerContext;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAAsE,SAAAK,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAZ,wBAAAQ,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,S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E,KAAK;EAC3B4B,KAAK,EAAE;AACT,CAAC;AA6IHhD,OAAO,CAACoF,WAAW,GAAG7B,4BAAa"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _SeekBar = require("./SeekBar");
|
|
7
|
-
Object.keys(_SeekBar).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _SeekBar[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _SeekBar[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _barrel = require("./thumbnail/barrel");
|
|
18
|
-
Object.keys(_barrel).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _barrel[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _barrel[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=barrel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_SeekBar","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_barrel"],"sources":["barrel.ts"],"sourcesContent":["export * from './SeekBar';\nexport * from './thumbnail/barrel';\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,OAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,OAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,OAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SingleThumbnailView = SingleThumbnailView;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _reactNativeTheoplayer = require("react-native-theoplayer");
|
|
9
|
-
var _PlayerContext = require("../../util/PlayerContext");
|
|
10
|
-
var _ThumbnailView = require("./ThumbnailView");
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
function SingleThumbnailView(props) {
|
|
15
|
-
const player = (0, _react.useContext)(_PlayerContext.PlayerContext).player;
|
|
16
|
-
const thumbnailTrack = (0, _reactNativeTheoplayer.filterThumbnailTracks)(player.textTracks);
|
|
17
|
-
if (!thumbnailTrack) {
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
19
|
-
}
|
|
20
|
-
const window = _reactNative.Dimensions.get('window');
|
|
21
|
-
const thumbnailSize = 0.35 * Math.min(window.height, window.width);
|
|
22
|
-
const {
|
|
23
|
-
seekableStart,
|
|
24
|
-
seekableEnd,
|
|
25
|
-
currentTime,
|
|
26
|
-
seekBarWidth
|
|
27
|
-
} = props;
|
|
28
|
-
const percentageOffset = (currentTime - seekableStart) / (seekableEnd - seekableStart);
|
|
29
|
-
const marginHorizontal = 10;
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
31
|
-
style: {
|
|
32
|
-
position: 'absolute',
|
|
33
|
-
top: -(thumbnailSize * 0.6),
|
|
34
|
-
left: Math.max(0, Math.min(seekBarWidth - thumbnailSize - marginHorizontal, percentageOffset * seekBarWidth - 0.5 * thumbnailSize)),
|
|
35
|
-
marginHorizontal
|
|
36
|
-
}
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement(_ThumbnailView.ThumbnailView, {
|
|
38
|
-
thumbnailTrack: thumbnailTrack,
|
|
39
|
-
duration: player.duration,
|
|
40
|
-
time: currentTime,
|
|
41
|
-
size: thumbnailSize,
|
|
42
|
-
showTimeLabel: false
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=SingleThumbnailView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeTheoplayer","_PlayerContext","_ThumbnailView","_react","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SingleThumbnailView","props","player","useContext","PlayerContext","thumbnailTrack","filterThumbnailTracks","textTracks","createElement","Fragment","window","Dimensions","thumbnailSize","Math","min","height","width","seekableStart","seekableEnd","currentTime","seekBarWidth","percentageOffset","marginHorizontal","View","style","position","top","left","max","ThumbnailView","duration","time","size","showTimeLabel"],"sources":["SingleThumbnailView.tsx"],"sourcesContent":["import { Dimensions, View } from 'react-native';\nimport { filterThumbnailTracks } from 'react-native-theoplayer';\nimport { PlayerContext } from '../../util/PlayerContext';\nimport { ThumbnailView } from './ThumbnailView';\nimport React, { useContext } from 'react';\n\nexport interface ThumbnailViewProps {\n seekableStart: number;\n seekableEnd: number;\n currentTime: number;\n seekBarWidth: number;\n}\n\nexport function SingleThumbnailView(props: ThumbnailViewProps) {\n const player = useContext(PlayerContext).player;\n const thumbnailTrack = filterThumbnailTracks(player.textTracks);\n if (!thumbnailTrack) {\n return <></>;\n }\n const window = Dimensions.get('window');\n const thumbnailSize = 0.35 * Math.min(window.height, window.width);\n\n const { seekableStart, seekableEnd, currentTime, seekBarWidth } = props;\n const percentageOffset = (currentTime - seekableStart) / (seekableEnd - seekableStart);\n const marginHorizontal = 10;\n\n return (\n <View\n style={{\n position: 'absolute',\n top: -(thumbnailSize * 0.6),\n left: Math.max(0, Math.min(seekBarWidth - thumbnailSize - marginHorizontal, percentageOffset * seekBarWidth - 0.5 * thumbnailSize)),\n marginHorizontal,\n }}>\n <ThumbnailView thumbnailTrack={thumbnailTrack} duration={player.duration} time={current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D,aAAa;IAACxB,cAAc,EAAEA,cAAe;IAACyB,QAAQ,EAAE5B,MAAM,CAAC4B,QAAS;IAACC,IAAI,EAAEZ,WAAY;IAACa,IAAI,EAAEpB,aAAc;IAACqB,aAAa,EAAE;EAAM,EAAG,CACrI;AAEX"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isImageThumbnail = isImageThumbnail;
|
|
7
|
-
exports.isTileMapThumbnail = isTileMapThumbnail;
|
|
8
|
-
function isTileMapThumbnail(thumbnail) {
|
|
9
|
-
return thumbnail.tileX !== undefined && thumbnail.tileY !== undefined && thumbnail.tileWidth !== undefined && thumbnail.tileHeight !== undefined;
|
|
10
|
-
}
|
|
11
|
-
function isImageThumbnail(thumbnail) {
|
|
12
|
-
return !isTileMapThumbnail(thumbnail);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Description of a thumbnail, which can be either a full image or part of a tile map.
|
|
17
|
-
*/
|
|
18
|
-
//# sourceMappingURL=Thumbnail.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isTileMapThumbnail","thumbnail","tileX","undefined","tileY","tileWidth","tileHeight","isImageThumbnail"],"sources":["Thumbnail.ts"],"sourcesContent":["export function isTileMapThumbnail(thumbnail: Thumbnail): thumbnail is TileMapThumbnail {\n return thumbnail.tileX !== undefined && thumbnail.tileY !== undefined && thumbnail.tileWidth !== undefined && thumbnail.tileHeight !== undefined;\n}\n\nexport function isImageThumbnail(thumbnail: Thumbnail): thumbnail is ImageThumbnail {\n return !isTileMapThumbnail(thumbnail);\n}\n\n/**\n * Description of a thumbnail, which can be either a full image or part of a tile map.\n */\nexport interface Thumbnail {\n /**\n * The url of the thumbnail image.\n */\n url: string;\n\n /**\n * Horizontal offset within the tile map in case the thumbnail is part of tile map.\n */\n tileX?: number;\n\n /**\n * Vertical offset within the tile map in case the thumbnail is part of tile map.\n */\n tileY?: number;\n\n /**\n * Width of a tile in case the thumbnail is part of tile map.\n */\n tileWidth?: number;\n\n /**\n * Height of a tile in case the thumbnail is part of tile map.\n */\n tileHeight?: number;\n}\n\n/**\n * Description of a tile-map thumbnail.\n */\nexport interface TileMapThumbnail extends Thumbnail {\n /**\n * The url of the thumbnail image.\n */\n url: string;\n\n /**\n * Horizontal offset within the tile map in case the thumbnail is part of tile map.\n */\n tileX: number;\n\n /**\n * Vertical offset within the tile map in case the thumbnail is part of tile map.\n */\n tileY: number;\n\n /**\n * Width of a tile in case the thumbnail is part of tile map.\n */\n tileWidth: number;\n\n /**\n * Height of a tile in case the thumbnail is part of tile map.\n */\n tileHeight: number;\n}\n\n/**\n * Description of a tile-map thumbnail.\n */\nexport type ImageThumbnail = Thumbnail;\n"],"mappings":";;;;;;;AAAO,SAASA,kBAAkBA,CAACC,SAAoB,EAAiC;EACtF,OAAOA,SAAS,CAACC,KAAK,KAAKC,SAAS,IAAIF,SAAS,CAACG,KAAK,KAAKD,SAAS,IAAIF,SAAS,CAACI,SAAS,KAAKF,SAAS,IAAIF,SAAS,CAACK,UAAU,KAAKH,SAAS;AAClJ;AAEO,SAASI,gBAAgBA,CAACN,SAAoB,EAA+B;EAClF,OAAO,CAACD,kBAAkB,CAACC,SAAS,CAAC;AACvC;;AAEA;AACA;AACA"}
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ThumbnailView = exports.DEFAULT_THUMBNAIL_VIEW_STYLE = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeTheoplayer = require("react-native-theoplayer");
|
|
10
|
-
var _Thumbnail = require("./Thumbnail");
|
|
11
|
-
var _Urlpolyfill = require("./Urlpolyfill");
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
const SPRITE_REGEX = /^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;
|
|
18
|
-
const TAG = 'ThumbnailView';
|
|
19
|
-
const DEFAULT_THUMBNAIL_VIEW_STYLE = {
|
|
20
|
-
containerThumbnail: {
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
flexDirection: 'row'
|
|
23
|
-
},
|
|
24
|
-
thumbnail: {
|
|
25
|
-
overflow: 'hidden',
|
|
26
|
-
backgroundColor: 'transparent'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
exports.DEFAULT_THUMBNAIL_VIEW_STYLE = DEFAULT_THUMBNAIL_VIEW_STYLE;
|
|
30
|
-
class ThumbnailView extends _react.PureComponent {
|
|
31
|
-
constructor(props) {
|
|
32
|
-
super(props);
|
|
33
|
-
_defineProperty(this, "_ismounted", false);
|
|
34
|
-
_defineProperty(this, "onTileImageLoad", thumbnail => () => {
|
|
35
|
-
if (!this._ismounted) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const {
|
|
39
|
-
size
|
|
40
|
-
} = this.props;
|
|
41
|
-
const {
|
|
42
|
-
tileWidth,
|
|
43
|
-
tileHeight
|
|
44
|
-
} = thumbnail;
|
|
45
|
-
if (tileWidth && tileHeight) {
|
|
46
|
-
_reactNative.Image.getSize(thumbnail.url, (width, height) => {
|
|
47
|
-
this.setState({
|
|
48
|
-
imageWidth: width,
|
|
49
|
-
imageHeight: height,
|
|
50
|
-
renderWidth: size,
|
|
51
|
-
renderHeight: tileHeight * size / tileWidth
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
_defineProperty(this, "onImageLoadError", event => {
|
|
57
|
-
console.error(TAG, 'Failed to load thumbnail url:', event.nativeEvent.error);
|
|
58
|
-
});
|
|
59
|
-
_defineProperty(this, "onImageLoad", thumbnail => () => {
|
|
60
|
-
if (!this._ismounted) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const {
|
|
64
|
-
size
|
|
65
|
-
} = this.props;
|
|
66
|
-
_reactNative.Image.getSize(thumbnail.url, (width, height) => {
|
|
67
|
-
this.setState({
|
|
68
|
-
imageWidth: width,
|
|
69
|
-
imageHeight: height,
|
|
70
|
-
renderWidth: size,
|
|
71
|
-
renderHeight: height * size / width
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
_defineProperty(this, "renderThumbnail", (thumbnail, index) => {
|
|
76
|
-
const {
|
|
77
|
-
imageWidth,
|
|
78
|
-
imageHeight,
|
|
79
|
-
renderWidth,
|
|
80
|
-
renderHeight
|
|
81
|
-
} = this.state;
|
|
82
|
-
const {
|
|
83
|
-
size
|
|
84
|
-
} = this.props;
|
|
85
|
-
const scale = 1.0;
|
|
86
|
-
if ((0, _Thumbnail.isTileMapThumbnail)(thumbnail)) {
|
|
87
|
-
const ratio = thumbnail.tileWidth == 0 ? 0 : scale * size / thumbnail.tileWidth;
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
89
|
-
key: index,
|
|
90
|
-
style: [DEFAULT_THUMBNAIL_VIEW_STYLE.thumbnail, {
|
|
91
|
-
width: scale * renderWidth,
|
|
92
|
-
height: scale * renderHeight
|
|
93
|
-
}]
|
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
95
|
-
resizeMode: 'cover',
|
|
96
|
-
style: {
|
|
97
|
-
position: 'absolute',
|
|
98
|
-
top: -ratio * thumbnail.tileY,
|
|
99
|
-
left: -ratio * thumbnail.tileX,
|
|
100
|
-
width: ratio * imageWidth,
|
|
101
|
-
height: ratio * imageHeight
|
|
102
|
-
},
|
|
103
|
-
source: {
|
|
104
|
-
uri: thumbnail.url
|
|
105
|
-
},
|
|
106
|
-
onError: this.onImageLoadError,
|
|
107
|
-
onLoad: this.onTileImageLoad(thumbnail)
|
|
108
|
-
}));
|
|
109
|
-
} else {
|
|
110
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
111
|
-
key: index,
|
|
112
|
-
style: [DEFAULT_THUMBNAIL_VIEW_STYLE.thumbnail, {
|
|
113
|
-
width: scale * renderWidth,
|
|
114
|
-
height: scale * renderHeight
|
|
115
|
-
}]
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
117
|
-
resizeMode: 'contain',
|
|
118
|
-
style: {
|
|
119
|
-
width: scale * size,
|
|
120
|
-
height: scale * renderHeight
|
|
121
|
-
},
|
|
122
|
-
source: {
|
|
123
|
-
uri: thumbnail.url
|
|
124
|
-
},
|
|
125
|
-
onError: this.onImageLoadError,
|
|
126
|
-
onLoad: this.onImageLoad(thumbnail)
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
const {
|
|
131
|
-
size: _size
|
|
132
|
-
} = props;
|
|
133
|
-
this.state = {
|
|
134
|
-
imageWidth: _size,
|
|
135
|
-
imageHeight: _size,
|
|
136
|
-
renderWidth: _size,
|
|
137
|
-
renderHeight: 1
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
componentDidMount() {
|
|
141
|
-
this._ismounted = true;
|
|
142
|
-
}
|
|
143
|
-
componentWillUnmount() {
|
|
144
|
-
this._ismounted = false;
|
|
145
|
-
}
|
|
146
|
-
getCueIndexAtTime(time) {
|
|
147
|
-
const {
|
|
148
|
-
thumbnailTrack
|
|
149
|
-
} = this.props;
|
|
150
|
-
|
|
151
|
-
// Ignore if it's an invalid track or not a thumbnail track.
|
|
152
|
-
if (!(0, _reactNativeTheoplayer.isThumbnailTrack)(thumbnailTrack)) {
|
|
153
|
-
console.warn(TAG, 'Invalid thumbnail track');
|
|
154
|
-
return undefined;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// Ignore if the track does not have cues
|
|
158
|
-
if (thumbnailTrack.cues == null || thumbnailTrack.cues.length == 0) {
|
|
159
|
-
return undefined;
|
|
160
|
-
}
|
|
161
|
-
const cues = thumbnailTrack.cues;
|
|
162
|
-
let cueIndex = 0;
|
|
163
|
-
for (const [index, cue] of cues.entries()) {
|
|
164
|
-
if (cue.startTime <= time) {
|
|
165
|
-
cueIndex = index;
|
|
166
|
-
} else if (time >= cue.endTime) {
|
|
167
|
-
return cueIndex;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return cueIndex;
|
|
171
|
-
}
|
|
172
|
-
resolveThumbnailUrl(thumbnail) {
|
|
173
|
-
const {
|
|
174
|
-
thumbnailTrack
|
|
175
|
-
} = this.props;
|
|
176
|
-
// NOTE: TextTrack.src is supported in Android SDK as of 3.5+
|
|
177
|
-
if (thumbnailTrack && thumbnailTrack.src) {
|
|
178
|
-
return new _Urlpolyfill.URL(thumbnail, thumbnailTrack.src).href;
|
|
179
|
-
} else {
|
|
180
|
-
return thumbnail;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
getThumbnailImageForCue(cue) {
|
|
184
|
-
const thumbnailContent = cue && cue.content;
|
|
185
|
-
if (!thumbnailContent) {
|
|
186
|
-
// Cue does not contain any thumbnail info.
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
const spriteMatch = thumbnailContent.match(SPRITE_REGEX);
|
|
190
|
-
if (spriteMatch) {
|
|
191
|
-
// The thumbnail is part of a tile.
|
|
192
|
-
const [, url, x, y, w, h] = spriteMatch;
|
|
193
|
-
return {
|
|
194
|
-
tileX: +x,
|
|
195
|
-
tileY: +y,
|
|
196
|
-
tileWidth: +w,
|
|
197
|
-
tileHeight: +h,
|
|
198
|
-
url: this.resolveThumbnailUrl(url)
|
|
199
|
-
};
|
|
200
|
-
} else {
|
|
201
|
-
// The thumbnail is a separate image.
|
|
202
|
-
return {
|
|
203
|
-
url: this.resolveThumbnailUrl(thumbnailContent)
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
render() {
|
|
208
|
-
const {
|
|
209
|
-
time,
|
|
210
|
-
duration,
|
|
211
|
-
thumbnailTrack,
|
|
212
|
-
showTimeLabel,
|
|
213
|
-
timeLabelStyle
|
|
214
|
-
} = this.props;
|
|
215
|
-
if (!thumbnailTrack || !thumbnailTrack.cues || thumbnailTrack.cues.length === 0) {
|
|
216
|
-
// No thumbnails to render.
|
|
217
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
218
|
-
}
|
|
219
|
-
const nowCueIndex = this.getCueIndexAtTime(time);
|
|
220
|
-
if (nowCueIndex === undefined) {
|
|
221
|
-
// No thumbnail for current time
|
|
222
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
223
|
-
}
|
|
224
|
-
const current = this.getThumbnailImageForCue(thumbnailTrack.cues[nowCueIndex]);
|
|
225
|
-
if (current === null) {
|
|
226
|
-
// No thumbnail for current time
|
|
227
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
228
|
-
}
|
|
229
|
-
const {
|
|
230
|
-
renderHeight
|
|
231
|
-
} = this.state;
|
|
232
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
233
|
-
style: {
|
|
234
|
-
flexDirection: 'column'
|
|
235
|
-
}
|
|
236
|
-
}, showTimeLabel && /*#__PURE__*/_react.default.createElement(_reactNativeTheoplayer.StaticTimeLabel, {
|
|
237
|
-
style: [{
|
|
238
|
-
marginLeft: 20,
|
|
239
|
-
height: 20,
|
|
240
|
-
alignSelf: 'center'
|
|
241
|
-
}, timeLabelStyle],
|
|
242
|
-
time: time,
|
|
243
|
-
duration: duration,
|
|
244
|
-
showDuration: false
|
|
245
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
246
|
-
style: [DEFAULT_THUMBNAIL_VIEW_STYLE.containerThumbnail, {
|
|
247
|
-
height: renderHeight
|
|
248
|
-
}]
|
|
249
|
-
}, this.renderThumbnail(current, 0)));
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
exports.ThumbnailView = ThumbnailView;
|
|
253
|
-
_defineProperty(ThumbnailView, "defaultProps", {
|
|
254
|
-
showTimeLabel: true
|
|
255
|
-
});
|
|
256
|
-
//# sourceMappingURL=ThumbnailView.js.map
|