Open Explosion-Scratch opened 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
feishin | ❌ Failed (Inspect) | Apr 1, 2024 3:04pm |
@kgarner7 I've fixed 2.i and 2.ii just now (will push in a few), also mediaSession play pause seems to work fine for me. I'll push in just a sec
🤦🏻 Didn't even see use-center-controls.ts lol
Could it maybe not be working due to the isElectron()
call?
The issue with electron vs web might be due to BrowserWindow instead of BrowserView: https://github.com/electron/electron/issues/31448#issuecomment-1002980034
Using use-center-controls isn't setting navigator.mediaSession
at all =/
(I commented out my code when testing this)
It does look like there is an issue where the first track doesn't get metadata, but it definitely sets it otherwise. And I having the actionHandler without isElectron()
doesn't seem to help either
Yeah I've been looking through it - It only seems to update when you click pause and play buttons not on skipping songs. I don't have time to work on it more right now but I can later. Some improvements I want to make though:
@kgarner7 I found it!! I was looking through MPV to see how they did it (take it from the pros): https://github.com/mpv-player/mpv/blob/7f3ca6c524d01d92f756909ccdf877bccd627808/osdep/mac/remote_command_center.swift#L148-L158
We probably need to use this on mac: https://developer.apple.com/documentation/mediaplayer/mpnowplayinginfocenter
Could use this: https://github.com/MarshallOfSound/electron-media-service
Currently only working in the web version