cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Sharing Error on Mac Safari 18.0.1 After Canceling Permission

Beltsville
Newcomer
Newcomer

 

I'm experiencing an issue with screen sharing on Mac Safari Version 18.0.1 (20619.1.26.31.7). After clicking "Cancel" on the initial screen share permission dialog, all subsequent screen sharing attempts fail with the following error:
javascriptCopy{type: 'INVALID_OPERATION', reason: 'user deny screen share'}
Here are the relevant details:

Device type: Mac
Browser: Safari 18.0.1 (20619.1.26.31.7)
Error code: INVALID_OPERATION
Troubleshooting steps taken:

Attempted multiple screen share initiations
Verified the issue occurs consistently after initial denial

 

Below is the code snippet for the screen sharing implementation:
javascriptCopytoggleShare(isShare) {
if (isShare) {
if (mediaStream.isStartShareScreenWithVideoElement()) {
mediaStream.startShareScreen(document.querySelector('#chat-share-video')).then(() => {
$("#chat-shareVideoContainer").show();
$("#chat-shareCanvasContainer").removeClass("flex-align-items-center");
$("#chat-shareCanvasContainer").hide();
}).catch((error) => {
adapter.server.SendSysMessage(adapter.currentIceLink.conversationId, "resetShareScreen", (res) => {});
console.log('error =>', error)
})
} else {
mediaStream.startShareScreen(document.querySelector('#chat-share-canvas')).then(() => {
$("#chat-shareVideoContainer").hide();
$("#chat-shareCanvasContainer").addClass("flex-align-items-center");
$("#chat-shareCanvasContainer").show();
}).catch((error) => {
adapter.server.SendSysMessage(adapter.currentIceLink.conversationId, "resetShareScreen", (res) => {});
console.log('error =>', error)
})
}
} else {
mediaStream.stopShareScreen().then(() => {
adapter.server.SendSysMessage(adapter.currentIceLink.conversationId, "resetShareScreen", (res) => {});
$("#chat-shareVideoContainer").hide();
$("#chat-shareCanvasContainer").removeClass("flex-align-items-center");
$("#chat-shareCanvasContainer").hide();
}).catch((error) => {
console.log('error =>', error)
})
}
}

0 REPLIES 0