linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Building a custom linphone web client


From: Saumil Gandhi
Subject: [Linphone-developers] Building a custom linphone web client
Date: Mon, 28 Apr 2014 08:57:32 +0530

Thanks Saumar. This clarified a bunch of things for me though I have still not managed to get my video display on. I have some questions:

1. You seem to be loading the plugin when a call is connected. But how do you even know that your status has changed to 7 if your plugin was not loaded and initialised before the call was initiated? Don't you need an active plugin object listening to oncallstatuschanged? In other words, how did you do status==7?

2. So in my case, assuming it is ok to preload the plugin in my HTML, I call the loadVideo code directly when my call state changes to 7, instead of loading the plugin and waiting for its onLoad event to fire. This should make no difference right?

3. Confirming that you use the oncallstatuschanged event to detect if state==7, to then fire the loadVideo code 

4. IMP: the linphone object type you use is x-linphone-web-video. I use x-linphone-web. Do you know what is the difference? If I use your type, I get some js errors e.g. core.init() not defined etc.

5. Do you have an active link somewhere for this? Maybe I can do a view source on it and verify if my sequence f events is correctly managed.

Thanks a lot on your help so far!

On Fri, Apr 25, 2014 at 8:37 AM, Saumar Hajjar <address@hidden> wrote:
Saumil,

The following works for me.
I'm not sure if there is any better way of doing it. I've empirically ended up with the following properties and function call orders:

- 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 = false; // change this to true if needed
    core.videoDisplayEnabled = true;   
}

Hope this helps

Em 24/4/2014 08:58, Saumil Gandhi escreveu:
Hi,

reposting to see if anyone has any thoughts on this. I am building my own linphone web client. I can make video calls from the browser, but I am unable to actually see the video call on my page. How do I get to display the video call? The video is definitely being captured and transmitted, because when I receive the call on linphone on my mobile phone, I can see the video call there.

Thanks,
Saumil


On Thu, Apr 17, 2014 at 7:35 PM, Saumil Gandhi <address@hidden> wrote:
Hi,

So I've got to the point where I can login a user and initiate a call and receive a call. Some issues:

1. When the call is connected, my script does not seem to be capturing the microphone (on my mac) because I cannot transmit any sound (so not sure how to set my microphone to the call) or receive any sound (set my internal speakers to the call)

I tried doing this if my call state changed to 'Connected':
core.captureDevice = 'Built-in Input';
core.playbackDevice = 'Built-in Output';

but it does not help

2. My mac's camera does get turned on. On the receiving device, I am able to see myself from my mac's camera i.e. my browser is transmitting video. But I am not able to receive the video from the person I am calling i.e. I am not receiving  / seeing the video of the connected person on my browser. How do I enable display of this video playback?

Thanks,
Saumil



On Wed, Apr 16, 2014 at 10:33 PM, Saumil Gandhi <address@hidden> wrote:
Thanks Saumar, this could be really helpful. I'm going to give it a go.

Saumil


On Wed, Apr 16, 2014 at 7:45 PM, Saumar Hajjar <address@hidden> wrote:
In the linphone-web-plugin source, there's a folder doc/tutorials with basic html/js files.
I managed to write a simple web app using the following:
- tutorials folder
- linphone.org/docs/linphone-web
- web.linphone.org source


Em 16/4/2014 07:24, Saumil Gandhi escreveu:
Hi,

I'm trying to build my own web page and use the linphone-web plugin. I've done web development before, but am not familiar with handlebars.js or how the current linphone JS code is structured.

Here's what I want to do when someone logs into my web app:
  1. Initiate the linphone object
  2. automatically log the user in to their linphone account (I have their credentials)
  3. On clicking a button, automatically dial a pre-determined SIP account
  4. Display the controls and video calling area in a custom div on my page
How do I initialize the core object so that I can use it persistently? 
What JS files do I need to include on my page to make this happen?

Thanks,
Saumil




_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers






_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]