[vlc-commits] npapi: base plugin: check if each new media requires a UI change

Hugo Beauzée-Luyssen git at videolan.org
Tue Mar 31 10:51:55 CEST 2015


npapi-vlc | branch: cleanup | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Mar 26 11:00:53 2015 +0100| [3827e61206a8f74976bc1c11add760e8f10bced5] | committer: Hugo Beauzée-Luyssen

npapi: base plugin: check if each new media requires a UI change

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=3827e61206a8f74976bc1c11add760e8f10bced5
---

 npapi/vlcplugin_base.cpp |    5 +++++
 vlcpp                    |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
index a03e488..d5710a9 100644
--- a/npapi/vlcplugin_base.cpp
+++ b/npapi/vlcplugin_base.cpp
@@ -233,6 +233,11 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
     /* new APIs */
     p_scriptClass = RuntimeNPClass<LibvlcRootNPObject>::getClass();
 
+    // Update the UI if required when we switch media
+    m_player.mlp().eventManager().onNextItemSet([this](VLC::MediaPtr) {
+        update_controls();
+    });
+
     return NPERR_NO_ERROR;
 }
 
diff --git a/vlcpp b/vlcpp
index 51d0208..4b27796 160000
--- a/vlcpp
+++ b/vlcpp
@@ -1 +1 @@
-Subproject commit 51d0208f07abc7961670762e3e112f56e558cb9d
+Subproject commit 4b27796d85422e3da1238f6bb64c56b089ada55b



More information about the vlc-commits mailing list