A media list player can be used with an embedded media player (without this a native video window will be opened when video is played).
The native media list player will automatically deal properly with media that has subitems (like YouTube movies), so simply adding an ordinary MRL/URL is all that is needed for such media.
-
Constructor Summary
ConstructorsConstructorDescriptionMediaListPlayer
(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance) Create a new media list player. -
Method Summary
Modifier and TypeMethodDescriptioncontrols()
events()
list()
uk.co.caprica.vlcj.binding.internal.libvlc_media_list_player_t
Provide access to the native media player instance.void
release()
Release the media player, freeing all associated (including native) resources.status()
void
Submit a task for asynchronous execution.userData()
Get the user data associated with the media player.void
Set user data to associate with the media player.
-
Constructor Details
-
MediaListPlayer
public MediaListPlayer(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance) Create a new media list player.- Parameters:
libvlcInstance
- libvlc instance
-
-
Method Details
-
controls
-
events
-
list
-
mediaPlayer
-
status
-
userData
-
userData
Set user data to associate with the media player.- Parameters:
userData
- user data
-
submit
Submit a task for asynchronous execution.This is useful in particular for event handling code as native events are generated on a native event callback thread and it is not allowed to call back into LibVLC from this callback thread. If you do, either the call will be ineffective, strange behaviour will happen, or a fatal JVM crash may occur.
To mitigate this, those tasks can be offloaded from the native thread, serialised and executed using this method.
- Parameters:
r
- task to execute
-
release
public void release()Release the media player, freeing all associated (including native) resources. -
mediaListPlayerInstance
public uk.co.caprica.vlcj.binding.internal.libvlc_media_list_player_t mediaListPlayerInstance()Provide access to the native media player instance.This is exposed on the interface as an implementation side-effect, ordinary applications are not expected to use this.
- Returns:
- media player instance
-