spmn / vlc-win10smtc

Integrate VLC Media Player with Windows 10 System Media Transport Controls (SMTC)
GNU General Public License v3.0
46 stars 5 forks source link

Does not report current playback position #5

Closed ungive closed 2 weeks ago

ungive commented 1 month ago

Thanks for making this plugin!

Unfortunately it does not seem to report an accurate playback position.

Screenshot while debugging the values reported by WinRT (C++):

image

The timestamp has a negative value as well.

spmn commented 2 weeks ago

Hey,

Could you retest after the recent changes? At the time you opened the issue, we did not report back the playback position to Windows SMTC, so that is why you always received garbage back when querying the time position. According to #3, we should advertise the time now.

ungive commented 2 weeks ago

Code: image

During debugging:

PositionMillis=0ms LastUpdatedTimeMillis=1728239134443ms (Sunday, October 6, 2024 8:25:34.443 PM) 5 minutes ago even though I just scrubbed the song DurationMillis=216306ms (correct)

So it seems to not update when I scrub the timeline in VLC. I assume PositionMillis always stays at 0 because that's where the media started, but since it's never updated again it just stays there. Note that 0 is not wrong, together with the LastUpdatedTime you can infer the correct current timestamp.

I assume you just have to update the timeline whenever the user scrubs the song.

spmn commented 2 weeks ago

From the PR text and code, I assume it was was supposed to keep sending time updates to SMTC, but now that I take a closer look at the code, it just seems to send an update the first time a new song starts, but subsequent updates are not forwarded to SMTC. I will fix it next week

LE: nvm. you were much quicker than me :D