Issue: Playback fails when we try to select all the tracks available in an audio group.
Media: https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8
Crash Log:
2019-05-30 14:15:49.249 12743-12743/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [14.12, 16.62, window=0, period=0]
com.google.android.exoplayer2.ExoPlaybackException: java.lang.ArrayIndexOutOfBoundsException: length=4; index=4
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:397)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=4; index=4
at com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection.setCheckpointValues(AdaptiveTrackSelection.java:810)
at com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection.getAllocationCheckpoints(AdaptiveTrackSelection.java:745)
at com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection.access$000(AdaptiveTrackSelection.java:37)
at com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection$Factory.createTrackSelections(AdaptiveTrackSelection.java:275)
at com.google.android.exoplayer2.trackselection.DefaultTrackSelector.selectTracks(DefaultTrackSelector.java:1451)
at com.google.android.exoplayer2.trackselection.MappingTrackSelector.selectTracks(MappingTrackSelector.java:400)
at com.google.android.exoplayer2.MediaPeriodHolder.selectTracks(MediaPeriodHolder.java:209)
at com.google.android.exoplayer2.ExoPlayerImplInternal.reselectTracksInternal(ExoPlayerImplInternal.java:1100)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:357)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
My Assumption: I am assuming that when I select all the tracks available from an audio group it will behave like adaptive (track Index = -1).
Question:
If I check the stream it has the following audio track group,
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio/stereo/en/128kbit.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo",LANGUAGE="dubbing",NAME="Dubbing",DEFAULT=NO,AUTOSELECT=YES,URI="audio/stereo/none/128kbit.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="surround",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio/surround/en/320kbit.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="surround",LANGUAGE="dubbing",NAME="Dubbing",DEFAULT=NO,AUTOSELECT=YES,URI="audio/stereo/none/128kbit.m3u8"
If I check the tracks in code then audio groups will be
- English(stereo)/English(surround) Unique Id: 1,0,0 / 1,0,1
- dubbing(stereo)/dubbing(surround) Unique Id: 1,1,0 / 1,1,1
How can we select auto for Audio ?
There could be following an option to select auto from English group (1,0,-1) or dubbing group (1,1,-1). Can we do this ? I tried but the app crashed.
How ExoPlayer is selecting the audio in case if I select auto ?
Issue: Playback fails when we try to select all the tracks available in an audio group.
Media: https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8
Crash Log:
My Assumption: I am assuming that when I select all the tracks available from an audio group it will behave like adaptive (track Index = -1).
Question:
If I check the stream it has the following audio track group,
If I check the tracks in code then audio groups will be
How can we select auto for Audio ?
There could be following an option to select auto from English group (1,0,-1) or dubbing group (1,1,-1). Can we do this ? I tried but the app crashed.
How ExoPlayer is selecting the audio in case if I select auto ?