Skip to content
Open
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
2 changes: 1 addition & 1 deletion mobile-react-native/blur-example/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_FISHJAM_URL=
EXPO_PUBLIC_SANDBOX_API_URL=
Comment on lines 1 to +2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useConnectFishjam = () => {
const { leaveRoom, joinRoom } = useConnection();
const { getSandboxPeerToken } = useSandbox({
configOverride: {
sandboxApiUrl: process.env.EXPO_PUBLIC_FISHJAM_URL,
sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL,
},
});
Comment on lines 15 to 20
const { initializeDevices } = useInitializeDevices();
Expand Down
1 change: 1 addition & 0 deletions mobile-react-native/fishjam-chat/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
EXPO_PUBLIC_VIDEOROOM_STAGING_SANDBOX_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export default function LivestreamScreenSharingScreen() {
}>();

const { initializeDevices } = useInitializeDevices();
const { getSandboxLivestream } = useSandbox();
const { getSandboxLivestream } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
});
Comment on lines 20 to +24
const { connect, disconnect, isConnected, error } = useLivestreamStreamer();
const {
startStreaming: startScreenCapture,
Expand Down
4 changes: 3 additions & 1 deletion mobile-react-native/fishjam-chat/app/livestream/streamer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export default function LivestreamStreamerScreen() {
roomName: string;
}>();

const { getSandboxLivestream } = useSandbox();
const { getSandboxLivestream } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
Comment on lines +23 to +24
});

const { connect, disconnect, isConnected, error } = useLivestreamStreamer();

Expand Down
4 changes: 3 additions & 1 deletion mobile-react-native/fishjam-chat/app/livestream/viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export default function LivestreamViewerScreen() {
roomName: string;
}>();

const { getSandboxViewerToken } = useSandbox({});
const { getSandboxViewerToken } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
});

Comment on lines +19 to 22
const { connect, disconnect, stream, isConnected, error } =
useLivestreamViewer();
Expand Down
4 changes: 3 additions & 1 deletion mobile-react-native/fishjam-chat/app/room/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default function PreviewScreen() {
userName: string;
}>();

const { getSandboxPeerToken } = useSandbox();
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
Comment on lines +24 to +25
});

const { initializeDevices } = useInitializeDevices();
const { cameraStream, startCamera, stopCamera, isCameraOn, toggleCamera } =
Expand Down
1 change: 1 addition & 0 deletions mobile-react-native/minimal-react-native/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useConnectFishjam = () => {
const { leaveRoom, joinRoom } = useConnection();
const { getSandboxPeerToken } = useSandbox({
configOverride: {
sandboxApiUrl: process.env.EXPO_PUBLIC_FISHJAM_URL,
sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL,
},
});
Comment on lines 15 to 20
const { initializeDevices } = useInitializeDevices();
Expand Down
1 change: 1 addition & 0 deletions mobile-react-native/text-chat/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
4 changes: 3 additions & 1 deletion mobile-react-native/text-chat/hooks/useConnectFishjam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import type { RootStackParamList } from '../navigation/RootNavigation';
export const useConnectFishjam = () => {
const navigation = useNavigation<NavigationProp<RootStackParamList>>();
const { leaveRoom, joinRoom } = useConnection();
const { getSandboxPeerToken } = useSandbox();
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
});
Comment on lines +11 to +13

const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<Error | null>(null);
Expand Down
1 change: 1 addition & 0 deletions mobile-react-native/video-player/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
EXPO_PUBLIC_FISHJAM_ID=
EXPO_PUBLIC_SANDBOX_API_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import { useEffect } from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';

export const FishjamPlayerStreamer = ({ roomName }: { roomName: string }) => {
const { getSandboxLivestream } = useSandbox();
const { getSandboxLivestream } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
});
Comment on lines +13 to +15

const { toggleCamera, stopCamera, startCamera, isCameraOn, cameraStream } =
useCamera();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { useEffect } from 'react';
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native';

export const FishjamPlayerViewer = ({ roomName }: { roomName: string }) => {
const { getSandboxViewerToken } = useSandbox();
const { getSandboxViewerToken } = useSandbox({
configOverride: { sandboxApiUrl: process.env.EXPO_PUBLIC_SANDBOX_API_URL },
});
Comment on lines +10 to +12
const { connect, disconnect, stream } = useLivestreamViewer();

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions web-react/audio-only/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_FISHJAM_ID=
VITE_SANDBOX_API_URL=
4 changes: 3 additions & 1 deletion web-react/audio-only/src/JoinRoomForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ type JoinRoomFormProps = {

export const JoinRoomForm: FC<JoinRoomFormProps> = ({ onJoinedRoom }) => {
const { joinRoom } = useConnection();
const { getSandboxPeerToken } = useSandbox();
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines +16 to +18

const onJoinRoom = useCallback(
async (params: RoomManagerParams) => {
Expand Down
2 changes: 2 additions & 0 deletions web-react/fishjam-chat/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_FISHJAM_ID="your-fishjam-id" # get it at https://fishjam.io/app/
VITE_SANDBOX_API_URL=
4 changes: 3 additions & 1 deletion web-react/fishjam-chat/src/components/JoinRoomCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export const JoinRoomCard: FC<Props> = ({ onFishjamIdChange, ...props }) => {
onFishjamIdChange(formFishjamId);
}, [formFishjamId, onFishjamIdChange]);

const { getSandboxPeerToken } = useSandbox();
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
Comment on lines +68 to +69
});

const initializeAndReport = useCallback(async () => {
const { errors } = await initializeDevices({
Expand Down
1 change: 1 addition & 0 deletions web-react/livestreaming/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_FISHJAM_ID="<fishjam_id>"
VITE_SANDBOX_API_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ const LivestreamStreamer: FC<LivestreamStreamerProps> = ({

const [isConnecting, setIsConnecting] = useState(false);

const { getSandboxLivestream } = useSandbox();
const { getSandboxLivestream } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines 54 to +58
const { connect, disconnect, isConnected, error } = useLivestreamStreamer();

const initializeAndReport = useCallback(async () => {
Expand Down
4 changes: 3 additions & 1 deletion web-react/livestreaming/src/components/LivestreamViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const LivestreamViewer: FC<LivestreamViewerProps> = ({
roomName: streamerRoomName,
}) => {
const { connect, disconnect, stream, error } = useLivestreamViewer();
const { getSandboxViewerToken } = useSandbox();
const { getSandboxViewerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines +29 to +31
const [nameOverridden, setNameOverridden] = useState(false);
const [roomName, setRoomName] = useState(streamerRoomName);

Expand Down
1 change: 1 addition & 0 deletions web-react/minimal-react/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_FISHJAM_ID="your-fishjam-id" # get it at https://fishjam.io/app/
VITE_SANDBOX_API_URL=
1 change: 1 addition & 0 deletions web-react/text-chat/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_FISHJAM_ID="your-fishjam-id" # get it at https://fishjam.io/app/
VITE_SANDBOX_API_URL=
4 changes: 3 additions & 1 deletion web-react/text-chat/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export const App = () => {
const messagesEndRef = useRef<HTMLDivElement>(null);

const { joinRoom, leaveRoom, peerStatus } = useConnection();
const { getSandboxPeerToken } = useSandbox();
const { getSandboxPeerToken } = useSandbox({
configOverride: { sandboxApiUrl: import.meta.env.VITE_SANDBOX_API_URL },
});
Comment on lines +23 to +25
const {
publishData,
subscribeData,
Expand Down