WebRtc detection in Bowser doesn't work
Closed this issue · 5 comments
I read in the doc that webrtc detection will not before owr.js will be injected.
So I have following function for detecting the webrtc features in bowser
var isWebRTCSupported;
var detectWebRTCBowser = function()
{
isWebRTCSupported = (!!window.webkitRTCPeerConnection || !!window.mozRTCPeerConnection)
if (isWebRTCSupported)
{
return;
}
else
{
setTimeout(detectWebRTCBowser , 1000);
}
}
$(window).load(function () {
detectWebRTCBowser();
});
It doesn't work. If it can't detect webrtc from the first time it'll never detect it. And if it's detectabe it'll detected from the first time.
Also what is important I think is that: when you launch bowser for the first time and load the page it never detects webrtc. If to refresh the page it'll detect it. And all ongoing sessions it'll work, untill you realunch the bowser.
How to correctly implement webrtc detection in bowser?
What I just discovered is that owr.js is not injected sometimes. Especially looks like this is happens after bowser crashes and you launch it again. Can I just inject http://localhost:10717/owr.js to my html myself? Or how to deal with this?
I would recommend having a look at this PR #61
We are moving to WKWebView which makes the JavaScript injection of owr.js robust (there is a proper API for injection).
With this PR webrtc detection works fine. I merged it locally with current master branch. But now video sending and receiving doesn't work. I see alot of HTTP GETs to 127.0.0.1:21428/__JAflv/{alotofsymbols} when sending video from bowser. Is it ok?
What I noticed here is that my ajax stopped to work after this GETs start.
Also When I try to send video from safari wirth plugin and latest daemon from openwebrtc I got:
ERROR: owr_transport_agent.c:1522:prepare_transport_bin_send_elements: assertion failed: (scream_queue)
Abort trap: 6
That has been fixed in a newer version of OpenWebRTC. Could you please update and re-build?
The Issue specified in the title is fixed. If you have other problems please open a new Issue. Closing, thanks.