mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
2.9k stars 593 forks source link

New Firefox 74.0 Feature Affecting WebRTC Compatibility? #310

Closed generic-beat-detector closed 4 years ago

generic-beat-detector commented 4 years ago

Hello mpromonet (and all),

Firefox Issue

About two days ago, on my Ubuntu 18.04.2 LTS laptop, Firefox upgraded itself to release 74.0 (by "asking" me to restart it). After this upgrade, video streams from my local docker installation of webrtc-streamer __v0.2.3-19-g49b8daf/Linux-x86_64__ (on a separate machine) no longer appeared on the dark grey HTML5 video elements (on the laptop's Firefox 74.0). The dark grey video elements turn light grey after a while.

I pulled the latest webrtc-streamer docker image, __v0.2.4-52-g7aa1239/Linux-x86_64__, and restarted the service (on the separate machine), but still no video streams appeared on Firefox 74.0 (on my laptop). Yet, a very ancient Android phone running Firefox 68.3.0 still showed the video streams -- with both versions of webrtc-streamer.

Firefox 74.0 Quick Fix (Not Recommended)

According to Kinda urgent, firefox no longer compatible (software.intel.com), apparently a new Firefox 74.0 feature that obfuscates the "computer’s IP address with a random ID in certain WebRTC scenarios" is the likely culprit.

Navigating to the about:config URL on Firefox 74.0, searching for obfuscate, then toggling the media.peerconnection.ice.obfuscate_host_addresses entry to false seemingly does the trick. The webrtc-streamer video streams now appear on the Firefox 74.0 HTML5 video elements.

Regards.

mpromonet commented 4 years ago

Hi generic-beat-detector,

I made a test with the live demo on http://webrtc-streamer.herokuapp.com/ with firefox 74, it seems to work normally.

So maybe the problem you are facing is link to how you are running docker. Did you try adding --network host ?

Best Regards, Michel.

generic-beat-detector commented 4 years ago

True, Michel, true.

Adding the --network host switch fixed the problem.

I restored media.peerconnection.ice.obfuscate_host_addresses to true and video streaming still worked. If you ever get the time, it will be quite a pleasure to hear from you the logic behind this fix.

For what its worth:

I tried to obtain logs for both scenarios so that I could run a diff and see if I could maybe identify the problem. So, with media.peerconnection.ice.obfuscate_host_addresses set to true:

Whatever FF, I'm sticking with Michel's --network host fail-safe.

Best Regards.

mpromonet commented 4 years ago

Hi,

This is something into I need to dig a bit much to understand, but the idea behind is that the ICE candidates expose internal docker IP. Using --network host makes the docker to see your host ip address that will be published as an ICE candidate.

Best Regards, Michel.

generic-beat-detector commented 4 years ago

Oh, without --network host, it is as if we have a "virtually NATed" webrtc-streamer with no "STUN", right?

ard-be commented 4 years ago

Hi everybody,

I have Exactly the same problem, but my application don't run with docker. I have compile the webrtc-streamer on debian 9, all is working when i call my rtsp video on chrome and firefox 73. But on firefox 75 my test is KO. When i toggle the media.peerconnection.ice.obfuscate_host_addresses option to false it works fine.

I run the webrtc-streamer like this : /webrtc-streamer -H8000 -S

Can someone have a solution ?

mpromonet commented 4 years ago

Hi s-beard,

I just made a try with firefox 75 on windows without overiding media.peerconnection.ice.obfuscate_host_addresses and it works well.
Do you have a problem with test application on https://webrtc-streamer.herokuapp.com/Bunny.html ?

Best Regards, Michel.

ard-be commented 4 years ago

Hi Michel, No i don't have any problems with your Bunny video. I run the webrtc-streamer like this : /webrtc-streamer -H8000 -S for watching an rtsp video live, or rtsp video replay from hikvision recorder.

webrtc-streamer.log Firefox.log

Best Regards,