java.lang.Object
uk.co.caprica.vlcj.media.SlaveApi
Behaviour pertaining to media slaves, enabling subtitle and audio tracks to be added to the media.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(MediaSlaveType type, MediaSlavePriority priority, String uri) Add an input slave to the current media.void
clear()
Remove all media slaves from the current media.get()
Get the list of media slaves added to the current media.
-
Method Details
-
add
Add an input slave to the current media.The success of this call does not indicate that the slave being added is actually valid or not, it simply associates a slave URI with the current media player (for example, a sub-title file will not be parsed and checked for validity during this call).
If the URI represents a local file, it must be of the form "file://" otherwise it will not work, so this will work:
file:///home/movies/movie.srt
This will not work:file:/home/movies/movie.srt
If you are using
File.toURI()
to generate your URI, this will not work as that method will most likely return the latter from the two above.- Parameters:
type
- type of slave to adduri
- URI of the slave to add- Returns:
true
on success;false
otherwise
-
clear
public void clear()Remove all media slaves from the current media. -
get
Get the list of media slaves added to the current media.- Returns:
- media slaves
-