-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Enable Screensaver While Playing Audio Files in IINA Media Player #4954
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
Comments
I don't see a way to use the Screen Time Framework to turn off a display? |
Thanks for rephrasing the issue. Sorry I didn't understand the initial request. Indeed IINA does not distinguish between playing video vs. playing audio and always establishes a kIOPMAssertionTypeNoDisplaySleep assertion with the macOS power management system when playback is in progress. The user should be able to control whether IINA prevents the display from sleeping separately for audio and video playback. In general there can be a reason why an audio player might want to prevent the display from sleeping. For example, some players support displaying lyrics. There are requests for IINA to add that feature. When you say "enable the screensaver" you mean not block it from automatically starting, yes? |
I don't have extensive knowledge in Swift or macOS development. I noticed that the IINA application can distinguish between audio and video files. My request is: if a audio file does not contain subtitles or lyrics, could we enable the screensaver while playing audio? In the future, it would be great if this feature could be added to IINA. This enhancement would allow users to enjoy their audio content without worrying about screen burn-in or unnecessary battery drain, while still providing a seamless viewing experience when subtitles or lyrics are present. |
By "enable the screensaver" you don't mean "start the screen saver", you mean IINA should stop blocking the screen saver from starting after the inactivity timeout configured in the macOS |
This commit will: - Add new settings preventDisplaySleepForAudio and preventDisplaySleepForVideo - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Require display to stay on while actively playing video" checkbox to the settings window General tab - Add a similar checkbox for playing audio - Change the PlayerCore.checkStatusForSleep method to support the new settings - Add logging to SleepPreventer
This commit will: - Add new settings preventDisplaySleepForAudio and preventDisplaySleepForVideo - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Require display to stay on while actively playing video" checkbox to the settings window General tab - Add a similar checkbox for playing audio - Change the PlayerCore.checkStatusForSleep method to support the new settings - Add logging to SleepPreventer
This commit will: - Add new settings preventScreenSaver and allowScreenSaverForAudio - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Prevent screen saver from starting while playing" checkbox with a "Not while in Music Mode or only playing audio" subordinate checkbox to the settings window General tab - Change the PlayerCore.checkStatusForSleep method to support the new settings - Change SleepPreventer to use ProcessInfo activities instead of IOPMAssertionCreateWithName - Add logging to SleepPreventer - Remove the "Cannot prevent display sleep!" alert along with the associated suppressCannotPreventDisplaySleep preference. This allows the user to control whether IINA prevents the screen saver from starting when in music mode or just playing audio or allow the screen saver to start and the display to power off and only prevent the system from sleeping. By default IINA will prevent the screen saver from starting when in music mode or playing audio to match the current behavior.
This commit will: - Add new settings preventDisplaySleepForAudio and preventDisplaySleepForVideo - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Require display to stay on while actively playing video" checkbox to the settings window General tab - Add a similar checkbox for playing audio - Change the PlayerCore.checkStatusForSleep method to support the new settings - Add logging to SleepPreventer
This commit will: - Add new settings preventScreenSaver and allowScreenSaverForAudio - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Prevent screen saver from starting while playing" checkbox with a "Not while in Music Mode or only playing audio" subordinate checkbox to the settings window General tab - Change the PlayerCore.checkStatusForSleep method to support the new settings - Change SleepPreventer to use ProcessInfo activities instead of IOPMAssertionCreateWithName - Add logging to SleepPreventer - Remove the "Cannot prevent display sleep!" alert along with the associated suppressCannotPreventDisplaySleep preference. This allows the user to control whether IINA prevents the screen saver from starting when in music mode or just playing audio or allow the screen saver to start and the display to power off and only prevent the system from sleeping. By default IINA will prevent the screen saver from starting when in music mode or playing audio to match the current behavior.
This commit will: - Add new settings preventDisplaySleepForAudio and preventDisplaySleepForVideo - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Require display to stay on while actively playing video" checkbox to the settings window General tab - Add a similar checkbox for playing audio - Change the PlayerCore.checkStatusForSleep method to support the new settings - Add logging to SleepPreventer Close enable screensaver while playing audio files, #4954 This commit will: - Add new settings preventScreenSaver and allowScreenSaverForAudio - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Prevent screen saver from starting while playing" checkbox with a "Not while in Music Mode or only playing audio" subordinate checkbox to the settings window General tab - Change the PlayerCore.checkStatusForSleep method to support the new settings - Change SleepPreventer to use ProcessInfo activities instead of IOPMAssertionCreateWithName - Add logging to SleepPreventer - Remove the "Cannot prevent display sleep!" alert along with the associated suppressCannotPreventDisplaySleep preference. This allows the user to control whether IINA prevents the screen saver from starting when in music mode or just playing audio or allow the screen saver to start and the display to power off and only prevent the system from sleeping. By default IINA will prevent the screen saver from starting when in music mode or playing audio to match the current behavior.
This commit will: - Add new settings preventScreenSaver and allowScreenSaverForAudio - Change the PlayerCore checkCurrentMediaIsAudio method into an isAudio PlaybackInfo property - Add a "Prevent screen saver from starting while playing" checkbox with a "Not while in Music Mode or only playing audio" subordinate checkbox to the settings window General tab - Change the PlayerCore.checkStatusForSleep method to support the new settings - Change SleepPreventer to use ProcessInfo activities instead of IOPMAssertionCreateWithName - Add logging to SleepPreventer - Remove the "Cannot prevent display sleep!" alert along with the associated suppressCannotPreventDisplaySleep preference. This allows the user to control whether IINA prevents the screen saver from starting when in music mode or just playing audio or allow the screen saver to start and the display to power off and only prevent the system from sleeping. By default IINA will prevent the screen saver from starting when in music mode or playing audio to match the current behavior.
This is exactly what I need (and vote for). Please implement this as an option in IINA's settings: "Allow screensaver while playing audio/ .m3u8 streams". Worldwise, this will save a LOT of energy. Thank you! |
THANK YOU SO MUCH! ❤ |
Support was added in IINA 1.4.0-beta1. |
Summary:
I would like to request an enhancement for the IINA media player on Mac to enable the screensaver while playing audio files. This feature would allow users to conserve energy and prevent screen burn-in when only audio playback is needed.
Description:
Currently, IINA disables the screensaver for both video and audio playback. While this is beneficial for video files to prevent interruptions, it is not necessary for audio files.
The text was updated successfully, but these errors were encountered: