@fishjam-cloud/react-client 0.26.2 → 0.27.0-rc.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/dist/FishjamProvider.js
CHANGED
|
@@ -41,22 +41,22 @@ export function FishjamProvider(props) {
|
|
|
41
41
|
});
|
|
42
42
|
const peerStatus = usePeerStatus(fishjamClientRef.current);
|
|
43
43
|
const mergedBandwidthLimits = useMemo(() => mergeWithDefaultBandwitdthLimits(props.bandwidthLimits), [props.bandwidthLimits]);
|
|
44
|
-
const
|
|
44
|
+
const audioTrackManager = useTrackManager({
|
|
45
45
|
tsClient: fishjamClientRef.current,
|
|
46
46
|
peerStatus,
|
|
47
|
-
deviceManager:
|
|
47
|
+
deviceManager: microphoneManager,
|
|
48
48
|
bandwidthLimits: mergedBandwidthLimits,
|
|
49
|
-
streamConfig: props.
|
|
50
|
-
type: "
|
|
49
|
+
streamConfig: props.audioConfig,
|
|
50
|
+
type: "microphone",
|
|
51
51
|
logger,
|
|
52
52
|
});
|
|
53
|
-
const
|
|
53
|
+
const videoTrackManager = useTrackManager({
|
|
54
54
|
tsClient: fishjamClientRef.current,
|
|
55
55
|
peerStatus,
|
|
56
|
-
deviceManager:
|
|
56
|
+
deviceManager: cameraManager,
|
|
57
57
|
bandwidthLimits: mergedBandwidthLimits,
|
|
58
|
-
streamConfig: props.
|
|
59
|
-
type: "
|
|
58
|
+
streamConfig: props.videoConfig,
|
|
59
|
+
type: "camera",
|
|
60
60
|
logger,
|
|
61
61
|
});
|
|
62
62
|
const screenShareManager = useScreenShareManager({
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export type UseSandboxProps = {
|
|
2
|
-
|
|
3
|
-
sandboxApiUrl?: string;
|
|
4
|
-
};
|
|
2
|
+
sandboxApiUrl: string;
|
|
5
3
|
};
|
|
6
4
|
export type RoomType = "conference" | "livestream" | "audio_only";
|
|
7
|
-
export declare const useSandbox: (props
|
|
5
|
+
export declare const useSandbox: (props: UseSandboxProps) => {
|
|
8
6
|
getSandboxPeerToken: (roomName: string, peerName: string, roomType?: RoomType) => Promise<string>;
|
|
9
7
|
getSandboxViewerToken: (roomName: string) => Promise<string>;
|
|
10
8
|
getSandboxLivestream: (roomName: string, isPublic?: boolean) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSandbox.d.ts","sourceRoot":"","sources":["../../src/hooks/useSandbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSandbox.d.ts","sourceRoot":"","sources":["../../src/hooks/useSandbox.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAC;AAElE,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe;oCAQ5B,MAAM,YAAY,MAAM,aAAY,QAAQ;sCAoB5C,MAAM;qCAmBN,MAAM,aAAY,OAAO;uBAQX,MAAM;cAAQ;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE;;CAO5E,CAAC"}
|
package/dist/hooks/useSandbox.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useCallback } from "react";
|
|
2
|
-
import { useFishjamId } from "../contexts/fishjamId";
|
|
3
|
-
import { resolveFishjamUrl } from "../utils/fishjamUrl";
|
|
4
2
|
export const useSandbox = (props) => {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const sandboxApiUrl = props?.sandboxApiUrl;
|
|
4
|
+
if (!sandboxApiUrl) {
|
|
5
|
+
throw new Error("useSandbox requires a sandboxApiUrl, you can get it at: https://fishjam.io/app/sandbox");
|
|
6
|
+
}
|
|
8
7
|
const getSandboxPeerToken = useCallback(async (roomName, peerName, roomType = "conference") => {
|
|
9
8
|
const url = new URL(sandboxApiUrl);
|
|
10
9
|
url.searchParams.set("roomName", roomName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/react-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-rc.0",
|
|
4
4
|
"description": "React client library for Fishjam",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Fishjam Team",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"vitest": "^3.1.1"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@fishjam-cloud/ts-client": "0.
|
|
65
|
+
"@fishjam-cloud/ts-client": "0.27.0-rc.0",
|
|
66
66
|
"events": "3.3.0",
|
|
67
67
|
"lodash.isequal": "4.5.0"
|
|
68
68
|
},
|
|
@@ -77,5 +77,6 @@
|
|
|
77
77
|
"*.(js|ts|tsx)": [
|
|
78
78
|
"yarn lint"
|
|
79
79
|
]
|
|
80
|
-
}
|
|
80
|
+
},
|
|
81
|
+
"stableVersion": "0.26.3"
|
|
81
82
|
}
|