Commit 8804ecde by drhill Committed by GitHub

remove unneeded changes

parent 44b21f2e
...@@ -178,7 +178,6 @@ public final class SimpleExoPlayerView extends FrameLayout { ...@@ -178,7 +178,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
private SimpleExoPlayer player; private SimpleExoPlayer player;
private boolean useController; private boolean useController;
private boolean useArtwork; private boolean useArtwork;
private boolean subtitlesEnabled = false;
private int controllerShowTimeoutMs; private int controllerShowTimeoutMs;
public SimpleExoPlayerView(Context context) { public SimpleExoPlayerView(Context context) {
...@@ -524,26 +523,14 @@ public final class SimpleExoPlayerView extends FrameLayout { ...@@ -524,26 +523,14 @@ public final class SimpleExoPlayerView extends FrameLayout {
return; return;
} }
TrackSelectionArray selections = player.getCurrentTrackSelections(); TrackSelectionArray selections = player.getCurrentTrackSelections();
boolean quickExit = false;
for (int i = 0; i < selections.length; i++) { for (int i = 0; i < selections.length; i++) {
switch(player.getRendererType(i)) { if (player.getRendererType(i) == C.TRACK_TYPE_VIDEO && selections.get(i) != null) {
case C.TRACK_TYPE_VIDEO:
if (selections.get(i) != null) {
// Video enabled so artwork must be hidden. If the shutter is closed, it will be opened in // Video enabled so artwork must be hidden. If the shutter is closed, it will be opened in
// onRenderedFirstFrame(). // onRenderedFirstFrame().
hideArtwork(); hideArtwork();
quickExit = true; return;
}
break;
case C.TRACK_TYPE_TEXT:
if (selections.get(i) != null)
subtitlesEnabled = true;
break;
} }
} }
if (quickExit)
return;
// Video disabled so the shutter must be closed. // Video disabled so the shutter must be closed.
if (shutterView != null) { if (shutterView != null) {
shutterView.setVisibility(VISIBLE); shutterView.setVisibility(VISIBLE);
...@@ -614,7 +601,6 @@ public final class SimpleExoPlayerView extends FrameLayout { ...@@ -614,7 +601,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
@Override @Override
public void onCues(List<Cue> cues) { public void onCues(List<Cue> cues) {
if (subtitleView != null) { if (subtitleView != null) {
subtitleView.onCues(cues); subtitleView.onCues(cues);
} }
...@@ -625,7 +611,6 @@ public final class SimpleExoPlayerView extends FrameLayout { ...@@ -625,7 +611,6 @@ public final class SimpleExoPlayerView extends FrameLayout {
@Override @Override
public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees,
float pixelWidthHeightRatio) { float pixelWidthHeightRatio) {
if (contentFrame != null) { if (contentFrame != null) {
float aspectRatio = height == 0 ? 1 : (width * pixelWidthHeightRatio) / height; float aspectRatio = height == 0 ? 1 : (width * pixelWidthHeightRatio) / height;
contentFrame.setAspectRatio(aspectRatio); contentFrame.setAspectRatio(aspectRatio);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment