Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix joinRoom calls in RN docs #83

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/react-native/connecting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export function JoinRoomButton() {
const { joinRoom } = useConnection();

const onPressJoin = useCallback(async () => {
const { fishjamUrl, peerToken } = await getRoomDetails("Room", "User");
const { url, peerToken } = await getRoomDetails("Room", "User");

// highlight-next-line
await joinRoom(fishjamUrl, peerToken);
await joinRoom({ url, peerToken });
}, [joinRoom]);

return <Button onPress={onPressJoin} title="Join Room" />;
Expand All @@ -73,7 +73,7 @@ async function getRoomDetails(roomName: string, peerName: string) {
`https://fishjam.io/api/v1/connect/${YOUR_APP_ID}/room-manager/?roomName=${roomName}&peerName=${peerName}`,
);
const { fishjamUrl, peerToken } = await response.json();
return { fishjamUrl, peerToken };
return { url: fishjamUrl, peerToken };
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/react-native/quick-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function StartStreamingButton({
await prepareCamera({ cameraEnabled: true });

// highlight-next-line
await joinRoom(url, peerToken);
await joinRoom({ url, peerToken });
}, [joinRoom, prepareCamera, roomName, peerName]);

return <Button title="Start Streaming" onPress={startStreaming} />;
Expand Down
Loading