Fix web bugs
This commit is contained in:
		@@ -240,7 +240,13 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
 | 
			
		||||
          onVolumeChange?.({volume: nativeRef.current.volume});
 | 
			
		||||
        }}
 | 
			
		||||
        onEnded={onEnd}
 | 
			
		||||
        style={{position: 'absolute', inset: 0, objectFit: 'contain'}}
 | 
			
		||||
        style={{
 | 
			
		||||
          position: 'absolute',
 | 
			
		||||
          inset: 0,
 | 
			
		||||
          objectFit: 'contain',
 | 
			
		||||
          width: '100%',
 | 
			
		||||
          height: '100%',
 | 
			
		||||
        }}
 | 
			
		||||
      />
 | 
			
		||||
    );
 | 
			
		||||
  },
 | 
			
		||||
@@ -258,7 +264,9 @@ const useMediaSession = (
 | 
			
		||||
) => {
 | 
			
		||||
  const isPlaying = !nativeRef.current?.paused ?? false;
 | 
			
		||||
  const progress = nativeRef.current?.currentTime ?? 0;
 | 
			
		||||
  const duration = nativeRef.current?.duration ?? 100;
 | 
			
		||||
  const duration = Number.isFinite(nativeRef.current?.duration)
 | 
			
		||||
    ? nativeRef.current?.duration
 | 
			
		||||
    : undefined;
 | 
			
		||||
  const playbackRate = nativeRef.current?.playbackRate ?? 1;
 | 
			
		||||
 | 
			
		||||
  const enabled = 'mediaSession' in navigator && showNotification;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
import Video from './Video';
 | 
			
		||||
export {VideoDecoderProperties} from './VideoDecoderProperties';
 | 
			
		||||
export type * from './types';
 | 
			
		||||
export * from './types';
 | 
			
		||||
export default Video;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user