VEX-3245: Buffer Progress UI While Paused (#7)

Add support for onBufferProgress prop on Android to get buffer data even when the player is paused.
This commit is contained in:
Armands Malejev
2021-07-07 18:59:55 +03:00
committed by GitHub
parent cba88fa9d8
commit 93604b2c25
5 changed files with 73 additions and 0 deletions

View File

@@ -233,6 +233,12 @@ export default class Video extends Component {
}
};
_onBufferProgress = (event) => {
if (this.props.onBufferProgress) {
this.props.onBufferProgress(event.nativeEvent);
}
};
_onGetLicense = (event) => {
if (this.props.drm && this.props.drm.getLicense instanceof Function) {
const data = event.nativeEvent;
@@ -311,6 +317,7 @@ export default class Video extends Component {
onVideoSeek: this._onSeek,
onVideoEnd: this._onEnd,
onVideoBuffer: this._onBuffer,
onVideoBufferProgress: this._onBufferProgress,
onVideoBandwidthUpdate: this._onBandwidthUpdate,
onTimedMetadata: this._onTimedMetadata,
onVideoAudioBecomingNoisy: this._onAudioBecomingNoisy,