Skip to content

Commit a28a8ed

Browse files
committed
Change check for broken firefox
1 parent 62dd5c8 commit a28a8ed

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/avinterface.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,16 @@ export class AVInterface {
696696
navigator.userAgent.includes('Firefox') &&
697697
!window.location.pathname.includes('experimental') // support it on the experimental branch
698698
) {
699-
console.log(
700-
'VideoEncoder is broken on Firefox at least on windows! Deactivate!'
701-
)
702-
supported.videoin = false
703-
supported.screencastin = false
699+
let browserVersion = 0.0
700+
const match = navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)
701+
if (match) browserVersion = Number(`${match[1]}`)
702+
if (browserVersion < 134) {
703+
console.log(
704+
'VideoEncoder is broken on Firefox before 134 at least on windows! Deactivate!'
705+
)
706+
supported.videoin = false
707+
supported.screencastin = false
708+
}
704709
}
705710
return supported
706711
}

0 commit comments

Comments
 (0)