|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Player
Represents a Player object. It can be added to the Communication
object. Application can play an audio using this class.
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. |
Methods inherited from interface com.oracle.sft.api.MediaParticipant |
---|
stop |
Methods inherited from interface com.oracle.sft.api.Participant |
---|
addAgent, getAgent, getAgents, getExtension, getJoinable, getName, getNickName, removeAgent, setName, setNickName |
Method Detail |
---|
void start(URI... streams)
streams
- List of URIs to be played.void start(String... streams)
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");
In this way, p.start(uris) can be used only when involved media resource is reserved, such as, bean can call it in CommunicationEvent.ESTABLISHED or MEDIA_RESERVED or EARLY_MEDIA_RESERVED. Another simpler way is as like: Communication c = ...; UserParticipant party = c.getInitiator(); //All UserParticipant support this way, not limited to initiator. initiator.getPlayer().start(uris);
By this way, application can play media not only when involved media resource is reserved, but also when no media resource is prepared, such as in JOINING event of a UserParticipant related. In later situation, SFT will first reserve media resource then play media once resource is ready.streams
- List of streams that can be played.URI[] getStreams()
start()
hasn't been called, then this method will return null.
|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2012 Oracle Corporation. All Rights Reserved.