Fix(ios): restore caching feature (#3341)
* chore: fix build issue * fix: try to fix save typings * chore: fix podspec * fix: update integration guide for ios Caching * fix: update sample to test the save function --------- Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
@@ -50,7 +50,7 @@ export interface VideoRef {
|
||||
restoreUserInterfaceForPictureInPictureStopCompleted: (
|
||||
restore: boolean,
|
||||
) => void;
|
||||
save: () => Promise<VideoSaveData>;
|
||||
save: (options: object) => Promise<VideoSaveData>;
|
||||
}
|
||||
|
||||
const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
@@ -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(() => {
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user