Page 1 of 1

ICE support (WEBRTC, STUN/TURN/ICE)

PostPosted: Mon Jul 15, 2019 4:57 am
by tgayet
Hello,

I test a web application using webrtc and I wanted to know the state of support webrtc in Cef.

What I observe is that the requests ice (stun / turn) are not done which made me wonder about the support of the webrtc in cef and therefore on the ICE support which allows to pass the routers / firewall.

Has anyone ever run a webrtc based web application using the stun and turn protocols?

Are there any flags to pass as a parameter in runtime, or to pass at the time of compilation (gen gen)?

Thank you in advance for your return.

cordially

Thierry GAYET

Re: ICE support (WEBRTC, STUN/TURN/ICE)

PostPosted: Tue Jul 16, 2019 7:29 am
by jgh
I've tested WebRTC just now with version 3729 and it seems to work for me. I see you have the enable-media-streams flag in there so it makes me wonder if you have the proprietary codecs enabled in your build. If you're attempting to establish an H.264 session it'll fail without compiling the H.264 decoder support in so it would be helpful to see the options you built with.

Some evidence in logs (severity=verbose)

Code: Select all
.x:56938|C--I|-|0|0|2161730020094000638|-]: Sent STUN ping, id=6739334c34696f4e53657266, use_candidate=0, nomination=0
9.8.125.x:51352|CRWI|S|1|0|7926369428764099583|34]: Received STUN ping response, id=2b34654a7570524d57505455, code=0, rtt=542, pings_since_last_response=2b34654a7570524d57505455 45466a52656a366764692b72
9.8.125.x:51352|CRWS|S|1|0|7926369428764099583|161]: Received STUN ping response, id=45466a52656a366764692b72, code=0, rtt=493, pings_since_last_response=
...
[0716/122611.875569:INFO:peer_connection.cc(5975)] Changing to ICE connected state because all transports are writable.
[0716/122611.875617:INFO:peer_connection.cc(4033)] Changing IceConnectionState 1 => 2

Re: ICE support (WEBRTC, STUN/TURN/ICE)

PostPosted: Wed Jul 17, 2019 10:26 am
by tgayet
hi,

That's good to hear that it works fine on your side :-)

Which web application (SFU/MCU) did you use for your test ?

Did you use a custom ice server of a private one ?

On our side, i am using a webrtc janus instance and a coturn server ; Both are hosted on an AWS instance.

Did you use a specific configuration on your side or just use the standard's one ?

BR

Thierry

Re: ICE support (WEBRTC, STUN/TURN/ICE)

PostPosted: Wed Jul 17, 2019 10:38 am
by jgh
I tested it using mixer.com's low latency mode which uses webrtc for streaming. Otherwise I would have to set up something more complicated and I don't have anything off-hand for it. I'm not doing anything special for the configuration, but I have enabled proprietary codecs and in the build.

here's my update.sh for building:

Code: Select all
export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none proprietary_codecs=true ffmpeg_branding=Chrome symbol_level=1 treat_warnings_as_errors=false"
export CEF_ARCHIVE_FORMAT=tar.bz2
python ../automate/automate-git.py --download-dir=/home/james/dev/chromium/chromium_git \
    --depot-tools-dir=/home/james/dev/depot_tools \
    --x64-build \
    --minimal-distrib \
    --client-distrib \
    --force-clean \
    --build-target=cefsimple \
    --no-debug-build \
    --no-debug-tests \
    --no-release-tests
 


and my flags when running it

Code: Select all
command_line->AppendSwitch("enable-begin-frame-scheduling");
        command_line->AppendSwitchWithValue("autoplay-policy",
                                            "no-user-gesture-required");
        command_line->AppendSwitch("enable-media-stream");
        command_line->AppendSwitch("enable-system-flash");
        command_line->AppendSwitch("off-screen-rendering-enabled");
        command_line->AppendSwitchWithValue("off-screen-frame-rate", "60");
        command_line->AppendSwitch("enable-gpu");
        command_line->AppendSwitch("enable-zero-copy");