Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-solecki committed Apr 4, 2024
1 parent 975019e commit 13b0974
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/VideoPlayer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type {Video} from 'expo-av';
import type {AVPlaybackStatus} from 'expo-av/build/AV';
import type {VideoFullscreenUpdateEvent, VideoReadyForDisplayEvent} from 'expo-av/build/Video.types';
import type {StyleProp, ViewStyle} from 'react-native';
import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';

type VideoWithOnFullScreenUpdate = Video & {_onFullscreenUpdate: (event: VideoFullscreenUpdateEvent) => void};

Expand All @@ -11,19 +13,22 @@ type VideoPlayerProps = {
resizeMode?: string;
isLooping?: boolean;
// style for the whole video player component
style: StyleProp<ViewStyle>;
style?: StyleProp<ViewStyle>;
// style for the video player inside the component
videoPlayerStyle?: StyleProp<ViewStyle>;
// style for the video element inside the video player
videoStyle?: StyleProp<ViewStyle>;
videoControlsStyle?: StyleProp<ViewStyle>;
videoDuration: number;
videoDuration?: number;
shouldUseSharedVideoElement?: boolean;
shouldUseSmallVideoControls?: boolean;
shouldShowVideoControls?: boolean;
isVideoHovered?: boolean;
onFullscreenUpdate?: (event: VideoFullscreenUpdateEvent) => void;
onPlaybackStatusUpdate?: (status: AVPlaybackStatus) => void;
shouldUseControlsBottomMargin?: boolean;
controlsStatus?: ValueOf<typeof CONST.VIDEO_PLAYER.CONTROLS_STATUS>;
shouldPlay?: boolean;
};

export type {VideoPlayerProps, VideoWithOnFullScreenUpdate};

0 comments on commit 13b0974

Please sign in to comment.