Revert setPlayWhenReady change

This commit is contained in:
Hampton Maxwell 2018-06-09 16:13:58 -07:00 committed by GitHub
parent fab55f4d5c
commit da7bd43011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,14 +223,12 @@ class ReactExoplayerView extends FrameLayout implements
player.setMetadataOutput(this); player.setMetadataOutput(this);
exoPlayerView.setPlayer(player); exoPlayerView.setPlayer(player);
audioBecomingNoisyReceiver.setListener(this); audioBecomingNoisyReceiver.setListener(this);
setPlayWhenReady(!isPaused);
playerNeedsSource = true; playerNeedsSource = true;
PlaybackParameters params = new PlaybackParameters(rate, 1f); PlaybackParameters params = new PlaybackParameters(rate, 1f);
player.setPlaybackParameters(params); player.setPlaybackParameters(params);
} }
setPlayWhenReady(!isPaused);
if (playerNeedsSource && srcUri != null) { if (playerNeedsSource && srcUri != null) {
MediaSource mediaSource = buildMediaSource(srcUri, extension); MediaSource mediaSource = buildMediaSource(srcUri, extension);
mediaSource = repeat ? new LoopingMediaSource(mediaSource) : mediaSource; mediaSource = repeat ? new LoopingMediaSource(mediaSource) : mediaSource;