org.glassfish.cafe.api
Interface Player

All Superinterfaces:
MediaParticipant, Participant
All Known Subinterfaces:
MSRPPlayer

public interface Player
extends MediaParticipant

Represents a Player object. It can be added to the Communication object. Application can play an audio using this class.

Author:
binod
See Also:
Communication

Method Summary
 URI[] getStreams()
          A method to retrieve the streams currently being played by the player.
 void start(String... streams)
          Start playing from the specified location.
 void start(URI... streams)
          Start playing using the specified URI list.
 void stop()
          Stop the playback.
 
Methods inherited from interface org.glassfish.cafe.api.Participant
addAgent, getAgent, getAgents, getJoinable, getName, getNickName, removeAgent, setName, setNickName
 

Method Detail

start

void start(URI... streams)
Start playing using the specified URI list.

Parameters:
streams - List of URIs to be played.

start

void start(String... streams)
Start playing from the specified location. This is equivalent to calling start(URI.create(stream)); The location should be a form acceptable to URI.create. For example, to record to a file, the invocation shall be. Communication c = ...; Player p = c.getMediaParticipant(Player.class, "player-1"); p.start("file:///tmp/music.au");

Parameters:
streams - List of streams that can be played.

stop

void stop()
Stop the playback.


getStreams

URI[] getStreams()
A method to retrieve the streams currently being played by the player. If the start() hasn't been called, then this method will return null.

Returns:
List of streams currently being played.


Copyright © 2010. All Rights Reserved.