Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #83 from mozilla/bug/unmute-after-timeout
Browse files Browse the repository at this point in the history
Only do video track workaround when replacing a video track.
  • Loading branch information
johnshaughnessy authored Sep 17, 2019
2 parents 231f941 + 92e897c commit ecc28db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ class JanusAdapter {
await sender.replaceTrack(t);

// Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=1576771
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1 && t.enabled) {
if (t.kind === "video" && t.enabled && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
t.enabled = false;
setTimeout(() => t.enabled = true, 1000);
}
Expand Down

0 comments on commit ecc28db

Please sign in to comment.