@stream-io/video-client 1.11.13 → 1.11.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.browser.es.js +4 -5
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +4 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/devices/BrowserPermission.d.ts +1 -1
- package/package.json +1 -1
- package/src/devices/BrowserPermission.ts +1 -1
- package/src/devices/devices.ts +1 -2
|
@@ -16,7 +16,7 @@ export declare class BrowserPermission {
|
|
|
16
16
|
prompt({ forcePrompt, throwOnNotAllowed, }?: {
|
|
17
17
|
forcePrompt?: boolean;
|
|
18
18
|
throwOnNotAllowed?: boolean;
|
|
19
|
-
}): Promise<
|
|
19
|
+
}): Promise<boolean>;
|
|
20
20
|
listen(cb: (state: PermissionState) => void): () => boolean;
|
|
21
21
|
asObservable(): import("rxjs").Observable<boolean>;
|
|
22
22
|
private setState;
|
package/package.json
CHANGED
|
@@ -63,7 +63,7 @@ export class BrowserPermission {
|
|
|
63
63
|
forcePrompt = false,
|
|
64
64
|
throwOnNotAllowed = false,
|
|
65
65
|
}: { forcePrompt?: boolean; throwOnNotAllowed?: boolean } = {}) {
|
|
66
|
-
await withoutConcurrency(
|
|
66
|
+
return await withoutConcurrency(
|
|
67
67
|
`permission-prompt-${this.permission.queryName}`,
|
|
68
68
|
async () => {
|
|
69
69
|
if (
|
package/src/devices/devices.ts
CHANGED
|
@@ -29,8 +29,7 @@ const getDevices = (permission: BrowserPermission, kind: MediaDeviceKind) => {
|
|
|
29
29
|
const shouldPromptForBrowserPermission = devices.some(
|
|
30
30
|
(device) => device.kind === kind && device.label === '',
|
|
31
31
|
);
|
|
32
|
-
if (shouldPromptForBrowserPermission) {
|
|
33
|
-
await permission.prompt({ throwOnNotAllowed: true });
|
|
32
|
+
if (shouldPromptForBrowserPermission && (await permission.prompt())) {
|
|
34
33
|
devices = await navigator.mediaDevices.enumerateDevices();
|
|
35
34
|
}
|
|
36
35
|
return devices.filter(
|