Closed Bug 1736532 Opened 3 years ago Closed 2 years ago

Questions about webrtc video playback

Categories

(Core :: WebRTC, defect)

Firefox 93
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: anglestar2014, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<video id="video-webrtc" controls></video>
<script type="text/javascript" src="./js/jswebrtc.min.js"></script>
<script type="text/javascript">
var video = document.getElementById('video-webrtc');
var url = 'webrtc://xxxxxx/live/mystream‘
var player = new JSWebrtc.Player(url, { video: video, autoplay: true, onPlay: (obj) => { console.log("start play") } });
</script>
</body>
</html>

Actual results:

version:93.0 (x64)
operation:use address:localhost or 127.0.0.1 can not browse video,but use ip address forexample:192.168.0.241 can browse video。use:about:webrtc,the video flow running normally

Expected results:

use address:localhost or 127.0.0.1 can browse video

Group: firefox-core-security
Component: Untriaged → WebRTC
Product: Firefox → Core

By default, our ICE stack does not allow the use of loopback addresses. Your scenario may work if you set media.peerconnection.ice.loopback to true in about:config.

Flags: needinfo?(anglestar2014)

(In reply to Byron Campen [:bwc] from comment #1)

By default, our ICE stack does not allow the use of loopback addresses. Your scenario may work if you set media.peerconnection.ice.loopback to true in about:config.

I try to use command:about:config,and set media.peerconnection.ice.loopback=true,then refresh the browers,but not usefull,
still console error:
WebRTC: ICE failed, add a STUN server and see about:webrtc for more details

Flags: needinfo?(anglestar2014)

Ok, I might be able to help further if you attach a copy of about:webrtc (there's a "Save Page" button at the top).

Flags: needinfo?(anglestar2014)

(In reply to Byron Campen [:bwc] from comment #3)

Ok, I might be able to help further if you attach a copy of about:webrtc (there's a "Save Page" button at the top).

I'm sorry to trouble you and Thanks for your help!
aboutWebrtc:http://82.157.27.101/aboutWebrtc.html
webrtcurl:webrtc://82.157.27.101/live/livestream
you can use obs to push video streams:url:rtmp://82.157.27.101/live key:livestream

Flags: needinfo?(anglestar2014)

So it looks like ICE is succeeding based on the copy of about:webrtc, which is weird considering comment 2. I also see that data has been received on both the audio and video tracks. If this was from a case that was not working, it does not appear as though something has gone wrong from a webrtc perspective.

Flags: needinfo?(anglestar2014)

yes,the webrtc data stream is normal,But I can't see the video...
in addition,In Google browser, I can see videos normally.
So I want to know how to solve the problem in firefox browser.

Flags: needinfo?(anglestar2014)

(In reply to Byron Campen [:bwc] from comment #5)

So it looks like ICE is succeeding based on the copy of about:webrtc, which is weird considering comment 2. I also see that data has been received on both the audio and video tracks. If this was from a case that was not working, it does not appear as though something has gone wrong from a webrtc perspective.

yes,the webrtc data stream is normal,But I can't see the video...
in addition,In Google browser, I can see videos normally.
So I want to know how to solve the problem in firefox browser.

(In reply to Byron Campen [:bwc] from comment #5)

So it looks like ICE is succeeding based on the copy of about:webrtc, which is weird considering comment 2. I also see that data has been received on both the audio and video tracks. If this was from a case that was not working, it does not appear as though something has gone wrong from a webrtc perspective.

in addition,Why can I use the native IP address to see the video . for example:192.168.0.126

Is it possible that the copy of about:webrtc you posted is from a working case, instead of a failing case? I don't see any hint of loopback addrs in there...

Flags: needinfo?(anglestar2014)

aboutWebrtc:http://82.157.27.101/aboutWebrtc.html

Hi YM, this link no longer works for me, but it sounds from Byron like it's the wrong log?

webrtcurl:webrtc://82.157.27.101/live/livestream
you can use obs to push video streams:url:rtmp://82.157.27.101/live key:livestream

Sorry, I'm not familiar with those steps, nor is "JSWebrtc" a library we're responsible for. FWIW Firefox works for me when I host the page https://jan-ivar.github.io/dummy/cutnpastecall.html locally, and use any of the following URLs (Note the page works by having you cut'n'paste offer and answer back and forth manually, hence the name):

In order to isolate the problem, if you host that same page on your system, are you able to complete a call? Also, does your OP page work from a file url?

Also are you using VPN by any chance?

(In reply to Byron Campen [:bwc] from comment #9)

Is it possible that the copy of about:webrtc you posted is from a working case, instead of a failing case? I don't see any hint of loopback addrs in there...

en....I use the failure cases to save about:webrtc....yeah,you can try it with my server and code ;

Flags: needinfo?(anglestar2014)

(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #10)

aboutWebrtc:http://82.157.27.101/aboutWebrtc.html

Hi YM, this link no longer works for me, but it sounds from Byron like it's the wrong log?

webrtcurl:webrtc://82.157.27.101/live/livestream
you can use obs to push video streams:url:rtmp://82.157.27.101/live key:livestream

Sorry, I'm not familiar with those steps, nor is "JSWebrtc" a library we're responsible for. FWIW Firefox works for me when I host the page https://jan-ivar.github.io/dummy/cutnpastecall.html locally, and use any of the following URLs (Note the page works by having you cut'n'paste offer and answer back and forth manually, hence the name):

In order to isolate the problem, if you host that same page on your system, are you able to complete a call? Also, does your OP page work from a file url?

hi,thanks for your help!I work with web url not a file url in the future,and no vpn or other limiting settings,just running under bare machine platform with a wertc server .you can thinking a scene with a webrtc server and a localhost url in firefox browse,I just want it to do working.

I'm sorry, I don't fully understand. Can you rephrase? Did the http://localhost:8000/cutnpastecall.html URL work for you if you host it on localhost?

Flags: needinfo?(anglestar2014)

(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #14)

I'm sorry, I don't fully understand. Can you rephrase? Did the http://localhost:8000/cutnpastecall.html URL work for you if you host it on localhost?

the url http://localhost:8000/cutnpastecall.html is normal,I can see my camera's video normally.

Flags: needinfo?(anglestar2014)

Note there are two video elements in the fiddle: local and remote. After you cut'n'paste offer and answer back and forth you should see camera video in both.

About your case, it seems from what you describe that everything is connecting, but that only playback of the remote video is missing.

I'm wondering if there are differences with autoplay mitigations here. Have you tried right-clicking on the stalled video element to get the RMB popup and selecting "Play" from it? Have you tried playing the video without audio?

Flags: needinfo?(anglestar2014)

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Closing the bug as incomplete.

For more information, please visit auto_nag documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.