webrtc: fix endless loading in Firefox (#4707)
Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
@@ -411,7 +411,7 @@ const loadValuesFromQuery = () => {
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
window.addEventListener('load', () => {
|
||||
if (navigator.mediaDevices === undefined) {
|
||||
setMessage(`can't access webcams or microphones. Make sure that WebRTC encryption is enabled.`);
|
||||
return;
|
||||
|
||||
@@ -80,7 +80,7 @@ const loadAttributesFromQuery = () => {
|
||||
defaultControls = video.controls;
|
||||
};
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
window.addEventListener('load', () => {
|
||||
loadAttributesFromQuery();
|
||||
|
||||
new MediaMTXWebRTCReader({
|
||||
|
||||
Reference in New Issue
Block a user