Bring things up to date with master from copied code
This commit is contained in:
parent
5d274631c8
commit
f2e182addc
@ -131,6 +131,7 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
themedReactContext.addLifecycleEventListener(this);
|
themedReactContext.addLifecycleEventListener(this);
|
||||||
audioBecomingNoisyReceiver = new AudioBecomingNoisyReceiver(themedReactContext);
|
audioBecomingNoisyReceiver = new AudioBecomingNoisyReceiver(themedReactContext);
|
||||||
|
|
||||||
|
initializePlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -481,6 +482,7 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerError(ExoPlaybackException e) {
|
public void onPlayerError(ExoPlaybackException e) {
|
||||||
String errorString = null;
|
String errorString = null;
|
||||||
|
Exception ex = e;
|
||||||
if (e.type == ExoPlaybackException.TYPE_RENDERER) {
|
if (e.type == ExoPlaybackException.TYPE_RENDERER) {
|
||||||
Exception cause = e.getRendererException();
|
Exception cause = e.getRendererException();
|
||||||
if (cause instanceof MediaCodecRenderer.DecoderInitializationException) {
|
if (cause instanceof MediaCodecRenderer.DecoderInitializationException) {
|
||||||
@ -503,8 +505,12 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (e.type == ExoPlaybackException.TYPE_SOURCE) {
|
||||||
|
ex = e.getSourceException();
|
||||||
|
errorString = getResources().getString(R.string.unrecognized_media_format);
|
||||||
|
}
|
||||||
if (errorString != null) {
|
if (errorString != null) {
|
||||||
eventEmitter.error(errorString, e);
|
eventEmitter.error(errorString, ex);
|
||||||
}
|
}
|
||||||
playerNeedsSource = true;
|
playerNeedsSource = true;
|
||||||
if (isBehindLiveWindow(e)) {
|
if (isBehindLiveWindow(e)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user