mirror of
https://github.com/samsonjs/media.git
synced 2026-03-28 09:55:48 +00:00
Fix StyledPlayerView detachment
Issue: #8985 #minor-release PiperOrigin-RevId: 375913914
This commit is contained in:
parent
614f9d8d55
commit
4b0c987675
2 changed files with 5 additions and 0 deletions
|
|
@ -64,6 +64,10 @@
|
|||
* Keep subtitle language features embedded (e.g. rubies & tate-chu-yoko)
|
||||
in `Cue.text` even when `SubtitleView#setApplyEmbeddedStyles()` is
|
||||
false.
|
||||
* UI
|
||||
* Fix `NullPointerException` in `StyledPlayerView` that could occur after
|
||||
calling `StyledPlayerView.setPlayer(null)`
|
||||
([#8985](https://github.com/google/ExoPlayer/issues/8985)).
|
||||
|
||||
### 2.14.0 (2021-05-13)
|
||||
|
||||
|
|
|
|||
|
|
@ -579,6 +579,7 @@ public class StyledPlayerView extends FrameLayout implements AdViewProvider {
|
|||
}
|
||||
@Nullable Player oldPlayer = this.player;
|
||||
if (oldPlayer != null) {
|
||||
oldPlayer.removeListener(componentListener);
|
||||
if (surfaceView instanceof TextureView) {
|
||||
oldPlayer.clearVideoTextureView((TextureView) surfaceView);
|
||||
} else if (surfaceView instanceof SurfaceView) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue