-
Notifications
You must be signed in to change notification settings - Fork 0
Always seek to live stream when resuming radio playback #40
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
|
@copilot looks good, rebase from main |
I'm unable to perform a rebase as I don't have access to force push, which is required after rebasing. Could you please rebase this branch from main on your end? Alternatively, if you'd prefer, I can merge main into this branch instead (though that will create a merge commit rather than a linear history). |
|
@copilot merge main into this then |
Done. Merged main into this branch in commit |
|
@copilot this seems like a very heavy handed way of doing it by fully disposing the |
Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
Good point. Changed the approach to use |
Resuming a paused live radio stream continued from the buffered position rather than seeking to live, causing stream disruption after long pauses.
Changes
SeekToLive()method: New helper that seeks the MediaPlayer to the live edge (NaturalDuration) - a lightweight approach that avoids disposing/recreating the MediaSourcePlay()method: CallsSeekToLive()after starting playback to ensure we're at the live positionPlaybackStateChangedhandler: Detects external resume (hardware buttons, system controls) and seeks to live positionWatchdog service continues to provide recovery if stream fails to start.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.