Remote Video not displayed

461 views
Skip to first unread message

Pierluigi Palma

unread,
Jul 11, 2014, 10:02:05 AM7/11/14
to sip...@googlegroups.com
Hi again,

I'm facing a strange issue with 0.6 version of the library.

In particular, I can't display remote video in a video tag, while local video has no issue.

Related HTML is:

<div id="in-video-remote-container" class="img img-responsive">
<video id="in-video-remote" autoplay="autoplay"></video>
<div id="in-video-local-container" class="overlay">
<video id="in-video-local" autoplay="autoplay" muted></video></div>
</div>


Javascript side when i click a button it calls this function:

call : function(called, withVideo,elements) {
var options = null;
if(!withVideo){
options = {
media: {
           constraints: {
               audio: true,
               video: withVideo,
           },
           render : {
            remote: {
                   audio: elements.audio_remote
               },
           }
}
};
} else {
options = {
media: {
           constraints: {
               audio: true,
               video: withVideo,
           },
           render : {
            remote: {
                   video : elements.video_remote
               },
               local : {
                video : elements.video_local
               }
           }
}
};
}

var session = this._UA.invite(called, options);
this._createNewSession(session);


_createNewSession is used to attach event handler when session is created (with .invite() method and with invite event).


This is the video tag after accepting the call:

<video id="in-video-remote" autoplay="autoplay" src="blob:http%3A//10.139.10.196/4c2bf4ae-55de-48f9-b40c-ca8cdd75366b"></video>

I attached chrome log and video statistics.


Any idea?

log.txt
stats.jpg

Joseph Frazier

unread,
Jul 11, 2014, 11:53:38 AM7/11/14
to sip...@googlegroups.com
Hey Pierluigi,

Are you able to reproduce this problem in a JSFiddle? I tried here, but it seems to work for me. A few seconds after the call is accepted, it logs a warning saying whether or not the remote video element is paused. Can you confirm that it logs "false" and that you hear audio when you try it? The address it calls does not answer with video, but if you change it to one that does, you should see video as well.

Thanks,
Joseph

Pierluigi Palma

unread,
Jul 14, 2014, 4:46:48 AM7/14/14
to sip...@googlegroups.com
Hi Joseph,

I'm able to listen the remote audio but not the remote video, and I think it's very strange because they are both attached to the same video tag. In addition receiver (with another sip client) receives the video but not the audio. I don't know if the two problems are related.

Pierluigi Palma

unread,
Jul 14, 2014, 5:22:50 AM7/14/14
to sip...@googlegroups.com
In addition to this, i've passed both audio e video elements for remote streams. The video have a different src attribute and is not in pause, but still not displaing a frame :(

Joseph Frazier

unread,
Jul 14, 2014, 10:02:26 AM7/14/14
to sip...@googlegroups.com
 i've passed both audio e video elements for remote streams. The video have a different src attribute

The different src attributes are expected, since URL.createObjectURL is called separately for each element.

 I think it's very strange because they are both attached to the same video tag.

Yes, that's really odd. Are you able to see video using other WebRTC applications, such as appear.in?

In addition receiver (with another sip client) receives the video but not the audio. I don't know if the two problems are related

Hmm, this makes me think the problem might be with the endpoint that is sending the media. Can you reproduce the problem across multiple machines?

Pierluigi Palma

unread,
Jul 14, 2014, 10:37:29 AM7/14/14
to sip...@googlegroups.com
 i've passed both audio e video elements for remote streams. The video have a different src attribute

The different src attributes are expected, since URL.createObjectURL is called separately for each element.

Yes, I know. It's only a confirmation that two different streams for audio and video are received from the caller.

 
 I think it's very strange because they are both attached to the same video tag.

Yes, that's really odd. Are you able to see video using other WebRTC applications, such as appear.in?

No problems with video with other webrtc applications.
 
In addition receiver (with another sip client) receives the video but not the audio. I don't know if the two problems are related

Hmm, this makes me think the problem might be with the endpoint that is sending the media. Can you reproduce the problem across multiple machines?

 Yes, it persist across multiple machines.

I attach my code using the library to make the situation clear. Any help is appreciated!
sipjs_code.txt

Joseph Frazier

unread,
Jul 14, 2014, 10:45:45 AM7/14/14
to sip...@googlegroups.com
I attach my code using the library to make the situation clear. Any help is appreciated!

Thanks for the extra context. Can you confirm that the problem occurs when you use the JSFiddle I posted earlier? If it does, please provide more information about the endpoints involved (OS, browser name/version, etc). If the problem does not occur, could you provide a JSFiddle that does reproduce it?

Joseph

Pierluigi Palma

unread,
Jul 14, 2014, 10:54:54 AM7/14/14
to sip...@googlegroups.com
The JSFiddle displays the local video and I can hear the audio message. But my problem is to see the remote video.So I don't know how to recreate a JSFIddle similar to my situation. In addition, my application lies on an IMS network.  I don't think that this is the problem because with 0.5 version I had no problems. 

Joseph Frazier

unread,
Jul 14, 2014, 11:20:59 AM7/14/14
to sip...@googlegroups.com
Can you confirm that using the 0.5.0 version still works currently? I'd like to make sure that changing only the SIP.js codebase from 0.5.0 to 0.6.0 is enough to reproduce the issue.

Pierluigi Palma

unread,
Jul 15, 2014, 3:43:09 AM7/15/14
to sip...@googlegroups.com
With 0.5.0 the application was working fine, but to use that version you have to change not only the library but also the code for the invite (The option parameter for invite method has a different syntax).

Pierluigi Palma

unread,
Jul 15, 2014, 6:47:20 AM7/15/14
to sip...@googlegroups.com
I reproduced the example in the documentation "make a call". The callee is another webrtc client. sipjs is attached to IMS network. Nothing change. Negotiation OK, streams ar correctly received from both side, but remote video is not rendered by sipjs.
I exclude that problem is in the IMS network, because with the old client, media doesn't have problems.

Joseph Frazier

unread,
Jul 15, 2014, 10:09:21 AM7/15/14
to sip...@googlegroups.com
Ok, thanks for helping narrow it down. Can you change both working and non-working versions of your application code to create their SIP.UAs with traceSip: true, then provide the following?
  • a diff between: your application code that uses SIP.js 0.5.0, and your application code that uses SIP.js 0.6.0
  • complete JS console logs for all SIP.js clients involved in the successful case.
  • complete JS console logs for all SIP.js clients involved in the failing case.
Please put each diff/log into a separate pastebin, so as not to clutter up this thread.

Joseph

Pierluigi Palma

unread,
Jul 15, 2014, 11:06:35 AM7/15/14
to sip...@googlegroups.com
Hi Joseph,

I've created two web application, the first with 0.6 version of sipjs, which don't show remote video, and the second with 0.5 version, correctly working.

pastebin have some problem with me, so I've attached all logs and code to this thread.

Hope this help!
html_test_page.txt
sipjs-0.5-code-working.txt
sipjs-0.5-log-working.txt
sipjs-0.6-code-not-working.txt
sipjs-0.6-log-not-working.txt

Joseph Frazier

unread,
Jul 15, 2014, 11:47:07 AM7/15/14
to sip...@googlegroups.com
Thanks for all the info, that helps quite a bit. I noticed that the media constraints in the 0.5.0 app are {video: true}, whereas the 0.6.0 constraints are {audio: true, video: true}. This causes the 0.5.0 offer SDP to contain a=recvonly in the m=audio description, whereas the 0.6.0 offer SDP contains a=sendrecv in the m=audio description. I'm not sure why the remote video isn't showing, but it sounds like a potential bug with the endpoint that SIP.js is calling. If you remove the audio: true, line from your 0.6.0 app code, I would expect it to work as it did before.

Thanks,
Joseph

Pierluigi Palma

unread,
Jul 16, 2014, 4:11:51 AM7/16/14
to sip...@googlegroups.com
Hi Joseph,
I made other tests, but the result doesn't change. First of all removing {audio : true} from 0.6 version of the app, nothing changed (except SDP). Video remote is not showing, while remote audio is correctly received. Moreover, adding {audio : true} constraint to o.5 version of app doesn't change the general behaviour, it still works.

I will try to use another SIP-endpoint. 
Reply all
Reply to author
Forward
0 new messages