[vlc-commits] [Git][videolan/npapi-vlc][master] Fix toggleTeletext	in 2.2 builds
    Hugo Beauzée-Luyssen 
    gitlab at videolan.org
       
    Tue May 23 18:08:37 CEST 2017
    
    
  
Hugo Beauzée-Luyssen pushed to branch master at videolan / VLC Browser Plugins
Commits:
be16cce6 by Hugo Beauzée-Luyssen at 2017-05-23T18:07:20+02:00
Fix toggleTeletext in 2.2 builds
- - - - -
2 changed files:
- activex/vlccontrol2.cpp
- npapi/npruntime/npolibvlc.cpp
Changes:
=====================================
activex/vlccontrol2.cpp
=====================================
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -1272,11 +1272,15 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
 
 STDMETHODIMP VLCVideo::toggleTeletext()
 {
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
     if( _plug->get_player().get_mp().teletext() == -1 )
         _plug->get_player().get_mp().setTeletext( 100 );
     else
         _plug->get_player().get_mp().setTeletext( -1 );
     return S_OK;
+#else
+    _plug->get_player().get_mp().toggleTeletext();
+#endif
 }
 
 STDMETHODIMP VLCVideo::get_marquee(IVLCMarquee** obj)
=====================================
npapi/npruntime/npolibvlc.cpp
=====================================
--- a/npapi/npruntime/npolibvlc.cpp
+++ b/npapi/npruntime/npolibvlc.cpp
@@ -1545,10 +1545,14 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *,
             {
                 if( argCount == 0 )
                 {
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
                     if ( p_plugin->getMD().teletext() == -1 )
                         p_plugin->getMD().setTeletext( 100 );
                     else
                         p_plugin->getMD().setTeletext( -1 );
+#else
+                    p_plugin->getMD().toggleTeletext();
+#endif
                     return INVOKERESULT_NO_ERROR;
                 }
                 return INVOKERESULT_NO_SUCH_METHOD;
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/be16cce606e26f60e1ca83a67a76bc71e7c07e96
---
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/be16cce606e26f60e1ca83a67a76bc71e7c07e96
You're receiving this email because of your account on code.videolan.org.
    
    
More information about the vlc-commits
mailing list