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:
@@ -84,6 +84,10 @@ class VideoPlayer extends Component {
|
||||
description: 'Another live sample',
|
||||
uri: 'https://live.forstreet.cl/live/livestream.m3u8',
|
||||
},
|
||||
{
|
||||
description: 'another bunny (can be saved)',
|
||||
uri: 'https://rawgit.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4'
|
||||
}
|
||||
];
|
||||
|
||||
srcIosList = [
|
||||
@@ -590,6 +594,18 @@ class VideoPlayer extends Component {
|
||||
onPress={this.onResizeModeSelected}
|
||||
selected={this.state.resizeMode}
|
||||
/>
|
||||
<ToggleControl
|
||||
isSelected={this.state.paused}
|
||||
onPress={() => {
|
||||
this.video?.save({}).then((response) => {
|
||||
console.log('Downloaded URI', response);
|
||||
}).catch((error) => {
|
||||
console.log('error during save ', error)
|
||||
});
|
||||
}
|
||||
}
|
||||
text='save'
|
||||
/>
|
||||
</View>
|
||||
{this.renderSeekBar()}
|
||||
<View style={styles.generalControls}>
|
||||
|
Reference in New Issue
Block a user