@stream-io/video-react-bindings 0.1.4 → 0.1.6
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
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.1.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.1.5...@stream-io/video-react-bindings-0.1.6) (2023-07-21)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `0.1.0`
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* strict mode issue ([#740](https://github.com/GetStream/stream-video-js/issues/740)) ([c39e4e4](https://github.com/GetStream/stream-video-js/commit/c39e4e4041a2326393478ad808b2aa791d50f8ce))
|
|
14
|
+
|
|
15
|
+
### [0.1.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.1.4...@stream-io/video-react-bindings-0.1.5) (2023-07-21)
|
|
16
|
+
|
|
17
|
+
### Dependency Updates
|
|
18
|
+
|
|
19
|
+
* `@stream-io/video-client` updated to version `0.1.0`
|
|
5
20
|
### [0.1.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-0.1.3...@stream-io/video-react-bindings-0.1.4) (2023-07-20)
|
|
6
21
|
|
|
7
22
|
### Dependency Updates
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
3
|
import { StreamI18nProvider, } from './StreamI18nContext';
|
|
4
4
|
const StreamVideoContext = createContext(undefined);
|
|
5
5
|
/**
|
|
@@ -9,19 +9,6 @@ const StreamVideoContext = createContext(undefined);
|
|
|
9
9
|
* @category Client State
|
|
10
10
|
*/
|
|
11
11
|
export const StreamVideo = ({ children, client, i18nInstance, language, translationsOverrides, }) => {
|
|
12
|
-
const prevClient = useRef(undefined);
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
if (client.user) {
|
|
15
|
-
client
|
|
16
|
-
.connectUser()
|
|
17
|
-
.catch((error) => console.error('Failed to establish connection', error));
|
|
18
|
-
}
|
|
19
|
-
prevClient.current = client;
|
|
20
|
-
return () => {
|
|
21
|
-
var _a;
|
|
22
|
-
(_a = prevClient.current) === null || _a === void 0 ? void 0 : _a.disconnectUser().catch((error) => console.error(`Failed to disconnect`, error));
|
|
23
|
-
};
|
|
24
|
-
}, [client]);
|
|
25
12
|
return (_jsx(StreamVideoContext.Provider, Object.assign({ value: client }, { children: _jsx(StreamI18nProvider, Object.assign({ i18nInstance: i18nInstance, language: language, translationsOverrides: translationsOverrides }, { children: children })) })));
|
|
26
13
|
};
|
|
27
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamVideoContext.js","sourceRoot":"","sources":["../../../src/contexts/StreamVideoContext.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"StreamVideoContext.js","sourceRoot":"","sources":["../../../src/contexts/StreamVideoContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EACL,kBAAkB,GAEnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,kBAAkB,GAAG,aAAa,CACtC,SAAS,CACV,CAAC;AAUF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,qBAAqB,GACe,EAAE,EAAE;IACxC,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,kBAAC,KAAK,EAAE,MAAM,gBACxC,KAAC,kBAAkB,kBACjB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,gBAE3C,QAAQ,IACU,IACO,CAC/B,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAC;AACxC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-bindings",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@stream-io/i18n": "^0.1.1",
|
|
27
|
-
"@stream-io/video-client": "^0.1.
|
|
27
|
+
"@stream-io/video-client": "^0.1.5",
|
|
28
28
|
"react": ">=17.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@stream-io/i18n": "^0.1.1",
|
|
32
|
-
"@stream-io/video-client": "^0.1.
|
|
32
|
+
"@stream-io/video-client": "^0.1.5",
|
|
33
33
|
"@types/react": "^18.0.26",
|
|
34
34
|
"@types/rimraf": "^3.0.2",
|
|
35
35
|
"react": "^18.2.0",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createContext,
|
|
3
|
-
PropsWithChildren,
|
|
4
|
-
useContext,
|
|
5
|
-
useEffect,
|
|
6
|
-
useRef,
|
|
7
|
-
} from 'react';
|
|
1
|
+
import { createContext, PropsWithChildren, useContext } from 'react';
|
|
8
2
|
import { StreamVideoClient } from '@stream-io/video-client';
|
|
9
3
|
import {
|
|
10
4
|
StreamI18nProvider,
|
|
@@ -36,26 +30,6 @@ export const StreamVideo = ({
|
|
|
36
30
|
language,
|
|
37
31
|
translationsOverrides,
|
|
38
32
|
}: PropsWithChildren<StreamVideoProps>) => {
|
|
39
|
-
const prevClient = useRef<StreamVideoClient | undefined>(undefined);
|
|
40
|
-
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (client.user) {
|
|
43
|
-
client
|
|
44
|
-
.connectUser()
|
|
45
|
-
.catch((error) =>
|
|
46
|
-
console.error('Failed to establish connection', error),
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
prevClient.current = client;
|
|
51
|
-
|
|
52
|
-
return () => {
|
|
53
|
-
prevClient.current
|
|
54
|
-
?.disconnectUser()
|
|
55
|
-
.catch((error) => console.error(`Failed to disconnect`, error));
|
|
56
|
-
};
|
|
57
|
-
}, [client]);
|
|
58
|
-
|
|
59
33
|
return (
|
|
60
34
|
<StreamVideoContext.Provider value={client}>
|
|
61
35
|
<StreamI18nProvider
|