0

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 am referring this popup

I have also tried below code to remove this popup:

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

        e.stop()

});

Anuj Negi
  • 628
  • 1
  • 6
  • 27

3 Answers3

1

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();

Adam Ullman
  • 1,517
  • 7
  • 12
  • Yes, I use same above code to stop screen share but as I already said that I am using camera-filter API that preventing it to stop on stop screen share so I need other way to remove that popup. – Anuj Negi Oct 26 '17 at 06:17
-1

If you have the ID of the element, you can simply call

$("#elementID").remove()
-1

You can use

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

or

$("#your-id").remove();
Prakash Pazhanisamy
  • 997
  • 1
  • 15
  • 25