You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Contains properties that describe the stream. */
2620
+
/** Enum used to define set of desktop media sources used in {@link chooseDesktopMedia}. */
2621
+
export enum DesktopCaptureSourceType {
2622
+
SCREEN = "screen",
2623
+
WINDOW = "window",
2624
+
TAB = "tab",
2625
+
AUDIO = "audio",
2626
+
}
2627
+
2628
+
/**
2629
+
* Contains properties that describe the stream.
2630
+
* @since Chrome 57
2631
+
*/
2621
2632
export interface StreamOptions {
2622
2633
/** True if "audio" is included in parameter sources, and the end user does not uncheck the "Share audio" checkbox. Otherwise false, and in this case, one should not ask for audio stream through getUserMedia call. */
2623
2634
canRequestAudioTrack: boolean;
2624
2635
}
2625
2636
/**
2626
2637
* Shows desktop media picker UI with the specified set of sources.
2627
-
* @param sources Set of sources that should be shown to the user.
2628
-
* Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
2638
+
* @param sources Set of sources that should be shown to the user. The sources order in the set decides the tab order in the picker.
2639
+
* @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches `tab.url`. The tab's origin must be a secure origin, e.g. HTTPS.
2640
+
* @param callback streamId: An opaque string that can be passed to `getUserMedia()` API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty `streamId`. The created `streamId` can be used only once and expires after a few seconds when it is not used.
2641
+
* @return An id that can be passed to cancelChooseDesktopMedia() in case the prompt need to be canceled.
* Shows desktop media picker UI with the specified set of sources.
2636
-
* @param sources Set of sources that should be shown to the user.
2637
-
* @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches tab.url.
2638
-
* Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
0 commit comments