Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#58324 react-native-video-player: inherit p…
Browse files Browse the repository at this point in the history
…rops from react-native-video by @mlc
  • Loading branch information
mlc committed Jan 20, 2022
1 parent 40daaad commit 721dbc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions types/react-native-video-player/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
// Type definitions for react-native-video-player 0.10
// Project: https://github.com/cornedor/react-native-video-player.git
// Definitions by: Junseong Park <https://github.com/Kweiza>
// mike castleman <https://github.com/mlc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as React from 'react';
import { ImageSourcePropType, StyleProp, ViewStyle, TextStyle, ImageStyle } from 'react-native';
import { VideoProperties } from 'react-native-video';
import Icon from 'react-native-vector-icons/MaterialIcons';

export interface VideoPlayerProps {
export interface VideoPlayerProps extends Omit<VideoProperties, 'source'> {
video?: { uri?: string | undefined, mainVer?: number | undefined, patchVer?: number | undefined } | number | undefined;
thumbnail?: ImageSourcePropType | undefined;
endThumbnail?: ImageSourcePropType | undefined;
videoWidth?: number | undefined;
videoHeight?: number | undefined;
duration?: number | undefined;
showDuration?: boolean;
autoplay?: boolean | undefined;
paused?: boolean | undefined;
defaultMuted?: boolean | undefined;
muted?: boolean | undefined;
style?: StyleProp<ViewStyle> | undefined;
controlsTimeout?: number | undefined;
disableControlsAutoHide?: boolean | undefined;
disableFullscreen?: boolean | undefined;
loop?: boolean | undefined;
resizeMode?: 'stretch' | 'contain' | 'cover' | 'none' | undefined;
hideControlsOnStart?: boolean | undefined;
endWithThumbnail?: boolean | undefined;
disableSeek?: boolean | undefined;
Expand All @@ -49,9 +48,6 @@ export interface VideoPlayerProps {
playButton?: StyleProp<ViewStyle> | undefined;
playArrow?: StyleProp<TextStyle> | undefined;
} | undefined;
onEnd?: ((event: any) => any) | undefined;
onProgress?: ((event: any) => any) | undefined;
onLoad?: ((event: any) => any) | undefined;
onStart?: (() => any) | undefined;
onPlayPress?: (() => any) | undefined;
onHideControls?: (() => any) | undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ import VideoPlayer from 'react-native-video-player';
video={{ uri: 'sample.mp4' }}
videoWidth={1280}
videoHeight={720}
ignoreSilentSwitch="ignore"
/>;

0 comments on commit 721dbc0

Please sign in to comment.