Send metadata so that NPIC can receive stop events at end of playback #162
No reviewers
Labels
No labels
2230
2243
App version
Apple OS errata
Apple SDK
bug
bugsnag
build
dlt
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: chris/Cog#162
Loading…
Reference in a new issue
No description provided.
Delete branch "send-npic-stop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Otherwise, the NPIC will just show the last track stuck at the last second. There may be a better place to put this.
Before:
https://user-images.githubusercontent.com/3161292/127744232-24058a0e-5dc5-402e-86af-34bc210e85f1.mov
After
https://user-images.githubusercontent.com/3161292/127744236-79fb1553-ce30-4cfa-a365-8edd3aa5e85d.mov
(FWIW, yes, explicitly hitting stop even after playback has ended will work.)
This will likely also fix the issue where the player would be stuck with a "Paused" icon forever, even on quit and restart, if Resume playback on restart is enabled.
@NattyNarwhal Rebase onto
main
to fix GitHub Actions build.Just rebased it now. My only hesitation is this might be a hotspot that's getting called often and could make other spots sendMetadata gets called from redundant, which probably doesn't matter too much.
(I also now just started noticing the fact the NPIC playback position and the Cog position are desynced...)
You have to ask the audio player for the current playback position, as it's about 5-10 seconds behind decoding position, due to buffering.
Has this gone anywhere? Please check how the UI retrieves the playback position from the audio player, if you want to time the position reporting more accurately.
I'll check about position reporting tomorrow or over the weekend. The goal of this PR (the state in NPIC matching the controller) is complete though, and the position issue was occuring before, so it may be worth tackling in a separate PR.