Java DTV API 1.3
18-Nov-2009

com.sun.dtv.media.timeline
Interface MediaTimePositionControl

All Superinterfaces:
Control

public interface MediaTimePositionControl
extends Control

Control to set and retrieve the mediaTime for stream media The maximum duration of the media can be retrieved from the Duration interface if it is implemented by the media type.

See Also:
to find out the duration for a media, for the specification of media time

Method Summary
 void addMediaTimeChangeListener(MediaTimeChangeListener listener)
          Adds a MediaTimeChangeListener to the Control, the player will raise an event if the media time is changed with the setMediaTimePosition method.
 int addMediaTimeListener(MediaTimeListener listener, Time time)
          Adds a MediaTimeListener to the Control, the player will raise an event if the media reaches the given Time, the event will have the ID that is given back during the registration process for easier identification and management on the application level The system is responsible to raise the event as close as possible to the given Time.
 Time getMediaTimePosition()
          Returns the mediaTime of the media currently handled by the Player.
 void removeMediaTimeChangeListener(MediaTimeChangeListener listener)
          Removes a MediaTimeChangeListener from a player.
 boolean removeMediaTimeEventID(int ID)
          Removes the given ID from the system.
 void removeMediaTimeListener(MediaTimeListener listener)
          Removes a MediaTimeListener from a player and all the associated data (times and IDs) from the system.
 Time setMediaTimePosition(Time mediaTime)
          Sets the media time as closely as possible to the requested media time.
 
Methods inherited from interface javax.media.Control
getControlComponent
 

Method Detail

setMediaTimePosition

Time setMediaTimePosition(Time mediaTime)
Sets the media time as closely as possible to the requested media time. Allows to jump back and forth in the media. Invocation of this method must raise a MediaTimeChangeEvent when the action is performed.

Parameters:
mediaTime - the desired mediaTime.
Returns:
the position in time that was actually set.
See Also:
getMediaTimePosition()

getMediaTimePosition

Time getMediaTimePosition()
Returns the mediaTime of the media currently handled by the Player.

Returns:
the current mediaTime of the media.
See Also:
setMediaTimePosition(javax.media.Time)

addMediaTimeListener

int addMediaTimeListener(MediaTimeListener listener,
                         Time time)
Adds a MediaTimeListener to the Control, the player will raise an event if the media reaches the given Time, the event will have the ID that is given back during the registration process for easier identification and management on the application level The system is responsible to raise the event as close as possible to the given Time.

Parameters:
listener - the listener to be added.
time - when the player should raise the event.
Returns:
ID an identifier provided by the Control to identify the event.
See Also:
removeMediaTimeListener(com.sun.dtv.media.timeline.MediaTimeListener)

removeMediaTimeListener

void removeMediaTimeListener(MediaTimeListener listener)
Removes a MediaTimeListener from a player and all the associated data (times and IDs) from the system.

Parameters:
listener - to be removed from the system.
See Also:
addMediaTimeListener(com.sun.dtv.media.timeline.MediaTimeListener, javax.media.Time)

removeMediaTimeEventID

boolean removeMediaTimeEventID(int ID)
Removes the given ID from the system. Must be an ID that was given as return value from the addMediaTimeListener

Parameters:
ID - of the event that has to removed from the system.
Returns:
true is remove was succesful, false if the ID is not present in the system.

addMediaTimeChangeListener

void addMediaTimeChangeListener(MediaTimeChangeListener listener)
Adds a MediaTimeChangeListener to the Control, the player will raise an event if the media time is changed with the setMediaTimePosition method.

Parameters:
listener - the listener to be added.
See Also:
setMediaTimePosition(javax.media.Time), removeMediaTimeListener(com.sun.dtv.media.timeline.MediaTimeListener)

removeMediaTimeChangeListener

void removeMediaTimeChangeListener(MediaTimeChangeListener listener)
Removes a MediaTimeChangeListener from a player.

Parameters:
listener - to be removed from the system.
See Also:
addMediaTimeChangeListener(com.sun.dtv.media.timeline.MediaTimeChangeListener)

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.