webrtc: fix endless loading in Firefox (#4707)
Some checks are pending
code_lint / golangci_lint (push) Waiting to run
code_lint / mod_tidy (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
dishmaker 2025-07-12 22:58:14 +02:00 committed by GitHub
parent 1bd5febcad
commit cfcdab1f9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -80,7 +80,7 @@ const loadAttributesFromQuery = () => {
defaultControls = video.controls;
};
window.addEventListener('DOMContentLoaded', () => {
window.addEventListener('load', () => {
loadAttributesFromQuery();
new MediaMTXWebRTCReader({