|
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 MSRPPlayer
A participant that is used to send large files from container to the other participants in a MSRP communication.
Application should use the MSRPConference together with MSRPPlayer. For example:
CommunicationSession sess = ...;
MSRPConferen msrpConf = sess.createMSRPConference("confName");
MSRPPlayer msrpPlayer =
sess.createParticipant(MSRPPlayer.class, "msrpPlayer");
msrpPlayer.addDataReceiver(receiver1);
msrpPlayer.addDataReceiver(receiver2);
msrpConf.addParticipant(msrpPlayer);
URI uri = ...;
msrpPlayer.start(uri);
All these receivers will be added to the MSRPConference as participants.
Using this participant, it is also possible to send a file directly from the client web browser to the MSRP capable phones, like this:
public class PlayerServlet extends HttpServlet{
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) {
MSRPPlayer msrpPlayer = sess.createParticipant(MSRPPlayer.class, "player");
msrpConf.addParticipant(msrpPlayer);
msrpPlayer.addDataReceiver(receiver1);
...
msrpPlayer.addDataReceiver(receiverN);
player.start(request.getInputStream(), request.getContentType(),
request.getContentLength());
}
}
The corresponding HTML page snippet will be like this:
<form METHOD=POST ENCTYPE="multipart/form-data" ACTION="PlayerServlet">
<input name="myfile" type="file">
<input name="submit" type="submit">
</form>
| Method Summary | |
|---|---|
void |
addDataReceiver(UserParticipant name)Use this method to add data receivers to the MSRPPlayer before invoke it's start(...) method. |
void |
start(InputStream mediaStream, String contentType, long contentLength)Send the contents of the stream to the participants using MSRP protocol. |
void |
start(String... streams)Start sending the media from the specified location(s) using the MSRP protocol. |
void |
start(URI... streams)Start sending the media from the specified location(s) using MSRP protocol. |
| Methods inherited from interface com.oracle.sft.api.Player |
|---|
getStreams |
| 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(InputStream mediaStream,
String contentType,
long contentLength)
mediaStream - Stream containing the media content.contentType - Type of the mediacontentLength - Length of the media if known, -1 otherwise.void start(URI... streams)
Notice: only support one stream.
start in interface Playerstreams - List of media locations to be played.void start(String... streams)
Notice: only support one stream.
start in interface Playerstreams - List of media locations to be played.void addDataReceiver(UserParticipant name)
MSRPPlayer before invoke it's start(...) method.name - instance of UserParticipant.
|
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.