Repository navigation
fix(love): explain why screen sharing could not be started - #11129
Open
MichaelUray wants to merge 1 commit into
Open
MichaelUray wants to merge 1 commit into
MichaelUray wants to merge 1 commit into
Conversation
LiveKitClient.setScreenShareEnabled caught every error from starting a screen share and only logged it to the console. When the browser or the operating system blocked screen capture, or getDisplayMedia was not available (unsupported browser, insecure context), clicking the share button silently did nothing. Classify the error in a small helper (getScreenShareErrorKind) and show a notification. Recognizable OS or permissions-policy denials, unsupported environments and other failures are shown as errors with a matching explanation. A plain NotAllowedError is reported by browsers both when the user closes the source picker and when capture is blocked, so it is shown as a soft informational hint asking the user to check the browser and OS permissions if they did not cancel. Add the new strings to all love-assets languages and a unit test for the helper. Fixes hcengineering#5122 Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #5122
Problem and change
LiveKitClient.setScreenShareEnabled caught every error from starting a screen share and only logged it to the console. When the browser or the operating system blocked screen capture, or getDisplayMedia was not available (unsupported browser, insecure context), clicking the share button silently did nothing.
Classify the error in a small helper (getScreenShareErrorKind) and show a notification. Recognizable OS or permissions-policy denials, unsupported environments and other failures are shown as errors with a matching explanation. A plain NotAllowedError is reported by browsers both when the user closes the source picker and when capture is blocked, so it is shown as a soft informational hint asking the user to check the browser and OS permissions if they did not cancel. Add the new strings to all love-assets languages and a unit test for the helper.
Tests
New unit tests
plugins/love-resources/src/__tests__/screenShareError.test.ts;testscripts added to the package so CI runs them. A real denial needs a media server and OS settings to reproduce: e.g. on macOS disable screen recording for the browser and click Share → an error notification; cancelling the picker shows a short informational hint (browsers report a cancel and a block with the same NotAllowedError).