mirror of
https://github.com/samsonjs/media.git
synced 2026-04-18 13:25:47 +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
9cb0c2f702
commit
02e32a1838
2 changed files with 6 additions and 2 deletions
|
|
@ -425,6 +425,9 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
|||
if (shutterView != null) {
|
||||
shutterView.setVisibility(VISIBLE);
|
||||
}
|
||||
if (subtitleView != null) {
|
||||
subtitleView.setCues(null);
|
||||
}
|
||||
if (player != null) {
|
||||
if (surfaceView instanceof TextureView) {
|
||||
player.setVideoTextureView((TextureView) surfaceView);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import android.annotation.TargetApi;
|
|||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
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.
|
||||
*
|
||||
* @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) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue