Send metadata so that NPIC can receive stop events at end of playback #162

Merged
NattyNarwhal merged 2 commits from send-npic-stop into main 2021-09-25 05:05:28 -03:00
NattyNarwhal commented 2021-07-31 11:10:18 -04:00 (Migrated from github.com)

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

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
NattyNarwhal commented 2021-07-31 11:11:04 -04:00 (Migrated from github.com)

(FWIW, yes, explicitly hitting stop even after playback has ended will work.)

(FWIW, yes, explicitly hitting stop even after playback has ended will work.)
kode54 commented 2021-08-08 16:30:53 -04:00 (Migrated from github.com)

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.

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.
nevack commented 2021-08-08 16:41:52 -04:00 (Migrated from github.com)

@NattyNarwhal Rebase onto main to fix GitHub Actions build.

@NattyNarwhal Rebase onto `main` to fix GitHub Actions build.
NattyNarwhal commented 2021-08-08 16:59:33 -04:00 (Migrated from github.com)

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...)

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...)
kode54 commented 2021-08-08 17:57:20 -04:00 (Migrated from github.com)

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.

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.
kode54 commented 2021-09-23 21:45:22 -03:00 (Migrated from github.com)

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.

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.
NattyNarwhal commented 2021-09-23 23:25:56 -03:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: chris/Cog#162
No description provided.