Jitsi needs to listen for the `ended` event on the screen-sharing track on the sending side, which is fired when permission is revoked by the user in the Firefox UX, and then terminate screen-sharing. FWIW the same event is fired in Chrome if the user is sharing an application window and close it (bug 1615282). You can test it here https://jsfiddle.net/jib1/14vts7db/
Bug 1642807 Comment 7 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Jitsi needs to listen for the `ended` event on the screen-sharing track on the sending side, which is fired when permission is revoked by the user in the Firefox UX, and then terminate screen-sharing. FWIW the same event is fired in Chrome if the user is sharing an application window and closes it (bug 1615282). You can test it here https://jsfiddle.net/jib1/14vts7db/