RemoteCastPlayer: receiver stalls in buffering when a single setActiveMediaTracks request changes the audio and the text track during playback
Los mantenedores suelen responder en 4 días
@tanay187 ya está trabajando en esto.
Desde el 18/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1k
- Merge medio
- 6 d 4 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de androidx/media
-
bug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 4 días
-
CompositionPlayer.release() leaks its playback thread and FrameProcessor when no composition was setPosiblemente ocupada @droid-girl la tomó hace 15 días. Abiertoediting preview
Dificultad 2/5 Medio día Aptitud para principiantes 62/100
androidx/media#3506 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 4 días
-
bug needs triage
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Los mantenedores suelen responder en 4 días
-
StuckPlayerException: PLAYING_NO_PROGRESS (1.10.1)Posiblemente ocupada @tonihei la tomó hace 2 días. Abiertoquestion
androidx/media#3559 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 4 días
-
[Cast] play() right after setMediaItems() is lost when the receiver already has media, so the new item loads pausedPosiblemente ocupada @tanay187 la tomó hace 3 días. Abierto
androidx/media#3557 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 4 días
Todos los issues de androidx/media
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
Vakore/ZappierGames#327 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPosiblemente ocupada @matthewalberto la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
mit-cml/appinventor-sources#4246 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CatalogueOfLife/backend#1713 ·
Los mantenedores suelen responder en 1 día
-
SystemOneDecisionModel: allow sending chat_template_kwargs to /v1/systemonePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertostatus: waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
spring-projects/spring-ai#7427 ·
Los mantenedores suelen responder en 1 día