diff --git a/examples/basic/src/VideoPlayer.tsx b/examples/basic/src/VideoPlayer.tsx index 198bf11a..c38b68e0 100644 --- a/examples/basic/src/VideoPlayer.tsx +++ b/examples/basic/src/VideoPlayer.tsx @@ -644,20 +644,22 @@ class VideoPlayer extends Component { onPress={this.onResizeModeSelected} selected={this.state.resizeMode} /> - { - this.video - ?.save({}) - .then(response => { - console.log('Downloaded URI', response); - }) - .catch(error => { - console.log('error during save ', error); - }); - }} - text="save" - /> + {Platform.OS === 'ios' ? ( + { + this.video + ?.save({}) + ?.then(response => { + console.log('Downloaded URI', response); + }) + .catch(error => { + console.log('error during save ', error); + }); + }} + text="save" + /> + ) : null} {this.renderSeekBar()} diff --git a/src/Video.tsx b/src/Video.tsx index 4a718e87..41d2aa64 100644 --- a/src/Video.tsx +++ b/src/Video.tsx @@ -243,7 +243,8 @@ const Video = forwardRef( }, [setIsFullscreen]); const save = useCallback((options: object) => { - return VideoManager.save(options, getReactTag(nativeRef)); + // VideoManager.save can be null on android & windows + return VideoManager.save?.(options, getReactTag(nativeRef)); }, []); const pause = useCallback(() => {