[vlc-devel] [PATCH v2] Dim MacBook keyboard backlight during video playback on OSX

Maxime Mouchet max at maxmouchet.com
Tue May 19 23:26:37 CEST 2015


> Well, getting rid of the singleton only makes sense if we can integrate your class in one place only - my idea was to do it in VLCVoutController as you should have all events here.

>> I kept the code to manage play an pause transitions in VLCIntf (in the same
>> place as the code for iTunes and Spotify).
> Why?
>> It should also close the dataPort correctly.
>> To sum up, the expected behavior is:
>> * Dim backlight when a video is playing and entering fullscreen (in VLCVoutWindowController).
>> * Dim backlight when starting video playback in fullscreen (in intf).
> This should be possible to do in VoutWindowController as well: When video playback is started, setupVoutForWindow:… is called.
>> * Restore backlight when exiting fullscreen (in VLCVoutWindowController).
>> * Restore backlight on pause/stop,
> You want to restore the blacklight on pause as well? Why?

Well, all the code in intf is for that. My idea was to also dim and restore backlight, depending on playback status, as a kind of feedback: lights up when pause is pressed, lights down when play is pressed.

I put it intf because it seemed to be the same kind of action as controlling external media players.

But indeed it gets much simpler if we care only about fullscreen transitions, and we can have all the code in VoutWindowController :-)
If you think it’s better this way I can get rid of the play/pause transition.


Maxime Mouchet
Élève Ingénieur (FIP) 1A @ Télécom Bretagne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150519/63598379/attachment.html>

More information about the vlc-devel mailing list