Skip to content

Update instances of useSandbox to use sandbox api url#67

Open
Magmusacy wants to merge 1 commit intomainfrom
FCE-3253
Open

Update instances of useSandbox to use sandbox api url#67
Magmusacy wants to merge 1 commit intomainfrom
FCE-3253

Conversation

@Magmusacy
Copy link
Copy Markdown
Contributor

useSandbox now uses explicit url to connect to room manager, will have to change it though after the sdk is updated

Copilot AI review requested due to automatic review settings May 4, 2026 10:19
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
moq-demo Ready Ready Preview, Comment May 4, 2026 10:19am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the example apps to configure useSandbox with an explicit “sandbox API URL” provided via environment variables, and extends the example .env templates accordingly.

Changes:

  • Updated multiple web and React Native examples to call useSandbox({ configOverride: { sandboxApiUrl: ... } }) using VITE_SANDBOX_API_URL / EXPO_PUBLIC_SANDBOX_API_URL.
  • Added *_SANDBOX_API_URL entries to several .env.example files (and introduced a new .env.example for web-react/fishjam-chat).
  • Renamed the React Native env var from EXPO_PUBLIC_FISHJAM_URL to EXPO_PUBLIC_SANDBOX_API_URL in the minimal-react-native and blur-example hooks/templates.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 24 comments.

Show a summary per file
File Description
web-react/text-chat/src/App.tsx Passes sandboxApiUrl to useSandbox via VITE_SANDBOX_API_URL.
web-react/text-chat/.env.example Adds VITE_SANDBOX_API_URL to the env template.
web-react/minimal-react/.env.example Adds VITE_SANDBOX_API_URL to the env template.
web-react/livestreaming/src/components/LivestreamViewer.tsx Passes sandboxApiUrl to useSandbox via VITE_SANDBOX_API_URL.
web-react/livestreaming/src/components/LivestreamStreamer.tsx Passes sandboxApiUrl to useSandbox via VITE_SANDBOX_API_URL.
web-react/livestreaming/.env.example Adds VITE_SANDBOX_API_URL to the env template.
web-react/fishjam-chat/src/components/JoinRoomCard.tsx Passes sandboxApiUrl to useSandbox via VITE_SANDBOX_API_URL.
web-react/fishjam-chat/.env.example Introduces an env template including VITE_SANDBOX_API_URL.
web-react/audio-only/src/JoinRoomForm.tsx Passes sandboxApiUrl to useSandbox via VITE_SANDBOX_API_URL.
web-react/audio-only/.env.example Adds VITE_SANDBOX_API_URL to the env template.
mobile-react-native/video-player/components/FishjamPlayerViewer.tsx Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/video-player/components/FishjamPlayerStreamer.tsx Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/video-player/.env.example Adds EXPO_PUBLIC_SANDBOX_API_URL to the env template.
mobile-react-native/text-chat/hooks/useConnectFishjam.ts Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/text-chat/.env.example Adds EXPO_PUBLIC_SANDBOX_API_URL to the env template.
mobile-react-native/minimal-react-native/hooks/useConnectFishjam.ts Renames the env var used for sandboxApiUrl to EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/minimal-react-native/.env.example Adds EXPO_PUBLIC_SANDBOX_API_URL to the env template.
mobile-react-native/fishjam-chat/app/room/preview.tsx Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/fishjam-chat/app/livestream/viewer.tsx Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/fishjam-chat/app/livestream/streamer.tsx Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/fishjam-chat/app/livestream/screen-sharing.tsx Passes sandboxApiUrl to useSandbox via EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/fishjam-chat/.env.example Adds EXPO_PUBLIC_SANDBOX_API_URL to the env template.
mobile-react-native/blur-example/hooks/useConnectFishjam.ts Renames the env var used for sandboxApiUrl to EXPO_PUBLIC_SANDBOX_API_URL.
mobile-react-native/blur-example/.env.example Replaces EXPO_PUBLIC_FISHJAM_URL with EXPO_PUBLIC_SANDBOX_API_URL in the env template.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +23 to +25
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines +29 to +31
const { getSandboxViewerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines 54 to +58
const [isConnecting, setIsConnecting] = useState(false);

const { getSandboxLivestream } = useSandbox();
const { getSandboxLivestream } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines +68 to +69
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
Comment on lines +16 to +18
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
@@ -1 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
@@ -1 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
@@ -1 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
Comment on lines 1 to +2
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_FISHJAM_URL= No newline at end of file
EXPO_PUBLIC_SANDBOX_API_URL= No newline at end of file
@@ -1,2 +1,3 @@
EXPO_PUBLIC_FISHJAM_ID=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants