-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix checking if WebAssembly is supported for virtual background #10230
Merged
ShGKme
merged 4 commits into
master
from
fix-checking-if-webassembly-is-supported-for-virtual-background
Aug 17, 2023
Merged
Fix checking if WebAssembly is supported for virtual background #10230
ShGKme
merged 4 commits into
master
from
fix-checking-if-webassembly-is-supported-for-virtual-background
Aug 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"wasmCheck.feature" is always defined, so there is no need to use optional chaining. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
49cd6fa
to
51d88f8
Compare
/backport to stable27 |
Sorry 😅 |
ShGKme
approved these changes
Aug 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works fine. Thanks for fixing it.
Also tested a scenario, when virtual background was set and settings were persisted in LS and then WA was dropped.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Before "wasm-check 2.1.0" if WebAssembly was disabled in Firefox an exception was thrown when loading "wasm-check". However, this was not the expected behaviour, but a bug. The proper way is to check it using "support()", which returns false if not supported. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
If the virtual background is not available "_jitsiStreamBackgroundEffect" is not even defined, so the public getter and setter can not delegate to it in that case. As the getter now returns undefined rather than an actual object the getter can not be used if an object is expected when the virtual background is not available. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
51d88f8
to
78a4028
Compare
ShGKme
approved these changes
Aug 17, 2023
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3. to review
bug
feature: call 📹
Voice and video calls
feature: frontend 🖌️
"Web UI" client
regression
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before wasm-check 2.1.0 (@ShGKme I knew that the try/catch was there for a reason :-P ) if WebAssembly was disabled in Firefox an exception was thrown when loading wasm-check. However, this was not the expected behaviour, but a bug. The proper way is to check it using
support()
, which returnsfalse
if not supported.Besides that, when support for using images as a virtual background was added someone :-P forgot that
_jitsiStreamBackgroundEffect
is not defined when the virtual background is not available. The getter and setter are now guarded in that case, which also requires not using the getter if an object is expected when the virtual background is not available.I am not sure if this deserves a backport below stable27 🤔 (only for the first and second commits, as the third one fixes a bug introduced in Talk 17)
How to test (scenario 1)
about:config
and setjavascript.options.wasm
tofalse
to disable WebAssemblyResult with this pull request
Looks like WebAssembly is disabled or not supported on this browser, virtual background will not be available is logged to the console
Result without this pull request
tflite compilation failed. The web server may not be properly configured to send wasm and/or tflite files. is logged to the console
How to test (scenario 2)
about:config
and setjavascript.options.wasm
tofalse
to disable WebAssemblyResult with the third commit of this pull request
Microphone and camera are available, although not the virtual background
Result with the second commit of this pull request
No devices are available and
this._jitsiStreamBackgroundEffect_ is undefined
is logged to the console