• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Help Me To Show Android Track Selection Dialogue

GoldenBoot

Active member
Sep 2, 2019
257
99
28
International
t.me
hi guys please any android developer help me to solve this exoplayer error

Code:
E/AndroidRuntime: FATAL EXCEPTION: main

    Process: com.mi.corns, PID: 15911

    java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.exoplayer2.trackselection.MappingTrackSelector$MappedTrackInfo com.google.android.exoplayer2.trackselection.MappingTrackSelector.ᅠ()' on a null object reference

        at com.mi.corns.DetailsActivity$o.onClick(:619)

        at android.view.View.performClick(View.java:6256)

        at android.view.View$PerformClick.run(View.java:24701)

        at android.os.Handler.handleCallback(Handler.java:789)

        at android.os.Handler.dispatchMessage(Handler.java:98)

        at android.os.Looper.loop(Looper.java:164)

        at android.app.ActivityThread.main(ActivityThread.java:6541)

        at java.lang.reflect.Method.invoke(Native Method)

        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)

        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -19

E/EGL_emulation: tid 16020: swapBuffers(550): error 0x300d (EGL_BAD_SURFACE

my setOnClickListener is below

JavaScript:
imgQuality.setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View v) {
               MappingTrackSelector.MappedTrackInfo mappedTrackInfo = trackSelector.getCurrentMappedTrackInfo();
               if (mappedTrackInfo != null) {
                   //CharSequence title = ((Button) view).getText();
                   int rendererIndex = 1;
                   int rendererType = mappedTrackInfo.getRendererType(rendererIndex);
                   boolean allowAdaptiveSelections =
                           rendererType == C.TRACK_TYPE_VIDEO
                                   || (rendererType == C.TRACK_TYPE_AUDIO
                                   && mappedTrackInfo.getTypeSupport(C.TRACK_TYPE_VIDEO)
                                   == MappingTrackSelector.MappedTrackInfo.RENDERER_SUPPORT_NO_TRACKS);
                   TrackSelectionDialogBuilder build = new TrackSelectionDialogBuilder(DetailsActivity.this, title, trackSelector, rendererIndex);
                   build.setAllowAdaptiveSelections(allowAdaptiveSelections);
                   build.build().show();
                   build.setShowDisableOption(true);
                   build.setAllowAdaptiveSelections(allowAdaptiveSelections);
               }
           }
       });

and DetailsActivity$o.onClick( :619 ) is
JavaScript:
MappingTrackSelector.MappedTrackInfo mappedTrackInfo = trackSelector.getCurrentMappedTrackInfo();
 
Last edited:
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock