use of org.jivesoftware.smackx.jingle.mediaimpl.sshare.ScreenShareMediaManager in project Smack by igniterealtime.
the class Demo method initialize.
public void initialize() {
ICETransportManager icetm0 = new ICETransportManager(xmppConnection, "10.47.47.53", 3478);
List<JingleMediaManager> mediaManagers = new ArrayList<JingleMediaManager>();
//mediaManagers.add(new JmfMediaManager(icetm0));
mediaManagers.add(new SpeexMediaManager(icetm0));
mediaManagers.add(new ScreenShareMediaManager(icetm0));
jm = new JingleManager(xmppConnection, mediaManagers);
jm.addCreationListener(icetm0);
jm.addJingleSessionRequestListener(new JingleSessionRequestListener() {
public void sessionRequested(JingleSessionRequest request) {
try {
// Accept the call
incoming = request.accept();
// Start the call
incoming.startIncoming();
} catch (XMPPException e) {
LOGGER.log(Level.WARNING, "exception", e);
}
}
});
createGUI();
}
use of org.jivesoftware.smackx.jingle.mediaimpl.sshare.ScreenShareMediaManager in project Smack by igniterealtime.
the class JingleMediaTest method testCompleteScreenShare.
public void testCompleteScreenShare() {
try {
XMPPTCPConnection x0 = getConnection(0);
XMPPTCPConnection x1 = getConnection(1);
ICETransportManager icetm0 = new ICETransportManager(x0, "stun.xten.net", 3478);
ICETransportManager icetm1 = new ICETransportManager(x1, "stun.xten.net", 3478);
JingleMediaManager jingleMediaManager0 = new ScreenShareMediaManager(icetm0);
JingleMediaManager jingleMediaManager1 = new ScreenShareMediaManager(icetm1);
List<JingleMediaManager> jml0 = new ArrayList<JingleMediaManager>();
List<JingleMediaManager> jml1 = new ArrayList<JingleMediaManager>();
jml0.add(jingleMediaManager0);
jml1.add(jingleMediaManager1);
final JingleManager jm0 = new JingleManager(x0, jml0);
final JingleManager jm1 = new JingleManager(x1, jml1);
jm1.addJingleSessionRequestListener(new JingleSessionRequestListener() {
public void sessionRequested(final JingleSessionRequest request) {
try {
JingleSession session = request.accept();
session.startIncoming();
} catch (XMPPException e) {
LOGGER.log(Level.WARNING, "exception", e);
}
}
});
JingleSession js0 = jm0.createOutgoingJingleSession(x1.getUser());
js0.startOutgoing();
Thread.sleep(150000);
js0.terminate();
Thread.sleep(6000);
x0.disconnect();
x1.disconnect();
} catch (Exception e) {
LOGGER.log(Level.WARNING, "exception", e);
}
}
Aggregations