Agora-Flutter-SDK
Agora-Flutter-SDK copied to clipboard
Don't know when user cancelled the browser screen sharing
Describe the bug When we initiate a screen share in the browser, we can't detect when the user presses "Cancel".
Instead startScreenCaptureByWindowId stays in pending state forever and I also didn't see any event handler firing.
To Reproduce Our application code is pretty much like the example here:
https://github.com/AgoraIO/Agora-Flutter-SDK/blob/dev/flutter2/example/lib/examples/advanced/screen_sharing.dart#L129
To reproduce, initiate the screensharing in the browser and then cancel (in the browser UI)

Expected behavior
Would be great to be able to find out when the user cancelled the screenshare in the browser (an exception from startScreenCaptureByWindowId would work just fine).
Our use-case is showing a loading spinner while the screen share is being set up, and I didn't see a way to make that disappear if the flow fails.
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
- Version: 97.0.4692.99 (Official Build) (arm64)
Sorry for the late reply, any error when you cancel the screen sharing?
Sorry for the late reply, any error when you cancel the screen sharing?
Sorry for the late reply, any error when you cancel the screen sharing?
No, I don't see anything. The await just stalls forever, but no exception or status callback is coming in notifying me of that.
I think ideally the screenshare Future would just throw so it can be caught right then and there.
Hi, any luck with this issue? i am stuck with same issue
The web support for agora_rtc_engine 6.x has landed in the main branch, If you still face issues, please try the latest code in main branch to see if it works or not.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.