We have a live stream which has a dynamic duration. As the stream plays and we receive more stream data, the duration progresses forward and we would like to update the duration in the notification screen. However, MusicControl.updatePlayback does not seem to support supplying a duration.
We attempted to work around this by calling MusicControl.setNowPlaying with the new duration when the duration changes. However, on iPhone this causes the elapsed time to jump to 0 seconds briefly and then back to the correct elapsed time even though we call updatePlayback with the elapsed time right after. This somewhat makes sense because it doesn't seem like setNowPlaying should be used to do updates.
It would seem that to correct this issue MusicControl.updatePlayback needs to be updated to accept duration as a parameter. Is this correct or is there existing functionality that would support our use case?
We are calling setNowPlaying with the new duration which updates the duration to the appropriate time but also sets the elapsed time to 0. We then immediately call updatePlayback to update the elapsed time to the correct time. This seems hacky and likely not how the library should be used, and although it works on Android it unfortunately does not work on iPhone.
Description
We have a live stream which has a dynamic duration. As the stream plays and we receive more stream data, the duration progresses forward and we would like to update the duration in the notification screen. However,
MusicControl.updatePlayback
does not seem to support supplying a duration.We attempted to work around this by calling
MusicControl.setNowPlaying
with the new duration when the duration changes. However, on iPhone this causes the elapsed time to jump to 0 seconds briefly and then back to the correct elapsed time even though we callupdatePlayback
with the elapsed time right after. This somewhat makes sense because it doesn't seem likesetNowPlaying
should be used to do updates.It would seem that to correct this issue
MusicControl.updatePlayback
needs to be updated to accept duration as a parameter. Is this correct or is there existing functionality that would support our use case?Example code
We are calling
setNowPlaying
with the new duration which updates the duration to the appropriate time but also sets the elapsed time to 0. We then immediately callupdatePlayback
to update the elapsed time to the correct time. This seems hacky and likely not how the library should be used, and although it works on Android it unfortunately does not work on iPhone.Platform
Device