@stream-io/video-react-sdk 1.40.2 → 1.41.0
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 +17 -4
- package/dist/embedded.cjs.js +4 -4
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +5 -5
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +6 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/hooks/useRequestPermission.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/CallControls/ScreenShareButton.tsx +5 -2
- package/src/components/CallControls/ToggleAudioButton.tsx +6 -2
- package/src/components/CallControls/ToggleVideoButton.tsx +6 -2
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +16 -12
- package/src/hooks/useRequestPermission.ts +4 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useRequestPermission: (permission:
|
|
1
|
+
import { RequestPermissionRequestPermissionsEnum } from '@stream-io/video-client';
|
|
2
|
+
export declare const useRequestPermission: (permission: RequestPermissionRequestPermissionsEnum) => {
|
|
3
3
|
requestPermission: () => Promise<boolean>;
|
|
4
4
|
hasPermission: boolean;
|
|
5
5
|
canRequestPermission: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@floating-ui/react": "^0.27.20",
|
|
48
|
-
"@stream-io/video-client": "1.
|
|
48
|
+
"@stream-io/video-client": "1.58.0",
|
|
49
49
|
"@stream-io/video-filters-web": "0.8.6",
|
|
50
|
-
"@stream-io/video-react-bindings": "1.
|
|
50
|
+
"@stream-io/video-react-bindings": "1.20.0",
|
|
51
51
|
"chart.js": "^4.5.1",
|
|
52
52
|
"clsx": "^2.1.1",
|
|
53
53
|
"react-chartjs-2": "^5.3.1"
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
OwnCapability,
|
|
3
|
+
RequestPermissionRequestPermissionsEnum,
|
|
4
|
+
} from '@stream-io/video-client';
|
|
2
5
|
import {
|
|
3
6
|
Restricted,
|
|
4
7
|
useCallStateHooks,
|
|
@@ -29,7 +32,7 @@ export const ScreenShareButton = (props: ScreenShareButtonProps) => {
|
|
|
29
32
|
useCallStateHooks();
|
|
30
33
|
const isSomeoneScreenSharing = useHasOngoingScreenShare();
|
|
31
34
|
const { hasPermission, requestPermission, isAwaitingPermission } =
|
|
32
|
-
useRequestPermission(
|
|
35
|
+
useRequestPermission(RequestPermissionRequestPermissionsEnum.SCREENSHARE);
|
|
33
36
|
|
|
34
37
|
const callSettings = useCallSettings();
|
|
35
38
|
const isScreenSharingAllowed = callSettings?.screensharing.enabled;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
OwnCapability,
|
|
3
|
+
RequestPermissionRequestPermissionsEnum,
|
|
4
|
+
SfuModels,
|
|
5
|
+
} from '@stream-io/video-client';
|
|
2
6
|
import {
|
|
3
7
|
Restricted,
|
|
4
8
|
useCallStateHooks,
|
|
@@ -139,7 +143,7 @@ export const ToggleAudioPublishingButton = (
|
|
|
139
143
|
} = props;
|
|
140
144
|
|
|
141
145
|
const { hasPermission, requestPermission, isAwaitingPermission } =
|
|
142
|
-
useRequestPermission(
|
|
146
|
+
useRequestPermission(RequestPermissionRequestPermissionsEnum.SEND_AUDIO);
|
|
143
147
|
|
|
144
148
|
const { useMicrophoneState, useLocalParticipant } = useCallStateHooks();
|
|
145
149
|
const {
|
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
UseInputMediaDeviceOptions,
|
|
6
6
|
} from '@stream-io/video-react-bindings';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
OwnCapability,
|
|
10
|
+
RequestPermissionRequestPermissionsEnum,
|
|
11
|
+
SfuModels,
|
|
12
|
+
} from '@stream-io/video-client';
|
|
9
13
|
import { CompositeButton, IconButtonWithMenuProps } from '../Button/';
|
|
10
14
|
import { DeviceSelectorVideo } from '../DeviceSettings';
|
|
11
15
|
import { PermissionNotification } from '../Notification';
|
|
@@ -137,7 +141,7 @@ export const ToggleVideoPublishingButton = (
|
|
|
137
141
|
} = props;
|
|
138
142
|
|
|
139
143
|
const { hasPermission, requestPermission, isAwaitingPermission } =
|
|
140
|
-
useRequestPermission(
|
|
144
|
+
useRequestPermission(RequestPermissionRequestPermissionsEnum.SEND_VIDEO);
|
|
141
145
|
|
|
142
146
|
const { useCameraState, useCallSettings, useLocalParticipant } =
|
|
143
147
|
useCallStateHooks();
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
hasScreenShareAudio,
|
|
7
7
|
hasVideo,
|
|
8
8
|
OwnCapability,
|
|
9
|
+
UpdateUserPermissionsRequestGrantPermissionsEnum,
|
|
10
|
+
UpdateUserPermissionsRequestRevokePermissionsEnum,
|
|
9
11
|
} from '@stream-io/video-client';
|
|
10
12
|
import { useParticipantViewContext } from './ParticipantViewContext';
|
|
11
13
|
import {
|
|
@@ -41,19 +43,21 @@ export const ParticipantActionsContextMenu = () => {
|
|
|
41
43
|
const muteScreenShareAudio = () =>
|
|
42
44
|
call?.muteUser(userId, 'screenshare_audio');
|
|
43
45
|
|
|
44
|
-
const grantPermission =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const grantPermission =
|
|
47
|
+
(permission: UpdateUserPermissionsRequestGrantPermissionsEnum) => () => {
|
|
48
|
+
call?.updateUserPermissions({
|
|
49
|
+
user_id: userId,
|
|
50
|
+
grant_permissions: [permission],
|
|
51
|
+
});
|
|
52
|
+
};
|
|
50
53
|
|
|
51
|
-
const revokePermission =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const revokePermission =
|
|
55
|
+
(permission: UpdateUserPermissionsRequestRevokePermissionsEnum) => () => {
|
|
56
|
+
call?.updateUserPermissions({
|
|
57
|
+
user_id: userId,
|
|
58
|
+
revoke_permissions: [permission],
|
|
59
|
+
});
|
|
60
|
+
};
|
|
57
61
|
|
|
58
62
|
const toggleParticipantPin = () => {
|
|
59
63
|
if (pin) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { RequestPermissionRequestPermissionsEnum } from '@stream-io/video-client';
|
|
3
3
|
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
4
4
|
|
|
5
|
-
export const useRequestPermission = (
|
|
5
|
+
export const useRequestPermission = (
|
|
6
|
+
permission: RequestPermissionRequestPermissionsEnum,
|
|
7
|
+
) => {
|
|
6
8
|
const call = useCall();
|
|
7
9
|
const { useHasPermissions } = useCallStateHooks();
|
|
8
10
|
const hasPermission = useHasPermissions(permission);
|