Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
628126f0 by Claudio Cambra at 2025-07-01T05:36:22+00:00
macosx: Hide video-related buttons when playing audio item

Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/macosx/windows/controlsbar/VLCMainVideoViewControlsBar.m


Changes:

=====================================
modules/gui/macosx/windows/controlsbar/VLCMainVideoViewControlsBar.m
=====================================
@@ -83,6 +83,10 @@
                            selector:@selector(playbackRateChanged:)
                                name:VLCPlayerCapabilitiesChanged
                              object:nil];
+    [notificationCenter addObserver:self
+                           selector:@selector(updateAvailableButtons:)
+                               name:VLCPlayerCurrentMediaItemChanged
+                             object:nil];
 
     [self update];
 }
@@ -219,4 +223,11 @@
     vout_Release(p_vout);
 }
 
+- (void)updateAvailableButtons:(id)sender
+{
+    const BOOL currentItemIsAudio = _playerController.currentMediaIsAudioOnly;
+    self.videoButton.hidden = currentItemIsAudio;
+    self.subtitlesButton.hidden = currentItemIsAudio;
+}
+
 @end



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/628126f0cc4205f210fc12e4ba076a9bf2fb4cfb

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/628126f0cc4205f210fc12e4ba076a9bf2fb4cfb
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to