iina / iina

The modern video player for macOS.
https://iina.io
GNU General Public License v3.0
37.9k stars 2.56k forks source link

Enable Screensaver While Playing Audio Files in IINA Media Player #4954

Open pritam12426 opened 4 months ago

pritam12426 commented 4 months ago

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.

low-batt commented 4 months ago

I don't see a way to use the Screen Time Framework to turn off a display?

low-batt commented 4 months ago

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?

pritam12426 commented 4 months ago

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.

low-batt commented 4 months ago

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 Lock Screen setting, yes?