RemoteCastPlayer: receiver stalls in buffering when a single setActiveMediaTracks request changes the audio and the text track during playback
I maintainer di solito rispondono entro 4 giorni
@tanay187 ci sta già lavorando.
Dal 18/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Version
Media3 1.11.0
More version details
- media3-cast 1.11.0,
RemoteCastPlayerwrapped inCastPlayer, with a customCastTrackSelector - play-services-cast-framework 22.3.1
Devices that reproduce the issue
- Sender: Redmi Note 8 Pro running Android 11 (also seen with a Pixel 6)
- Receiver: TV Stick (SDMC), Android TV 10, Chromecast built-in 3.72.446070
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Not tested in the demo app (the Cast demo has no CastTrackSelector, so it never sends track changes)
- Cast a DASH stream with at least two audio languages and one subtitle track, using
RemoteCastPlayerwith aCastTrackSelectorthat applies the preferred languages, for example:class LanguageCastTrackSelector : CastTrackSelector() { override fun evaluate(request: CastTrackSelectorRequest): CastTrackSelectorResult { val params = request.trackSelectionParameters fun pick(type: Int, language: String?) = request.trackGroupList.firstOrNull { it.type == type && it.getFormat(0).language == language } val audio = pick(C.TRACK_TYPE_AUDIO, params.preferredAudioLanguages.firstOrNull()) val text = pick(C.TRACK_TYPE_TEXT, params.preferredTextLanguages.firstOrNull()) val kept = request.currentlySelectedTrackGroups.filter { (it.type != C.TRACK_TYPE_AUDIO || audio == null) && (it.type != C.TRACK_TYPE_TEXT || text == null) } return request.buildResultUpon().setSelections(ImmutableSet.copyOf(kept + listOfNotNull(audio, text))).build() } } - While the receiver is playing, change the audio and the subtitle at once:
player.trackSelectionParameters = player.trackSelectionParameters.buildUpon() .setPreferredAudioLanguage("<other audio language>") .setPreferredTextLanguage("<subtitle language>") .build()RemoteCastPlayersends onesetActiveMediaTracks([audioId, textId])(a singleEDIT_TRACKS_INFOmessage). - Watch the receiver.
Expected result
The receiver switches both tracks and playback goes on.
Actual result
The receiver never resumes playback and RemoteCastPlayer stays in STATE_BUFFERING. Receiver logcat (cast_shell), with the sender log aligned on it (the two clocks are not synchronized):
- The receiver starts playing:
Effective playback rate changed from 0 to 1. - The sender sends one
setActiveMediaTracks([2, 3]): audio track 2 and text track 3. - The receiver switches the audio: it empties the audio
SourceBuffer(remove start=0 end=3826), seeks to the current position (kSeek 2054.58) and goesBUFFERING_HAVE_NOTHING. The system media session reportsSTATE_BUFFERINGwith speed 0. - It appends the new audio init segment and 4 audio segments, video and audio go back to
BUFFERING_HAVE_ENOUGH, andkPlayis logged twice. - Then nothing happens: no
Effective playback rate changed from 0 to 1, no furtherappendBufferon eitherSourceBufferfor the remaining 21 s of the capture, and the media session stays inSTATE_BUFFERING. The sender never leaves buffering.
Log excerpt attached (excerpt.txt); full sender and receiver logcats available.
Sending the same change in two requests works every time: setActiveMediaTracks with the new audio only, then, once the receiver status reports that audio as active, setActiveMediaTracks with the new subtitle. We use this as a workaround in our CastTrackSelector.
Is this a known receiver limitation? Since RemoteCastPlayer sends the whole selection in one request, should media3 (or CastTrackSelector) apply audio and text changes one after the other, or is this a CAF receiver bug to report to the Cast SDK team?
Media
Widevine-protected DASH stream, multi-period (pre-roll ad period, then main content).
Bug Report
- You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1k
- Merge medio
- 6g 4h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di androidx/media
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
CompositionPlayer.release() leaks its playback thread and FrameProcessor when no composition was setForse già presa @droid-girl l’ha presa 15 giorni fa. Apertaediting preview
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
androidx/media#3506 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
-
bug needs triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 4 giorni
-
StuckPlayerException: PLAYING_NO_PROGRESS (1.10.1)Forse già presa @tonihei l’ha presa 2 giorni fa. Apertaquestion
androidx/media#3559 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
-
[Cast] play() right after setMediaItems() is lost when the receiver already has media, so the new item loads pausedForse già presa @tanay187 l’ha presa 3 giorni fa. Aperta
androidx/media#3557 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di androidx/media
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
Vakore/ZappierGames#327 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexForse già presa @matthewalberto l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
mit-cml/appinventor-sources#4246 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CatalogueOfLife/backend#1713 ·
I maintainer di solito rispondono entro 1 giorno
-
SystemOneDecisionModel: allow sending chat_template_kwargs to /v1/systemoneForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertastatus: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
spring-projects/spring-ai#7427 ·
I maintainer di solito rispondono entro 1 giorno