You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phenomenon: The camera permission dialog box does not pop up, it keeps spinning and there are no errors or success.
Solution:
if(query.autostart==='true'){varautoStartPublish=asyncfunction(){// For autostart, solution #1.constdetectStream=awaitnavigator.mediaDevices.getUserMedia({audio:true,video:true});detectStream.getTracks().map(track=>track.stop());// For autostart, solution #2.//await new Promise(resolve => setTimeout(resolve, 1000));awaitstartPublish();};autoStartPublish();}});</script></body></html>
In JavaScript, it is not possible to retrieve it. It must be done in an HTML page by adding the code in the HTML page.
When calling getUserMedia in an HTML page, a permission dialog box will definitely pop up.
When calling setTimeout in an HTML page, it will also pop up after waiting for a certain amount of time, but if the duration is too short, it won't work.
The main issue is with permissions. If the dialog box below pops up, then there won't be any problem.
This issue is only encountered for the first time, so it affects newcomers.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered:
winlinvip
changed the title
WebRTC: Fail to publish RTC automatically
WebRTC: Fail to publish RTC automatically for HTML5.
Nov 14, 2021
winlinvip
changed the title
WebRTC: Fail to publish RTC automatically for HTML5.
WebRTC: Fail to publish RTC automatically for HTML5. 自动推流无法获取权限。
Nov 14, 2021
winlinvip
changed the title
WebRTC: Fail to publish RTC automatically for HTML5. 自动推流无法获取权限。
WebRTC: Fail to publish RTC automatically for HTML5. 自动推流无法获取权限,但也不失败。
Nov 14, 2021
winlinvip
changed the title
WebRTC: Fail to publish RTC automatically for HTML5. 自动推流无法获取权限,但也不失败。
WebRTC: Fail to publish RTC automatically for HTML5. Unable to obtain permission for automatic streaming, but it does not fail.
Jul 28, 2023
Reproduction path:
./objs/srs -c conf/rtc.conf
Solution:
In JavaScript, it is not possible to retrieve it. It must be done in an HTML page by adding the code in the HTML page.
getUserMedia
in an HTML page, a permission dialog box will definitely pop up.setTimeout
in an HTML page, it will also pop up after waiting for a certain amount of time, but if the duration is too short, it won't work.The main issue is with permissions. If the dialog box below pops up, then there won't be any problem.
This issue is only encountered for the first time, so it affects newcomers.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: