Hi,
I’m using the following code to make
a video call, but the video source does’nt show up
in my div with id video. What should I do?
-----------------------------------------------------------
- Before setting up the call:
core.videoPolicy.automaticallyAccept
= true;
core.videoDevice = $("#cam option:selected").text(); // selected combo box with
available video devices
core.videoCaptureEnabled = true;
core.captureDevice = $("#mic option:selected").text(); //
selected combo box with available audio capture devices
- After the call is established (state == 7):
// add the linphone video
object to my #video div. This will call loadVideo when loaded
$("#video").append("<object id='remoteVideo'
type='application/x-linphone-web-video'><param name='onload'
value='loadVideo' /><param name='magic' value='1'
/></object>");
- The loadVideo() function:
function loadVideo() {
var v = document.getElementById('remoteVideo');
var core = getCore();
core.nativeVideoWindowId = v.window;
core.nativePreviewWindowId = v.window;
core.selfViewEnabled = true; // change this to true if needed
core.videoDisplayEnabled = true;
}
Thanks.
Tony
Hsu