mirror of
https://github.com/androidx/media.git
synced 2025-05-06 23:20:42 +08:00
remove unneeded changes
This commit is contained in:
parent
44b21f2e3b
commit
8804ecded4
@ -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 {
|
|||||||
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:
|
// Video enabled so artwork must be hidden. If the shutter is closed, it will be opened in
|
||||||
if (selections.get(i) != null) {
|
// onRenderedFirstFrame().
|
||||||
// Video enabled so artwork must be hidden. If the shutter is closed, it will be opened in
|
hideArtwork();
|
||||||
// onRenderedFirstFrame().
|
return;
|
||||||
|
|
||||||
hideArtwork();
|
|
||||||
quickExit = true;
|
|
||||||
}
|
|
||||||
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 {
|
|||||||
|
|
||||||
@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 {
|
|||||||
@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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user