Browse Source

add seeking back to pause action

pull/138/head
Jelle van Snik 3 years ago
parent
commit
210e60c24d
  1. 1
      src/index.tsx
  2. 1
      src/video/components/VideoPlayerBase.tsx
  3. 4
      src/video/components/actions/PauseAction.tsx

1
src/index.tsx

@ -20,6 +20,7 @@ initializeChromecast();
// TODO video todos: // TODO video todos:
// - mobile controls start showing when resizing // - mobile controls start showing when resizing
// - bug: popouts sometimes stop working when selecting different episode
// - captions // - captions
// - chrome cast support // - chrome cast support
// - safari fullscreen will make video overlap player controls // - safari fullscreen will make video overlap player controls

1
src/video/components/VideoPlayerBase.tsx

@ -12,7 +12,6 @@ export function VideoPlayerBase(props: VideoPlayerBaseProps) {
const ref = useRef<HTMLDivElement>(null); const ref = useRef<HTMLDivElement>(null);
// TODO error boundary // TODO error boundary
// TODO move error boundary to only decorated, <VideoPlayer /> shouldn't have styling // TODO move error boundary to only decorated, <VideoPlayer /> shouldn't have styling
// TODO internal controls
return ( return (
<VideoPlayerContextProvider> <VideoPlayerContextProvider>

4
src/video/components/actions/PauseAction.tsx

@ -20,8 +20,8 @@ export function PauseAction(props: Props) {
else controls.play(); else controls.play();
}, [mediaPlaying, controls]); }, [mediaPlaying, controls]);
// TODO add seeking back const icon =
const icon = mediaPlaying.isPlaying ? Icons.PAUSE : Icons.PLAY; mediaPlaying.isPlaying || mediaPlaying.isSeeking ? Icons.PAUSE : Icons.PLAY;
return ( return (
<VideoPlayerIconButton <VideoPlayerIconButton

Loading…
Cancel
Save