Merge pull request #2689 from crunchyroll/cr-android-improvements
Crunchyroll Android Improvements
This commit is contained in:
12
Video.js
12
Video.js
@@ -100,6 +100,12 @@ export default class Video extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
_onPlaybackStateChanged = (event) => {
|
||||
if (this.props.onPlaybackStateChanged) {
|
||||
this.props.onPlaybackStateChanged(event.nativeEvent);
|
||||
}
|
||||
};
|
||||
|
||||
_onLoad = (event) => {
|
||||
// Need to hide poster here for windows as onReadyForDisplay is not implemented
|
||||
if (Platform.OS === 'windows') {
|
||||
@@ -308,6 +314,7 @@ export default class Video extends Component {
|
||||
requestHeaders: source.headers ? this.stringsOnlyObject(source.headers) : {},
|
||||
},
|
||||
onVideoLoadStart: this._onLoadStart,
|
||||
onVideoPlaybackStateChanged: this._onPlaybackStateChanged,
|
||||
onVideoLoad: this._onLoad,
|
||||
onVideoError: this._onError,
|
||||
onVideoProgress: this._onProgress,
|
||||
@@ -464,6 +471,7 @@ Video.propTypes = {
|
||||
maxBufferMs: PropTypes.number,
|
||||
bufferForPlaybackMs: PropTypes.number,
|
||||
bufferForPlaybackAfterRebufferMs: PropTypes.number,
|
||||
maxHeapAllocationPercent: PropTypes.number,
|
||||
}),
|
||||
stereoPan: PropTypes.number,
|
||||
rate: PropTypes.number,
|
||||
@@ -473,7 +481,9 @@ Video.propTypes = {
|
||||
playWhenInactive: PropTypes.bool,
|
||||
ignoreSilentSwitch: PropTypes.oneOf(['ignore', 'obey']),
|
||||
reportBandwidth: PropTypes.bool,
|
||||
contentStartTime: PropTypes.number,
|
||||
disableFocus: PropTypes.bool,
|
||||
disableBuffering: PropTypes.bool,
|
||||
controls: PropTypes.bool,
|
||||
audioOnly: PropTypes.bool,
|
||||
currentTime: PropTypes.number,
|
||||
@@ -481,8 +491,10 @@ Video.propTypes = {
|
||||
fullscreenOrientation: PropTypes.oneOf(['all', 'landscape', 'portrait']),
|
||||
progressUpdateInterval: PropTypes.number,
|
||||
useTextureView: PropTypes.bool,
|
||||
useSecureView: PropTypes.bool,
|
||||
hideShutterView: PropTypes.bool,
|
||||
onLoadStart: PropTypes.func,
|
||||
onPlaybackStateChanged: PropTypes.func,
|
||||
onLoad: PropTypes.func,
|
||||
onBuffer: PropTypes.func,
|
||||
onError: PropTypes.func,
|
||||
|
Reference in New Issue
Block a user