Skip to content

Commit

Permalink
refactor: remove repeated type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun committed Jul 1, 2024
1 parent 6bfb209 commit 0a6c216
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/specs/VideoNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,31 +369,31 @@ export interface VideoNativeProps extends ViewProps {
onVideoTracks?: DirectEventHandler<OnVideoTracksData>; // android
}

type NativeVideoComponentType = HostComponent<VideoNativeProps>;
type NativeVideoComponentRefType = React.ElementRef<NativeVideoComponentType>;

export interface NativeVideoCommands {
seek: (
viewRef: React.ElementRef<HostComponent<VideoNativeProps>>,
viewRef: NativeVideoComponentRefType,
time: Float,
tolerance?: Float,
) => void;
setPlayerPauseState: (
viewRef: React.ElementRef<HostComponent<VideoNativeProps>>,
viewRef: NativeVideoComponentRefType,
paused: boolean,
) => void;
setVolume: (
viewRef: React.ElementRef<HostComponent<VideoNativeProps>>,
volume: Float,
) => void;
setVolume: (viewRef: NativeVideoComponentRefType, volume: Float) => void;
setFullScreen: (
viewRef: React.ElementRef<HostComponent<VideoNativeProps>>,
viewRef: NativeVideoComponentRefType,
fullScreen: boolean,
) => void;
setLicenseResult: (
viewRef: React.ElementRef<HostComponent<VideoNativeProps>>,
viewRef: NativeVideoComponentRefType,
result: string,
licenseUrl: string,
) => void;
setLicenseResultError: (
viewRef: React.ElementRef<HostComponent<VideoNativeProps>>,
viewRef: NativeVideoComponentRefType,
error: string,
licenseUrl: string,
) => void;
Expand Down

0 comments on commit 0a6c216

Please sign in to comment.