javax.media
Interface Duration

All Known Subinterfaces:
Controller, Player, ServiceMediaHandler
All Known Implementing Classes:
DataSource, DripFeedDataSource, PullDataSource, PushDataSource, URLDataSource

public interface Duration

The Duration interface provides a way to determine the duration of the media being played by a media object. Media objects that expose a media duration implement this interface.

A Controller that supports the Duration interface posts a DurationUpdateEvent whenever its duration changes.

Version:
1.16, 97/08/23
See Also:
Controller, DurationUpdateEvent

Field Summary
static Time DURATION_UNBOUNDED
          Returned by getDuration.
static Time DURATION_UNKNOWN
          Returned by getDuration.
 
Method Summary
 Time getDuration()
          Get the duration of the media represented by this object.
 

Field Detail

DURATION_UNBOUNDED

static final Time DURATION_UNBOUNDED
Returned by getDuration.


DURATION_UNKNOWN

static final Time DURATION_UNKNOWN
Returned by getDuration.

Method Detail

getDuration

Time getDuration()
Get the duration of the media represented by this object. The value returned is the media's duration when played at the default rate. If the duration can't be determined (for example, the media object is presenting live video) getDuration returns DURATION_UNKNOWN.

Returns:
A Time object representing the duration or DURATION_UNKNOWN.


Copyright © 2011. All Rights Reserved.