Repository navigation
fix(love): explain why screen sharing could not be started - #11129
MichaelUray wants to merge 2 commits into
Conversation
b770be4 to
beb0934
Compare
|
@MichaelUray Please take a look at the failed formatting step. What do you think about this UI suggestion? |
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>
… picker Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
|
@ArtyomSavchenko Thanks for checking this. I investigated the latest CI run on The build checks out the moving PR merge ref, while formatting checks out the event’s original merge SHA. The build cache includes source files, so restoring it overlays newer develop changes onto the older checkout:
I’m preparing a separate workflow-fix PR to pin the checkouts to I’ve addressed the cancel-toast suggestion by returning silently for plain |
beb0934 to
c033b81
Compare
|
@ArtyomSavchenko I pushed the follow-up. A plain
The workflow fix I mentioned is #11160. It pins the checkouts to Could you approve the workflow run for this push? |
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).