I\'m currently writing a chrome extension which uses Chrome\'s DesktopCapture API. I\'m struggling to set a callback when someone clicks on \"Stop sharing\".
Now we have oninactive, You can use like this
stream.oninactive = () => {}