Adds fullscreenOptions to iOS
This commit is contained in:
parent
0580f2710f
commit
443bf88c63
29
README.md
29
README.md
@ -228,6 +228,8 @@ var styles = StyleSheet.create({
|
|||||||
* [allowsExternalPlayback](#allowsexternalplayback)
|
* [allowsExternalPlayback](#allowsexternalplayback)
|
||||||
* [audioOnly](#audioonly)
|
* [audioOnly](#audioonly)
|
||||||
* [bufferConfig](#bufferconfig)
|
* [bufferConfig](#bufferconfig)
|
||||||
|
* [fullscreen (deprecated)](#fullscreen)
|
||||||
|
* [fullscreenOptions](#fullscreenOptions)
|
||||||
* [ignoreSilentSwitch](#ignoresilentswitch)
|
* [ignoreSilentSwitch](#ignoresilentswitch)
|
||||||
* [muted](#muted)
|
* [muted](#muted)
|
||||||
* [paused](#paused)
|
* [paused](#paused)
|
||||||
@ -305,6 +307,33 @@ bufferConfig={{
|
|||||||
|
|
||||||
Platforms: Android ExoPlayer
|
Platforms: Android ExoPlayer
|
||||||
|
|
||||||
|
#### fullscreen (deprecated)
|
||||||
|
|
||||||
|
Controls whether the player enters fullscreen on play. Use fullscreenOptions for extended behaviour.
|
||||||
|
|
||||||
|
Platforms: iOS
|
||||||
|
|
||||||
|
#### fullscreenOptions
|
||||||
|
|
||||||
|
Controls behaviour of the player entering fullscreen, such as forcing landscape playback on portrait devices
|
||||||
|
|
||||||
|
Property | Type | Description
|
||||||
|
--- | --- | ---
|
||||||
|
enabled | boolean | determines whether to enter fullscreen on video play
|
||||||
|
preferredOrientation | landscape, portrait, default | Defaults to the current device orientation; otherwise will force fullscreen video playback into landscape or portrait
|
||||||
|
autorotate | boolean | determines whether the video player will rotate to the preferredOrientation automatically
|
||||||
|
|
||||||
|
Example with default values
|
||||||
|
```
|
||||||
|
fullscreenOptions={{
|
||||||
|
enabled: false,
|
||||||
|
preferredOrientation: 'default'
|
||||||
|
autorotate: true
|
||||||
|
}}
|
||||||
|
```
|
||||||
|
|
||||||
|
Platforms: iOS
|
||||||
|
|
||||||
#### ignoreSilentSwitch
|
#### ignoreSilentSwitch
|
||||||
Controls the iOS silent switch behavior
|
Controls the iOS silent switch behavior
|
||||||
* **"inherit" (default)** - Use the default AVPlayer behavior
|
* **"inherit" (default)** - Use the default AVPlayer behavior
|
||||||
|
@ -381,7 +381,7 @@ static int const RCTVideoUnset = -1;
|
|||||||
NSString* relativeFilePath = [filepath lastPathComponent];
|
NSString* relativeFilePath = [filepath lastPathComponent];
|
||||||
// the file may be multiple levels below the documents directory
|
// the file may be multiple levels below the documents directory
|
||||||
NSArray* fileComponents = [filepath componentsSeparatedByString:@"/Documents/"];
|
NSArray* fileComponents = [filepath componentsSeparatedByString:@"/Documents/"];
|
||||||
if (fileComponents.count>1) {
|
if (fileComponents.count > 1) {
|
||||||
relativeFilePath = [fileComponents objectAtIndex:1];
|
relativeFilePath = [fileComponents objectAtIndex:1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user