feat(android): add new events for audioTrack, textTracks and videoTracks
This commit is contained in:
24
Video.js
24
Video.js
@@ -116,6 +116,24 @@ export default class Video extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
_onAudioTracks = (event) => {
|
||||
if (this.props.onAudioTracks) {
|
||||
this.props.onAudioTracks(event.nativeEvent);
|
||||
}
|
||||
};
|
||||
|
||||
_onTextTracks = (event) => {
|
||||
if (this.props.onTextTracks) {
|
||||
this.props.onTextTracks(event.nativeEvent);
|
||||
}
|
||||
};
|
||||
|
||||
_onVideoTracks = (event) => {
|
||||
if (this.props.onVideoTracks) {
|
||||
this.props.onVideoTracks(event.nativeEvent);
|
||||
}
|
||||
};
|
||||
|
||||
_onError = (event) => {
|
||||
if (this.props.onError) {
|
||||
this.props.onError(event.nativeEvent);
|
||||
@@ -316,6 +334,9 @@ export default class Video extends Component {
|
||||
onVideoLoadStart: this._onLoadStart,
|
||||
onVideoPlaybackStateChanged: this._onPlaybackStateChanged,
|
||||
onVideoLoad: this._onLoad,
|
||||
onAudioTracks: this._onAudioTracks,
|
||||
onTextTracks: this._onTextTracks,
|
||||
onVideoTracks: this._onVideoTracks,
|
||||
onVideoError: this._onError,
|
||||
onVideoProgress: this._onProgress,
|
||||
onVideoSeek: this._onSeek,
|
||||
@@ -495,6 +516,9 @@ Video.propTypes = {
|
||||
onLoadStart: PropTypes.func,
|
||||
onPlaybackStateChanged: PropTypes.func,
|
||||
onLoad: PropTypes.func,
|
||||
onAudioTracks: PropTypes.func,
|
||||
onTextTracks: PropTypes.func,
|
||||
onVideoTracks: PropTypes.func,
|
||||
onBuffer: PropTypes.func,
|
||||
onError: PropTypes.func,
|
||||
onProgress: PropTypes.func,
|
||||
|
||||
Reference in New Issue
Block a user