[vlc-commits] NPAPI: fix browser events propagation

Jean-Baptiste Kempf git at videolan.org
Mon Sep 17 15:08:52 CEST 2012


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep 17 15:08:20 2012 +0200| [affc79fc98432f800e737411075398df17fbdc69] | committer: Jean-Baptiste Kempf

NPAPI: fix browser events propagation

Close #7483

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

 npapi/vlcplugin_base.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
index cbe866c..3f6a00c 100644
--- a/npapi/vlcplugin_base.cpp
+++ b/npapi/vlcplugin_base.cpp
@@ -545,6 +545,13 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
     if( !events.init() )
         return NPERR_GENERIC_ERROR;
 
+    libvlc_media_player_t *p_md = getMD();
+    if( p_md ) {
+      libvlc_event_manager_t *p_em;
+      p_em = libvlc_media_player_event_manager( getMD() );
+      events.hook_manager( p_em, this );
+    }
+    
     return NPERR_NO_ERROR;
 }
 



More information about the vlc-commits mailing list