Captions can't be turned on using Google Assistant
@marcbaechinger is already working on this.
Since May 31, 2024.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 main branch
More version details
I'm trying to achieve the same functionality on Android TV as it was possible using ExoPlayer and MediaSessionConnector.
Previously using MediaSessionConnector.CaptionCallback it was possible to enable subtitles using Google Assistant. I can't find any references to this with Media3. Is this feature supported with on-device integration, or am I missing something?
Note: From investigation we may be able to workaround this accessing (MediaSessionCompat) MediaSession#Impl, but this field is private, and accessing this might result in unwanted behaviours. Also MediaSessionLegacyStub says: "no-op" in onSetCaptioningEnabled implementation.
Used versions:
androidx.media3: v1.3.1
katniss: v7.10.20240225.1_cl.4
OS: A10, A11
androidx.media: v1.7.0 (for compat)
Devices that reproduce the issue
Android TV and STBs
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
When the Playback is running, with mediaSession set up, use the following ADB command:
adb shell am start -a android.search.action.GLOBAL_SEARCH --es query 'enable\ captions'
Previously this invoked MediaSessionCompat#onSetCaptioningEnabled callback. (and still happening, but it's hidden)
Expected result
Callback should be accessible or exposed.
Actual result
Google Assistant says "Sorry, I can't do that on this app."
Media
https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.