How to listen for “Stop sharing” click in Chrome DesktopCapture API

后端 未结 3 1785
囚心锁ツ
囚心锁ツ 2020-12-29 07:13

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\".

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 08:17

    Now we have oninactive, You can use like this

    stream.oninactive = () => {}
    

提交回复
热议问题