Thank Lyubomir for suggestion, but It seems that way we can't see our video and transmitting video concurrently.
With UDP transport, I just found a way and made a demo successfully with the sample (AVreceiver2, AVtransmit2):
Step1: add one line on org.jitsi.examples. AVTransmit2.start()
// original of libjitsi code
new InetSocketAddress(remoteAddr, remoteRTPPort),
new InetSocketAddress(remoteAddr, remoteRTCPPort)));
// one line add more
mediaStream.setTarget(new MediaStreamTarget(new InetSocketAddress(
"localhost", 6666), new InetSocketAddress(
Step2: comment this block on the method: org.jitsi.impl.neomedia.MediaStreamImpl .doSetTarget()
if (removeTargets )
rtpConnectorTarget = null;
Step3: on both transmitting side and receiver side run AVReceiver2 .
But with TCP transport, that way did not work. Do you have any idea for this, pls give me suggestion. Thanks
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of Lyubomir Marinov
Sent: Monday, August 26, 2013 3:10 PM
To: Jitsi Developers
Subject: Re: [jitsi-dev] ask how to make preview while transmiting video with libjitsi
2013/8/26 Hong <firstname.lastname@example.org>:
Now I want to add a small video window (like preview) that shows what
transmitting user look like to know what the other person is seeing on
You likely want to look into libjitsi's method org.jitsi.service.neomedia.MediaService.getVideoPreviewComponent(MediaDevice,
int, int) and how Jitsi employs it.