Adds fullscreenOptions to iOS

This commit is contained in:
Ash Mishra 2018-09-04 15:44:19 -07:00
parent 0580f2710f
commit 443bf88c63
2 changed files with 107 additions and 78 deletions

View File

@ -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