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:
Olivier Bouillet
2023-11-13 21:36:16 +01:00
committed by GitHub
parent da270891fb
commit dfac7a6ed3
11 changed files with 149 additions and 237 deletions

View File

@@ -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(() => {