npapi-vlc | branch: master | Daniel Amm <[email protected]> | Wed Dec 16 19:59:03 2015 +0100| [569f19c379f61e6cf24b8118cdd9bcb5f1e3e8ad] | committer: Jean-Baptiste Kempf
win32: add audio events for updating audio button/slider Signed-off-by: Jean-Baptiste Kempf <[email protected]> > https://code.videolan.org/videolan/npapi-vlc/commit/569f19c379f61e6cf24b8118cdd9bcb5f1e3e8ad --- common/win32_fullscreen.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/win32_fullscreen.cpp b/common/win32_fullscreen.cpp index 2f276be..2018516 100644 --- a/common/win32_fullscreen.cpp +++ b/common/win32_fullscreen.cpp @@ -423,6 +423,20 @@ void VLCControlsWnd::RegisterToVLCEvents() PostMessage(hPlayPauseButton, BM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM) RC().hPlayBitmap); PostMessage(hVideoPosScroll, (UINT) PBM_SETPOS, (WPARAM)0, 0); }); + +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 2, 0) + VP()->get_mp().eventManager().onAudioVolume([this](float vol) { + UpdateVolumeSlider( roundf(vol * 100) ); + }); + + VP()->get_mp().eventManager().onMuted([this] { + UpdateMuteButton(true); + }); + + VP()->get_mp().eventManager().onUnmuted([this] { + UpdateMuteButton(false); + }); +#endif } void VLCControlsWnd::NeedShowControls() _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
