Merge pull request #2741 from iFeelSmart/fix/avoid_duplicated_onEnd
fix(android): ensure we don't disable playback when player is ENDED
This commit is contained in:
commit
11cde867df
@ -2,6 +2,7 @@
|
||||
|
||||
### Version 6.0.0-alpha.2
|
||||
|
||||
- Fix Android #2690 ensure onEnd is not sent twice [#2690](https://github.com/react-native-video/react-native-video/issues/2690)
|
||||
- Fix Exoplayer progress not reported when paused [#2664](https://github.com/react-native-video/react-native-video/pull/2664)
|
||||
- Call playbackRateChange onPlay and onPause [#1493](https://github.com/react-native-video/react-native-video/pull/1493)
|
||||
- Fix being unable to disable sideloaded texttracks in the AVPlayer [#2679](https://github.com/react-native-video/react-native-video/pull/2679)
|
||||
|
@ -824,7 +824,10 @@ class ReactExoplayerView extends FrameLayout implements
|
||||
player.setPlayWhenReady(true);
|
||||
}
|
||||
} else {
|
||||
player.setPlayWhenReady(false);
|
||||
// ensure playback is not ENDED, else it will trigger another ended event
|
||||
if (player.getPlaybackState() != Player.STATE_ENDED) {
|
||||
player.setPlayWhenReady(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user