Commit ff642d69 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Implement vlc.video.toggleTeletext() JS API method

parent 5637cbe2
......@@ -444,6 +444,9 @@ library AXVLC
[helpstring("take video snapshot and save it into picture object.")]
HRESULT takeSnapshot([out, retval] IPictureDisp** picture);
[helpstring("toggle teletext transparent state.")]
HRESULT toggleTeletext();
};
[
......
......@@ -2539,6 +2539,32 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
return hr;
};
STDMETHODIMP VLCVideo::toggleTeletext()
{
libvlc_instance_t* p_libvlc;
HRESULT hr = _p_instance->getVLC(&p_libvlc);
if( SUCCEEDED(hr) )
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_media_instance_t *p_md = libvlc_playlist_get_media_instance(p_libvlc, &ex);
if( ! libvlc_exception_raised(&ex) )
{
libvlc_toggle_teletext(p_md, &ex);
libvlc_media_instance_release(p_md);
if( ! libvlc_exception_raised(&ex) )
{
return NOERROR;
}
}
_p_instance->setErrorInfo(IID_IVLCVideo, libvlc_exception_get_message(&ex));
libvlc_exception_clear(&ex);
return E_FAIL;
}
return hr;
};
/*******************************************************************************/
VLCControl2::VLCControl2(VLCPlugin *p_instance) :
......
......@@ -530,6 +530,7 @@ public:
STDMETHODIMP put_teletext(long);
STDMETHODIMP takeSnapshot(LPPICTUREDISP*);
STDMETHODIMP toggleFullscreen();
STDMETHODIMP toggleTeletext();
protected:
HRESULT loadTypeInfo();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment