Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shourtcut to easily move from player to player #37

Closed
kupiqu opened this issue Nov 17, 2017 · 14 comments
Closed

Keyboard shourtcut to easily move from player to player #37

kupiqu opened this issue Nov 17, 2017 · 14 comments

Comments

@kupiqu
Copy link

kupiqu commented Nov 17, 2017

I'd like to have a shortcut to move to next source. Would it be possible?

Also, I see in settings an option for "Toggle window media player", which at first I thought it was exactly this. But I don't see this shorcut does anything... Can you please clarify what is this functionality about?

Thank you!

@jsmitar
Copy link
Owner

jsmitar commented Nov 21, 2017

Of course

I'd like to have a shortcut to move to next source. Would it be possible?

Show the window of the current source, If this does not work for you, it could be a problem with the mpris2 interface of your mediaplayer

Also, I see in settings an option for "Toggle window media player"

@kupiqu
Copy link
Author

kupiqu commented Nov 21, 2017

Of course

Thanks!

Show the window of the current source, If this does not work for you, it could be a problem with the mpris2 interface of your mediaplayer

Oh wow, that's amazing for online players in particular! The browser may be out of focus and the player in a background tab, yet the shortcut gives you back the player :)

I also tested it in dragonplayer and works too. It doesn't seem so in SMPlayer though. I may contact its dev to let him know...

EDIT: it also works for minimized windows, for local players and via browser :)

@jsmitar
Copy link
Owner

jsmitar commented Nov 21, 2017

I also tested it in dragonplayer and works too. It doesn't seem so in SMPlayer though. I may contact its dev to let him know...

Please do it, I also use SMPlayer very often. BUGS

@kupiqu
Copy link
Author

kupiqu commented Nov 21, 2017

I just sent him an email as I did at other times before... don't have an account at sourceforge :/

@jsmitar
Copy link
Owner

jsmitar commented Nov 23, 2017

The feature is complete, try it if you want.

@kupiqu
Copy link
Author

kupiqu commented Nov 23, 2017

Awesome, works so great!

@kupiqu kupiqu closed this as completed Nov 23, 2017
@jsmitar
Copy link
Owner

jsmitar commented Nov 23, 2017

almost perfect, I found a small bug, I'll fix it soon.

@jsmitar jsmitar reopened this Nov 23, 2017
@jsmitar
Copy link
Owner

jsmitar commented Nov 23, 2017

ok fixed, check the master

@jsmitar jsmitar closed this as completed Nov 23, 2017
@kupiqu
Copy link
Author

kupiqu commented Nov 23, 2017

Thanks!

@kupiqu
Copy link
Author

kupiqu commented Nov 23, 2017

Please do it, I also use SMPlayer very often. BUGS

It isn't actually a bug in SMPlayer. Please see:

SMPlayer dev comment:

There's already code to raise the window in the mpris2 code, however it seems most desktops ignore it because they don't allow a window to go foreground on its own. The dragonplayer uses a specific function from the KDE libraries to do it (KWindowSystem::forceActiveWindow), but I can't use the KDE libraries, otherwise smplayer will depend on a lot of KDE packages.

Indeed, I see the reaction of SMPlayer in the taskbar asking for focus, but there is not special kwin rule that can give it to it automatically... That's unfortunate 

Dragonplayer works as SMPlayer dev described and browsers do too, I guess because the plasma-browser-integration extension must cover this thing among others.

Do you think there could be something Playbar could do here to give focus to non-KDE players when requested?

Many thanks in advance!

@kupiqu
Copy link
Author

kupiqu commented Nov 23, 2017

It may be possible according to SMPlayer dev:

Maybe the call to that function can be done by playbar2. According to
the KDE documentation that function should only be used by "pagers and
similar tools".

https://api.kde.org/frameworks/kwindowsystem/html/classKWindowSystem.html#aecb213d950a6615fc0e961273d72e166

@jsmitar
Copy link
Owner

jsmitar commented Nov 23, 2017

I have to think about it, there are still other things I want to improve.

Do you think there could be something Playbar could do here to give focus to non-KDE players when requested?

@kupiqu
Copy link
Author

kupiqu commented Nov 23, 2017

Sure.

It would be a very nice complement for SMPlayer (my default local media player) but it's certainly not urgent :)

If you want I can open another issue, which can stay quiet until you decide to consider it (if you eventually do).

@jsmitar
Copy link
Owner

jsmitar commented Nov 24, 2017

You can do it if you want.
So I will keep this feature in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants