-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow MediaController to set local configuration (e.g. Uri) to start playback #282
Comments
I am facing the exact same issue. Not playing when using MediaController. |
@jakoss
|
@microkatz Thanks, that made it work. While i understand the reason behind that design - this definitely should be documented :) |
@jakoss However, noted about the clarity and thank you for your input! |
Besides the link @microkatz provided above, there is also currently still work being done to document various use cases on developer.android.com.
More generally, we received multiple questions for this exact problem and we are thinking about ways to improve the default behavior. For example, the security concern is really only relevant for a session accidentally publishing their media uris to all other controller apps. But it seems legit to assume that a controller can create a I'll mark it as an enhancement to improve the default out-of-the-box logic. (Ideally, we would then not even need to document this issue as prominently as we should now). |
When initiated by MediaController, it should be possible for `MediaSession` to pass `MediaItems` to the `Player` if they have `LocalConfiguration`. In such case, it is not required to override `MediaSession.Callback.onAddMediaItems`, because the new current default implementation will handle it. However, in other cases, MediaItem.toBundle() will continue to strip the LocalConfiguration information. Issue: #282 #minor-release PiperOrigin-RevId: 537993460
When initiated by MediaController, it should be possible for `MediaSession` to pass `MediaItems` to the `Player` if they have `LocalConfiguration`. In such case, it is not required to override `MediaSession.Callback.onAddMediaItems`, because the new current default implementation will handle it. However, in other cases, MediaItem.toBundle() will continue to strip the LocalConfiguration information. Issue: androidx/media#282 #minor-release PiperOrigin-RevId: 537993460
When initiated by MediaController, it should be possible for `MediaSession` to pass `MediaItems` to the `Player` if they have `LocalConfiguration`. In such case, it is not required to override `MediaSession.Callback.onAddMediaItems`, because the new current default implementation will handle it. However, in other cases, MediaItem.toBundle() will continue to strip the LocalConfiguration information. Issue: #282 RELEASENOTES.md modified in cherrypick PiperOrigin-RevId: 537993460 (cherry picked from commit d9764c1)
When initiated by MediaController, it should be possible for `MediaSession` to pass `MediaItems` to the `Player` if they have `LocalConfiguration`. In such case, it is not required to override `MediaSession.Callback.onAddMediaItems`, because the new current default implementation will handle it. However, in other cases, MediaItem.toBundle() will continue to strip the LocalConfiguration information. Issue: androidx/media#282 #minor-release PiperOrigin-RevId: 537993460 (cherry picked from commit bcddaf2)
@microkatz awesome, thanks. So as far as i understand - i can now expect that my original code should work without implementing the |
It should. The original code should work without implementing |
Media3 Version
Media3 1.0.0
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Reproduction project: repro.zip
I created PlaybackService by mirroring the example from website:
Then i setup MediaController in Activity like this:
Then i try to set new item to play like this:
In attached reproduction app you can click "Play by service" and literally nothing happens (logs are empty too, even with
EventLogger
setup. It's seems like the command passed through, but the playback never started.Playing via local exoplayer works properly as presented in the "Play locally" button
Expected result
I should be able to set new media item with HLS content via
MediaController
Actual result
Nothing happens, log is empty. Player have no error. It seems like after trying to play item player instantly goes to ENDED state without particular reason
Media
https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: