Skip to content

Commit

Permalink
Eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnfb committed Jun 20, 2024
1 parent d7b4516 commit ed6e523
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,13 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
[onVideoTracks],
);

const _onPlaybackRateChange = useCallback(
(e: NativeSyntheticEvent<Readonly<{playbackRate: number}>>) => {
onPlaybackRateChange?.(e.nativeEvent);
},
[onPlaybackRateChange],
);

const _onVolumeChange = useCallback(
(e: NativeSyntheticEvent<Readonly<{volume: number}>>) => {
onVolumeChange?.(e.nativeEvent);
Expand Down Expand Up @@ -454,13 +461,6 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
[onAspectRatio],
);

const _onPlaybackRateChange = useCallback(
(e: NativeSyntheticEvent<Readonly<{playbackRate: number}>>) => {
onPlaybackRateChange?.(e.nativeEvent);
},
[onPlaybackRateChange],
);

const _onControlsVisibilityChange = useCallback(
(e: NativeSyntheticEvent<OnControlsVisibilityChange>) => {
onControlsVisibilityChange?.(e.nativeEvent);
Expand Down Expand Up @@ -626,9 +626,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
: undefined
}
onControlsVisibilityChange={
onControlsVisibilityChange
? _onControlsVisibilityChange
: undefined
onControlsVisibilityChange ? _onControlsVisibilityChange : undefined
}
/>
{hasPoster && showPoster ? (
Expand Down

0 comments on commit ed6e523

Please sign in to comment.