简体   繁体   中英

How to remove “stop sharing” popup using jQuery

I am using screen share extension to share screen on chrome with other users and when I share my screen with other users a popup open up with "stop sharing" button and never close even when screen share is closed.

I know that it should close automatically but now I need it to close programatically so is there any way to close this popup programatically.

I am referring below popup.

我指的是这个弹出窗口

I have also tried below code to remove this popup:

window.stream.getTracks().forEach(function(e) {

        e.stop()

});

No there is no way to remove it using jQuery. It's not an element on the webpage, this is a Chrome native popup.

The only way to remove it is to actually stop sharing. Make sure you are calling

session.unpublish(publisher); publisher.destroy();

如果您具有该元素的ID,则只需调用

$("#elementID").remove()

You can use

$('#your-id').hide();

or

$("#your-id").remove();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM