Page 1 of 1

Browser plugin / Subtitles

Posted: 16 Feb 2007 13:18
by Spellcoder
With the browser plugin you can pass the subtitle you want to use as an options when you add an item to the playlist.
However I want to give the enduser the ability to switch subtitles on/off or change the subtitle track while the video is playing. The only way to do this at the moment is to restart the video and seek to the previous position.

I would like to be able to have methods like:

vlc.video.subtitle = 2;
vlc.video.subtitleEnabled = true;

Also the ability to read which language a subtitle track is would be nice.
Something like:

languageCode = vlc.video.subtitleLanguage(streamID);

Posted: 12 Mar 2007 13:42
by Spellcoder
Thanks to jpsaman for the adding the code (changeset #19304) to change subtitles.

The first nightly with .video.subtitle support is: vlc-0.9.0-svn-20070312-0000-win32


How to use:

Selecting an subtitle stream
like vlc.audio.track the streamnumber is one higher than if set with the command-line (probably because 0 means 'off')

Code: Select all

vlc.video.subtitle = stream+1;
disable subtitle

Code: Select all

vlc.video.subtitle = 0;