mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Hide subtitles when switching player in SimpleExoPlayerView
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177941993
This commit is contained in:
parent
2b31723434
commit
a155edc568
2 changed files with 6 additions and 2 deletions
|
|
@ -425,6 +425,9 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
||||||
if (shutterView != null) {
|
if (shutterView != null) {
|
||||||
shutterView.setVisibility(VISIBLE);
|
shutterView.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
|
if (subtitleView != null) {
|
||||||
|
subtitleView.setCues(null);
|
||||||
|
}
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
if (surfaceView instanceof TextureView) {
|
if (surfaceView instanceof TextureView) {
|
||||||
player.setVideoTextureView((TextureView) surfaceView);
|
player.setVideoTextureView((TextureView) surfaceView);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
@ -87,9 +88,9 @@ public final class SubtitleView extends View implements TextOutput {
|
||||||
/**
|
/**
|
||||||
* Sets the cues to be displayed by the view.
|
* Sets the cues to be displayed by the view.
|
||||||
*
|
*
|
||||||
* @param cues The cues to display.
|
* @param cues The cues to display, or null to clear the cues.
|
||||||
*/
|
*/
|
||||||
public void setCues(List<Cue> cues) {
|
public void setCues(@Nullable List<Cue> cues) {
|
||||||
if (this.cues == cues) {
|
if (this.cues == cues) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue