ytmdesktop / ytmdesktop

A Desktop App for YouTube Music
https://ytmdesktop.app
GNU General Public License v3.0
3.8k stars 441 forks source link

Pause on application start preventing Shortcut/Media keys to continue music #1165

Open Sickjuicy opened 11 months ago

Sickjuicy commented 11 months ago

Consent

Current Behavior

If you start the app and dont click in it it dont use the shortcuts or media keys to start playing the music.

Expected Behavior

I start the without clicking on the play button and only use media key to controll it.

Steps To Reproduce

start the app use media keys

YTMDesktop

v2 RC 3

OS

Windows

OS Version

11

Arch

x64

Installation way

setup.exe

Anything else?

i dont know if it is a bug or whould be a feature.

NovusTheory commented 11 months ago

You have the "Pause on application start" setting enabled and by default this is also true. This setting utilizes the blocked autoplay feature of chromium and requires document interaction to activate autoplay features. This does inherently block your shortcuts and media keys from working. Unrelated to that setting though you still need to start some sort of song for the media keys to be registered.

Sickjuicy commented 11 months ago

is there any why I can baypass the document interaction with the "Pause on application start" setting on?

NovusTheory commented 11 months ago

Unfortunately no. Right before we released v2.0.0-rc.1 we modified the functionality to utilize autoplay blocking because it provided a better UX. The previous one would try to pause the song as quickly as possible when it played which often ended up with the song playing for 1 second

Sickjuicy commented 11 months ago

Oh okey are you planning to redo it someday or is it considered done?

My idea would be so switch to the next song and back instead of play pause, or is there a song reset function.

NovusTheory commented 11 months ago

This is likely considered a final implementation as it provides the best UX and plays nicely with YTM showing a start playback popup. The problem is playing for 1 second as you will audibly hear the song while it plays for that one second as we quickly pause it which isn't a great experience. Resetting the song isn't the issue as we can seek to the beginning.

Sickjuicy commented 10 months ago

Would it be posibile to have an option to toggle off the blue start play popup?

NovusTheory commented 3 months ago

Linked pull request that implements a custom media service has functionality which will enable being able to start the music from a launch state