Skip to content

Commit

Permalink
fix: try to fix save typings
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier committed Nov 8, 2023
1 parent ded1c59 commit 9c8f983
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface VideoRef {
restoreUserInterfaceForPictureInPictureStopCompleted: (
restore: boolean,
) => void;
save: () => Promise<VideoSaveData>;
save: (options: object) => Promise<VideoSaveData>;
}

const Video = forwardRef<VideoRef, ReactVideoProps>(
Expand Down Expand Up @@ -241,8 +241,8 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
setIsFullscreen(false);
}, [setIsFullscreen]);

const save = useCallback(() => {
return VideoManager.save(getReactTag(nativeRef));
const save = useCallback((options: object) => {
return VideoManager.save(options, getReactTag(nativeRef));
}, []);

const pause = useCallback(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/VideoNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export type VideoSaveData = {
};

export interface VideoManagerType {
save: (reactTag: number) => Promise<VideoSaveData>;
save: (option: object, reactTag: number) => Promise<VideoSaveData>;
setPlayerPauseState: (paused: boolean, reactTag: number) => Promise<void>;
setLicenseResult: (
result: string,
Expand Down

0 comments on commit 9c8f983

Please sign in to comment.