fix: Fix black screen when end screensharing with system buttons.

This commit is contained in:
cloudwebrtc 2022-02-13 07:13:58 +08:00
parent c64e6b9c11
commit 48c0d03bd2
1 changed files with 5 additions and 0 deletions

View File

@ -538,6 +538,11 @@ class CallSession {
if (stream == null) {
return false;
}
stream.getVideoTracks().forEach((track) {
track.onEnded = () {
setScreensharingEnabled(false);
};
});
_addLocalStream(stream, SDPStreamMetadataPurpose.Screenshare);
return true;
} catch (err) {