Version
Media3 main branch
More version details
No response
Devices that reproduce the issue
Pixel 8 Pro running Android 15
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
While implementing casting in our app, I noticed that Player.isCurrentMediaItemLive returns different values when playing locally and casting.
This is reproducible in the sample app by adding a live stream to androidx.media3.demo.cast.DemoUtil.java e.g.
samples.add(
new MediaItem.Builder()
.setUri(<LIVESTREAM_URL_HERE>)
.setMediaMetadata(
new MediaMetadata.Builder()
.setTitle("Radio Station Title")
.build())
.setMimeType(MIME_TYPE_HLS)
.setLiveConfiguration(new MediaItem.LiveConfiguration.Builder().build())
.build());
Then you just need some way to check the value of PlayerManager.currentPlayer.isCurrentMediaItemLive(), e.g. breakpoints, logs. In the sample app I've added a button that invokes this method I added to PlayerManager:
public Boolean isCurrentMediaItemLive() {
return currentPlayer.isCurrentMediaItemLive();
}
Which gets outputted in a Toast. You'll notice that the value is true when playing a live item locally, but if you start casting and check again, the value is false.
Specific repro steps in demo app in email
- Tap + FAB and select Radio Station Title
- Tap the tick FAB (bottom left button), the Toast will say "Current media item is live: true"
- Tap the cast button and start casting
- Tap the tick FAB (bottom left button), the Toast will say "Current media item is live: false" (even though its the same media item)
- Tap the cast button and stop casting
- Tap the tick FAB (bottom left button), the Toast will say "Current media item is live: true" again
Expected result
PlayerManager.currentPlayer.isCurrentMediaItemLive() returns true when casting and not casting
Actual result
PlayerManager.currentPlayer.isCurrentMediaItemLive() returns false when casting and true when not casting
Media
Will email a specific radio stream
Bug Report
Version
Media3 main branch
More version details
No response
Devices that reproduce the issue
Pixel 8 Pro running Android 15
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
While implementing casting in our app, I noticed that
Player.isCurrentMediaItemLivereturns different values when playing locally and casting.This is reproducible in the sample app by adding a live stream to
androidx.media3.demo.cast.DemoUtil.javae.g.Then you just need some way to check the value of
PlayerManager.currentPlayer.isCurrentMediaItemLive(), e.g. breakpoints, logs. In the sample app I've added a button that invokes this method I added toPlayerManager:Which gets outputted in a Toast. You'll notice that the value is true when playing a live item locally, but if you start casting and check again, the value is false.
Specific repro steps in demo app in email
Expected result
PlayerManager.currentPlayer.isCurrentMediaItemLive()returns true when casting and not castingActual result
PlayerManager.currentPlayer.isCurrentMediaItemLive()returns false when casting and true when not castingMedia
Will email a specific radio stream
Bug Report
adb bugreportto [email protected] after filing this issue.