Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


com.oracle.sft.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.

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.

 

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

start

void start(URI... streams)
Start playing using the specified URI list. See comments for its overload function.
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"); 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.
Parameters:
streams - List of streams that can be played.

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.

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


Copyright © 2012 Oracle Corporation. All Rights Reserved.