@stream-io/video-react-sdk 0.4.9 → 0.4.11
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 -0
- package/dist/index.cjs.js +1 -32
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -32
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/hooks/index.d.ts +0 -1
- package/package.json +3 -3
- package/src/core/hooks/index.ts +0 -1
- package/dist/src/core/hooks/useDevices.d.ts +0 -1
- package/src/core/hooks/useDevices.ts +0 -33
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.4.11](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.4.10...@stream-io/video-react-sdk-0.4.11) (2023-11-16)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `0.4.8`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `0.3.8`
|
|
11
|
+
### [0.4.10](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.4.9...@stream-io/video-react-sdk-0.4.10) (2023-11-13)
|
|
12
|
+
|
|
13
|
+
### Dependency Updates
|
|
14
|
+
|
|
15
|
+
* `@stream-io/video-client` updated to version `0.4.7`
|
|
16
|
+
* `@stream-io/video-react-bindings` updated to version `0.3.7`
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **device-api:** Browser Permissions API ([#1184](https://github.com/GetStream/stream-video-js/issues/1184)) ([a0b3573](https://github.com/GetStream/stream-video-js/commit/a0b3573b630ff8450953cdf1102fe722aea83f6f))
|
|
21
|
+
|
|
5
22
|
### [0.4.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-0.4.8...@stream-io/video-react-sdk-0.4.9) (2023-11-13)
|
|
6
23
|
|
|
7
24
|
### Dependency Updates
|
package/dist/index.cjs.js
CHANGED
|
@@ -165,36 +165,6 @@ const Video$1 = ({ trackType, participant, className, VideoPlaceholder = Default
|
|
|
165
165
|
} })), (hasNoVideoOrInvisible || isVideoPaused) && (jsxRuntime.jsx(VideoPlaceholder, { style: { position: 'absolute' }, participant: participant, ref: refs?.setVideoPlaceholderElement }))] }));
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const useHasBrowserPermissions = (permissionName) => {
|
|
169
|
-
const [canSubscribe, enableSubscription] = react.useState(false);
|
|
170
|
-
react.useEffect(() => {
|
|
171
|
-
let permissionState;
|
|
172
|
-
const handlePermissionChange = (e) => {
|
|
173
|
-
const { state } = e.target;
|
|
174
|
-
enableSubscription(state === 'granted');
|
|
175
|
-
};
|
|
176
|
-
const checkPermissions = async () => {
|
|
177
|
-
try {
|
|
178
|
-
permissionState = await navigator.permissions.query({
|
|
179
|
-
name: permissionName,
|
|
180
|
-
});
|
|
181
|
-
permissionState.addEventListener('change', handlePermissionChange);
|
|
182
|
-
enableSubscription(permissionState.state === 'granted');
|
|
183
|
-
}
|
|
184
|
-
catch (e) {
|
|
185
|
-
// permission does not exist - cannot be queried
|
|
186
|
-
// an example would be Firefox - camera, neither microphone perms can be queried
|
|
187
|
-
enableSubscription(true);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
checkPermissions();
|
|
191
|
-
return () => {
|
|
192
|
-
permissionState?.removeEventListener('change', handlePermissionChange);
|
|
193
|
-
};
|
|
194
|
-
}, [permissionName]);
|
|
195
|
-
return canSubscribe;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
168
|
const useTrackElementVisibility = ({ trackedElement, dynascaleManager: propsDynascaleManager, sessionId, trackType, }) => {
|
|
199
169
|
const call = videoReactBindings.useCall();
|
|
200
170
|
const manager = propsDynascaleManager ?? call?.dynascaleManager;
|
|
@@ -1995,7 +1965,7 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
1995
1965
|
};
|
|
1996
1966
|
const hasScreenShare = (p) => !!p?.publishedTracks.includes(videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
1997
1967
|
|
|
1998
|
-
const [major, minor, patch] = ("0.4.
|
|
1968
|
+
const [major, minor, patch] = ("0.4.11" ).split('.');
|
|
1999
1969
|
videoClient.setSdkInfo({
|
|
2000
1970
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2001
1971
|
major,
|
|
@@ -2076,7 +2046,6 @@ exports.VideoPreview = VideoPreview;
|
|
|
2076
2046
|
exports.WithTooltip = WithTooltip;
|
|
2077
2047
|
exports.defaultReactions = defaultReactions;
|
|
2078
2048
|
exports.translations = translations;
|
|
2079
|
-
exports.useHasBrowserPermissions = useHasBrowserPermissions;
|
|
2080
2049
|
exports.useHorizontalScrollPosition = useHorizontalScrollPosition;
|
|
2081
2050
|
exports.useParticipantViewContext = useParticipantViewContext;
|
|
2082
2051
|
exports.usePersistedDevicePreferences = usePersistedDevicePreferences;
|