Document fullscreen methods & events
This commit is contained in:
parent
933d3dd817
commit
aa4e1812e9
75
README.md
75
README.md
@ -191,21 +191,8 @@ using System.Collections.Generic;
|
|||||||
onBuffer={this.onBuffer} // Callback when remote video is buffering
|
onBuffer={this.onBuffer} // Callback when remote video is buffering
|
||||||
onEnd={this.onEnd} // Callback when playback finishes
|
onEnd={this.onEnd} // Callback when playback finishes
|
||||||
onError={this.videoError} // Callback when video cannot be loaded
|
onError={this.videoError} // Callback when video cannot be loaded
|
||||||
onFullscreenPlayerWillPresent={this.fullScreenPlayerWillPresent} // Callback before fullscreen starts
|
|
||||||
onFullscreenPlayerDidPresent={this.fullScreenPlayerDidPresent} // Callback after fullscreen started
|
|
||||||
onFullscreenPlayerWillDismiss={this.fullScreenPlayerWillDismiss} // Callback before fullscreen stops
|
|
||||||
onFullscreenPlayerDidDismiss={this.fullScreenPlayerDidDismiss} // Callback after fullscreen stopped
|
|
||||||
style={styles.backgroundVideo} />
|
style={styles.backgroundVideo} />
|
||||||
|
|
||||||
// Later to trigger fullscreen
|
|
||||||
this.player.presentFullscreenPlayer()
|
|
||||||
|
|
||||||
// Disable fullscreen
|
|
||||||
this.player.dismissFullscreenPlayer()
|
|
||||||
|
|
||||||
// To set video position in seconds (seek)
|
|
||||||
this.player.seek(0)
|
|
||||||
|
|
||||||
// Later on in your styles..
|
// Later on in your styles..
|
||||||
var styles = StyleSheet.create({
|
var styles = StyleSheet.create({
|
||||||
backgroundVideo: {
|
backgroundVideo: {
|
||||||
@ -240,12 +227,18 @@ var styles = StyleSheet.create({
|
|||||||
|
|
||||||
### Event props
|
### Event props
|
||||||
* [onAudioBecomingNoisy](#onaudiobecomingnoisy)
|
* [onAudioBecomingNoisy](#onaudiobecomingnoisy)
|
||||||
|
* [onFullscreenPlayerWillPresent](#onfullscreenplayerwillpresent)
|
||||||
|
* [onFullscreenPlayerDidPresent](#onfullscreenplayerdidpresent)
|
||||||
|
* [onFullscreenPlayerWillDismiss](#onfullscreenplayerwilldismiss)
|
||||||
|
* [onFullscreenPlayerDidDismiss](#onfullscreenplayerdiddismiss)
|
||||||
* [onLoad](#onload)
|
* [onLoad](#onload)
|
||||||
* [onLoadStart](#onloadstart)
|
* [onLoadStart](#onloadstart)
|
||||||
* [onProgress](#onprogress)
|
* [onProgress](#onprogress)
|
||||||
* [onTimedMetadata](#ontimedmetadata)
|
* [onTimedMetadata](#ontimedmetadata)
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
* [dismissFullscreenPlayer](#dismissfullscreenplayer)
|
||||||
|
* [presentFullscreenPlayer](#presentfullscreenplayer)
|
||||||
* [seek](#seek)
|
* [seek](#seek)
|
||||||
|
|
||||||
### Configurable props
|
### Configurable props
|
||||||
@ -460,6 +453,34 @@ Payload: none
|
|||||||
|
|
||||||
Platforms: Android ExoPlayer, iOS
|
Platforms: Android ExoPlayer, iOS
|
||||||
|
|
||||||
|
#### onFullscreenPlayerWillPresent
|
||||||
|
Callback function that is called when the player is about to enter fullscreen mode.
|
||||||
|
|
||||||
|
Payload: none
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||||
|
|
||||||
|
#### onFullscreenPlayerDidPresent
|
||||||
|
Callback function that is called when the player has entered fullscreen mode.
|
||||||
|
|
||||||
|
Payload: none
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||||
|
|
||||||
|
#### onFullscreenPlayerWillDismiss
|
||||||
|
Callback function that is called when the player is about to exit fullscreen mode.
|
||||||
|
|
||||||
|
Payload: none
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||||
|
|
||||||
|
#### onFullscreenPlayerDidDismiss
|
||||||
|
Callback function that is called when the player has exited fullscreen mode.
|
||||||
|
|
||||||
|
Payload: none
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||||
|
|
||||||
#### onLoad
|
#### onLoad
|
||||||
Callback function that is called when the media is loaded and ready to play.
|
Callback function that is called when the media is loaded and ready to play.
|
||||||
|
|
||||||
@ -569,6 +590,34 @@ return (
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### dismissFullscreenPlayer
|
||||||
|
`dismissFullscreenPlayer()`
|
||||||
|
|
||||||
|
Take the player out of fullscreen mode.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
this.player.dismissFullscreenPlayer();
|
||||||
|
```
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||||
|
|
||||||
|
#### FullscreenPlayer
|
||||||
|
`presentFullscreenPlayer()`
|
||||||
|
|
||||||
|
Put the player in fullscreen mode.
|
||||||
|
|
||||||
|
On iOS, this displays the video in a fullscreen view controller with controls.
|
||||||
|
|
||||||
|
On Android ExoPlayer & MediaPlayer, this puts the navigation controls in fullscreen mode. It is not a complete fullscreen implementation, so you will still need to apply a style that makes the width and height match your screen dimensions to get a fullscreen video.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
this.player.presentFullscreenPlayer();
|
||||||
|
```
|
||||||
|
|
||||||
|
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||||
|
|
||||||
#### seek()
|
#### seek()
|
||||||
`seek(seconds)`
|
`seek(seconds)`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user