|
||||||||||
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 CAFE to the other participants in a MSRP communication.
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) { ... <Create MSRPConference and add the required participants>.... // After adding all the parties, send the file by adding MSRPPlayer MSRPPlayer player = sess.createParticipant(MSRPPlayer.class, "player"); msrpConf.addParticipant(player); player.play(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 |
play(InputStream mediaStream,
String contentType,
long contentLength)
Send the contents of the stream to the participants using MSRP protocol. |
void |
play(String... streams)
Start sending the media from the specified location(s) using the MSRP protocol. |
void |
play(URI... streams)
Start sending the media from the specified location(s) using MSRP protocol. |
Methods inherited from interface org.glassfish.cafe.api.Player |
---|
getStreams, start, start, stop |
Methods inherited from interface org.glassfish.cafe.api.Participant |
---|
addAgent, getAgent, getAgents, getJoinable, getName, getNickName, removeAgent, setName, setNickName |
Method Detail |
---|
void play(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 play(URI... streams)
streams
- List of media locations to be played.void play(String... streams)
streams
- List of media locations to be played.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |