Frage

I'm playing around with Screensharing in Webrtc and ran into the following issue:

I want to hide the media picker dialog (see below) when clicking a button (screenshot Cancel text).

media picker dialog

According to the documentation:

cancelChooseDesktopMedia(integer desktopMediaRequestId)
Hides (the) desktop media picker dialog shown by chooseDesktopMedia().
Id returned by chooseDesktopMedia()

sounds exactly like what I want

in my background.js

(I'm writing an extension to avoid setting the allow capture flag in chrome://flags by hand)

I get the desktopMediaRequestId like this:

var desktopMediaRequestId = '';
desktopMediaRequestId = chrome.desktopCapture.chooseDesktopMedia(data_sources, port.sender.tab, function(streamId){ ... });

and call cancelChooseDesktopMedia it like that:

if (desktopMediaRequestId)
    chrome.desktopCapture.cancelChooseDesktopMedia(desktopMediaRequestId);

However,

  • Chrome (Version 34.0.1847.131)
  • and Canary (Version 36.0.1964.2 canary)

freeze and crash with the Dialog still open after cancelChooseDesktopMedia is called.

I posted the most relevant stuff for now. Just scream and I will provide more information :).

Thanks

War es hilfreich?

Lösung

There are open chrome bugs about crashing or the desktop picker simply not closing on macs

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top