introducing onExternalPlaybackActiveChange

This commit is contained in:
Artur Jaworski
2018-09-13 14:06:12 +02:00
parent b0c0ac10f4
commit d7efcf315f
4 changed files with 30 additions and 0 deletions

View File

@@ -172,6 +172,12 @@ export default class Video extends Component {
this.props.onPlaybackRateChange(event.nativeEvent);
}
};
_onExternalPlaybackChange = (event) => {
if (this.props.onExternalPlaybackChange) {
this.props.onExternalPlaybackChange(event.nativeEvent);
}
}
_onAudioBecomingNoisy = () => {
if (this.props.onAudioBecomingNoisy) {
@@ -246,6 +252,7 @@ export default class Video extends Component {
onPlaybackRateChange: this._onPlaybackRateChange,
onAudioFocusChanged: this._onAudioFocusChanged,
onAudioBecomingNoisy: this._onAudioBecomingNoisy,
onExternalPlaybackChange: this._onExternalPlaybackChange,
});
if (this.props.poster && this.state.showPoster) {
@@ -379,6 +386,7 @@ Video.propTypes = {
onPlaybackRateChange: PropTypes.func,
onAudioFocusChanged: PropTypes.func,
onAudioBecomingNoisy: PropTypes.func,
onExternalPlaybackChange: PropTypes.func,
/* Required by react-native */
scaleX: PropTypes.number,