-
Method Summary
Modifier and TypeMethodDescriptionboolean
addSlave
(MediaSlaveType type, String uri, boolean select) Add an input slave to the current media.events()
Delegated behaviour pertaining to the associated media events.info()
Delegated behaviour pertaining to the associated media information.boolean
isValid()
Is the media valid?meta()
Delegated behaviour pertaining to the associated media meta data.newMedia()
Create a newMedia
component for the current media.Create a newMediaRef
for the current media.options()
Delegated behaviour pertaining to media options.parsing()
Delegated behaviour pertaining to parsing of the associated media.boolean
Set new media and play it.boolean
play
(CallbackMedia callbackMedia, String... options) Set new media and play it.boolean
Set new media and play it.boolean
Prepare new media (set it, do not play it).boolean
prepare
(CallbackMedia callbackMedia, String... options) Prepare new media (set it, do not play it).boolean
Prepare new media (set it, do not play it).void
reset()
Reset the media (i.e.slaves()
Delegated behaviour pertaining to media slaves for the associated media.boolean
Set new media, play it, and wait for it to start playing (or error).boolean
start
(CallbackMedia callbackMedia, String... options) Set new media, play it, and wait for it to start playing (or error).boolean
Set new media, play it, and wait for it to start playing (or error).boolean
startPaused
(String mrl, String... options) Set new media, play it, and wait for it to start playing (or error), pausing immediately on the first frame.boolean
startPaused
(CallbackMedia callbackMedia, String... options) Set new media, play it, and wait for it to start playing (or error), pausing immediately on the first frame.boolean
startPaused
(MediaRef mediaRef, String... options) Set new media, play it, and wait for it to start playing (or error), pausing immediately on the first frame.subitems()
Delegated behaviour pertaining to the associated media subitems.
-
Method Details
-
prepare
-
play
-
start
Set new media, play it, and wait for it to start playing (or error).This method should be used only when the media player is in a stopped state, otherwise behaviour is undefined.
- Parameters:
mrl
- media resource locatoroptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
prepare
Prepare new media (set it, do not play it).- Parameters:
callbackMedia
- callback mediaoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
play
Set new media and play it.- Parameters:
callbackMedia
- callback mediaoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
start
Set new media, play it, and wait for it to start playing (or error).This method should be used only when the media player is in a stopped state, otherwise behaviour is undefined.
- Parameters:
callbackMedia
- callback mediaoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
prepare
Prepare new media (set it, do not play it).The supplied
MediaRef
is not kept by this component and must be released by the caller when the caller no longer has any use for it.- Parameters:
mediaRef
- media referenceoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
play
Set new media and play it.The supplied
MediaRef
is not kept by this component and must be released by the caller when the caller no longer has any use for it.- Parameters:
mediaRef
- media referenceoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
start
Set new media, play it, and wait for it to start playing (or error).This method should be used only when the media player is in a stopped state, otherwise behaviour is undefined.
The supplied
MediaRef
is not kept by this component and must be released by the caller when the caller no longer has any use for it.- Parameters:
mediaRef
- media referenceoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
startPaused
Set new media, play it, and wait for it to start playing (or error), pausing immediately on the first frame.This method should be used only when the media player is in a stopped state, otherwise behaviour is undefined.
Setting media is now an asynchronous operation.
- Parameters:
mrl
- media resource locatoroptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
startPaused
Set new media, play it, and wait for it to start playing (or error), pausing immediately on the first frame.This method should be used only when the media player is in a stopped state, otherwise behaviour is undefined.
Setting media is now an asynchronous operation.
- Parameters:
callbackMedia
- callback mediaoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
startPaused
Set new media, play it, and wait for it to start playing (or error), pausing immediately on the first frame.This method should be used only when the media player is in a stopped state, otherwise behaviour is undefined.
The supplied
MediaRef
is not kept by this component and must be released by the caller when the caller no longer has any use for it.Setting media is now an asynchronous operation.
- Parameters:
mediaRef
- media referenceoptions
- zero or more options to attach to the new media- Returns:
true
if successful;false
on error
-
reset
public void reset()Reset the media (i.e. unset it). -
addSlave
Add an input slave to the current media.See
SlaveApi.add(MediaSlaveType, MediaSlavePriority, String)
for further important information regarding this method.- Parameters:
type
- type of slave to adduri
- URI of the slave to addselect
-true
if this slave should be automatically selected when added- Returns:
true
on success;false
otherwise
-
newMedia
-
newMediaRef
-
isValid
public boolean isValid()Is the media valid?This method could be used to check there is media before using the various behaviours.
- Returns:
true
if there is a valid media;false
if there is not
-
events
Delegated behaviour pertaining to the associated media events.- Returns:
- media event behaviour
-
info
Delegated behaviour pertaining to the associated media information.- Returns:
- media information behaviour
-
meta
Delegated behaviour pertaining to the associated media meta data.- Returns:
- media meta data behaviour
-
options
Delegated behaviour pertaining to media options.- Returns:
- media option behaviour
-
parsing
Delegated behaviour pertaining to parsing of the associated media.- Returns:
- parsing behaviour
-
slaves
Delegated behaviour pertaining to media slaves for the associated media.- Returns:
- media slave behaviour
-
subitems
Delegated behaviour pertaining to the associated media subitems.- Returns:
- subitem behaviour
-