stephenlb / webrtc-sdk

WebRTC Simple Calling API + Mobile SDK - A simplified approach to RTCPeerConnection for mobile and web video calling apps.

Home Page:https://stephenlb.github.io/webrtc-sdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Video always freezes!

crookedbard opened this issue · comments

Pubnub server started to freeze videos.
From 2018-10-17
UTC 2:00 PM

It seems yesterday changes made the video freeze, not only on iOS Safari but on all browsers.

Will be working on this to resolve.

getting closer...

Getting a lot closer! Safari 12 can send/receive calls to any other browser! However Safari is still unable to call Safari successfully.

We had issues when calling from chrome to mozzila fire fox? We used to get cross origin issue.

Apple’s WebRTC implementation only allows one getUserMedia capture at a time. So this is why I've never been able to get Safari to work.

Windows OS: Chrome to Chrome video still freezes.
Caller A calls Caller B, A video is normal on both callers but B video is frozen on both callers.

Caller A debug log:
image
Caller B debug log:
image

Just submitted the next release with a much needed race condition fix on signaling exchanges. This may have improved the conditions you mentioned.

I just checked it. Still same issue. Tested on Chrome Version 69.0.3497.100 (Official Build) (64-bit). Before commits on Oct 17, 2018 4d8a1fd , e6e8531 , a4d565b video wouldn't freeze but now it does.
I use both local video cam and callers video cam on both sides of the connection. So the caller sees itself and the participant, same at the participants end. Callers video is not frozen on both the callers (local) side and the participants, but the participants video is frozen on local and callers side.

Ok I found the issue. To ensure that the video will be shown I had this code before:

var videoStreamActive = false;
phone.receive(function(session) {
            console.log('receive');

// Display Your Friend's Live Video
session.connected(function (session) {

	// Work arround the issue when the video is not always shown.
	session.video.srcObject.onaddtrack = function(event) {
							videoStreamActive = true;
						};

	session.video.srcObject.oninactive = function(event) {
		videoStreamActive = false;
	};

	session.video.onloadedmetadata = function(e) {
		if (videoStreamActive) {
			//video is always shown.
			video.appendChild(session.video);
		}
	};
	
});

But now because of this code the video of participants is always frozen. When I remove this then the video is not frozen, but I need to ensure that the video will always be shown to the user.