-
Notifications
You must be signed in to change notification settings - Fork 42
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
Is it possible to play radio after screen lock ? #187
Comments
Hi, As far as I know this is still not possible with current implementation of extensions. And not properly cleaning up on the disable call will not pass the extension review. |
Maybe someday in future I will play with this. Assuming it is bug free, would you consider accept my pull request ? |
Seems that support for lock screen was added in GNOME Shell 42, see https://gjs.guide/extensions/upgrading/gnome-shell-42.html#metadata-json I added following line to metadata.json |
I added the "session-modes" line to metadata.json as well on Fedora 36 and the radio keeps playing after locking the screen! So it appears to really make a difference. Haven't tried to start/stop the playback .... |
I added it too and it works. What is however tricky would be make it configurable as it is metadata. Think it would require add session-modes to metadata and subscribe (it should exist) dbus event for lock screen taking stream close if configuration is set to stop playing on user lock screen. |
Beware that «Lock Screen Notifications» must be enabled. |
I confirm that adding |
In this state I don't consider adding it yet. First review guidelines for extension page must be addressed https://gjs.guide/extensions/review-guidelines/review-guidelines.html#session-modes. Likely whole indicator needs to be removed in lock screen, which needs some rework as well. And if this is going to be added it should be configurable in the extension settings to enable/disable |
I made lock screen behaviour configurable https://github.com/marekmosiewicz/gnome-shell-extension-radio . Added option to prefs if radio should be played or not after lock. I changed session mode and subscribe to lock event. If radio should be turn off I disable extension. I also try to add another option "resume after unlock". This however does not work for some reason. I'm not sure if it is possible with function based extension, but to subscribe for event I changed extension to be class. |
Thank you! I haven't checked it yet, but when extension gets disabled usually the signal gets disconnected. Do you start the player when you try to "resume"? |
I use this radio all the time and one thing I miss is behavior when screen locks.
It seems that shell is calling disable() when screen goes black and radio turns off :
https://stackoverflow.com/questions/23724392/my-gnome-shell-extension-stops-working-after-a-lock-unlock-screen-cycle
So it would be great if there would be preference option "Continue playing after screen lock" (I do not know how to detect difference between disabling and screen lock)
It seems also that after enabling it there is need to restart Gst stream (currently when you log on radio continues with old buffer
and gives stream error when it ends)
The text was updated successfully, but these errors were encountered: