Skip to content

StyledPlayerView Custom Controller Support #7962

Closed
@ahmetberkinc

Description

[REQUIRED] Searched documentation and issues

https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md

[REQUIRED] Question

When I was in Exoplayer 2.11.4 version, I was able to replace the SimpleExoPlayerView controller with app: controller_layout_id via xml. I wanted to switch to SytledPlayerView structure with Exoplayer 2.12.0 version. But when I give my old controller over the layout, the application fails. Is there any way to customize the StyledPlayerView controller?

A full bug report captured from the device

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.edittexttest, PID: 9595
    java.lang.NullPointerException: throw with null exception
        at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:147)
        at com.google.android.exoplayer2.ui.StyledPlayerControlView$TextTrackSelectionAdapter.init(StyledPlayerControlView.java:2005)
        at com.google.android.exoplayer2.ui.StyledPlayerControlView.initTrackSelectionAdapter(StyledPlayerControlView.java:1280)
        at com.google.android.exoplayer2.ui.StyledPlayerControlView.updateTrackLists(StyledPlayerControlView.java:1248)
        at com.google.android.exoplayer2.ui.StyledPlayerControlView.access$1800(StyledPlayerControlView.java:298)
        at com.google.android.exoplayer2.ui.StyledPlayerControlView$ComponentListener.onTracksChanged(StyledPlayerControlView.java:1813)
        at com.google.android.exoplayer2.ExoPlayerImpl$PlaybackInfoUpdate.lambda$run$4$ExoPlayerImpl$PlaybackInfoUpdate(ExoPlayerImpl.java:1425)
        at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$PlaybackInfoUpdate$sJrY7lA_vUJy5MdfV-ndTSxVTXI.invokeListener(Unknown Source:2)
        at com.google.android.exoplayer2.BasePlayer$ListenerHolder.invoke(BasePlayer.java:285)
        at com.google.android.exoplayer2.ExoPlayerImpl.invokeAll(ExoPlayerImpl.java:1491)
        at com.google.android.exoplayer2.ExoPlayerImpl.access$100(ExoPlayerImpl.java:56)
        at com.google.android.exoplayer2.ExoPlayerImpl$PlaybackInfoUpdate.run(ExoPlayerImpl.java:1422)
        at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:1321)
        at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:949)
        at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:913)
        at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$0$ExoPlayerImpl(ExoPlayerImpl.java:162)
        at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$c3953g1V6xPbTIQ95lEUPxO10qU.run(Unknown Source:4)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:209)
        at android.app.ActivityThread.main(ActivityThread.java:7021)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:486)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:872)
I/Process: Sending signal. PID: 9595 SIG: 9

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions