public abstract class Media extends Object
MediaManager
,
MediaPlayer
Modifier | Constructor and Description |
---|---|
protected |
Media(Locator locator)
Create a
Media object. |
Modifier and Type | Method and Description |
---|---|
abstract void |
addMarker(String markerName,
double presentationTime)
Adds a marker to the media playback.
|
protected void |
addTrack(Track track)
Adds a
Track . |
Locator |
getLocator()
Gets the
Locator which was the source of the media. |
abstract Map<String,Double> |
getMarkers()
Get the markers of the media.
|
List<Track> |
getTracks()
Gets the tracks found in the media.
|
abstract void |
removeAllMarkers()
Removes all markers, added programmatically, from the media playback.
|
abstract double |
removeMarker(String markerName)
Removes a marker by name.
|
String |
toString() |
protected Media(Locator locator)
Media
object.locator
- Locator
of the Media
IllegalArgumentException
- if locator
is null
.public abstract void addMarker(String markerName, double presentationTime)
markerName
- Arbitrary name of the markerpresentationTime
- Presentation time for the markerIllegalArgumentException
- if markerName
is null
or presentationTime
is negative.public abstract double removeMarker(String markerName)
markerName
- Name of the markerIllegalArgumentException
- if markerName
is null
.public abstract void removeAllMarkers()
public List<Track> getTracks()
null
if no tracks have yet been encountered while scanning
the media. The returned List
us unmodifiable.null
if no tracks found.public abstract Map<String,Double> getMarkers()
Map
is unmodifiable.null
if no markers found.public Locator getLocator()
Locator
which was the source of the media.Locator
.protected void addTrack(Track track)
Track
.IllegalArgumentException
- if track
is
null
.Copyright © 2020. All rights reserved.