getMediaStreamId method

Future<String> getMediaStreamId(
  1. GetMediaStreamOptions? options
)

Creates a stream ID to capture the target tab. Similar to chrome.tabCapture.capture() method, but returns a media stream ID, instead of a media stream, to the consumer tab.

|GetMediaStreamOptions| : Options for the media stream id to retrieve. |callback| : Callback to invoke with the result. If successful, the result is an opaque string that can be passed to the getUserMedia() API to generate a media stream that corresponds to the target tab. The created streamId can only be used once and expires after a few seconds if it is not used.

Implementation

Future<String> getMediaStreamId(GetMediaStreamOptions? options) async {
  var $res = await promiseToFuture<String>(
      $js.chrome.tabCapture.getMediaStreamId(options?.toJS));
  return $res;
}