Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Change namespace to Fishjam, rename the package to `@fishjam-dev/re…
Browse files Browse the repository at this point in the history
…act-client` (#77)
  • Loading branch information
balins authored May 24, 2024
1 parent 9feb61c commit 56bc0f4
Show file tree
Hide file tree
Showing 32 changed files with 131 additions and 3,212 deletions.
2 changes: 1 addition & 1 deletion examples/minimal-react/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jellyfish Minimal React</title>
<title>Fishjam Minimal React</title>
</head>
<body>
<div id="root"></div>
Expand Down
18 changes: 9 additions & 9 deletions examples/minimal-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/minimal-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"preview": "vite preview"
},
"dependencies": {
"@jellyfish-dev/react-client-sdk": "file:../..",
"@fishjam-dev/react-client": "file:../..",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-react/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import VideoPlayer from "./VideoPlayer";
import { SCREEN_SHARING_MEDIA_CONSTRAINTS, Client } from "@jellyfish-dev/react-client-sdk";
import { SCREEN_SHARING_MEDIA_CONSTRAINTS, Client } from "@fishjam-dev/react-client";
import { useState } from "react";
import { useConnect, useDisconnect, useClient, useStatus, useTracks } from "./client";

Expand Down
6 changes: 3 additions & 3 deletions examples/minimal-react/src/components/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { create } from "@jellyfish-dev/react-client-sdk";
import { create } from "@fishjam-dev/react-client";
import { PeerMetadata, TrackMetadata } from "./App";

// Create a Membrane client instance
// remember to use JellyfishContextProvider
export const { useClient, useTracks, useStatus, useConnect, useDisconnect, useSelector, JellyfishContextProvider } =
// remember to use FishjamContextProvider
export const { useClient, useTracks, useStatus, useConnect, useDisconnect, useSelector, FishjamContextProvider } =
create<PeerMetadata, TrackMetadata>();
6 changes: 3 additions & 3 deletions examples/minimal-react/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { App } from "./components/App";
import { JellyfishContextProvider } from "./components/client";
import { FishjamContextProvider } from "./components/client";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<JellyfishContextProvider>
<FishjamContextProvider>
<App />
</JellyfishContextProvider>
</FishjamContextProvider>
</React.StrictMode>,
);
16 changes: 8 additions & 8 deletions examples/use-camera-and-microphone-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/use-camera-and-microphone-example/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "example-jellyfish-app",
"name": "example-fishjam-app",
"private": true,
"version": "0.0.0",
"type": "module",
Expand All @@ -9,7 +9,7 @@
"build": "tsc && vite build"
},
"dependencies": {
"@jellyfish-dev/react-client-sdk": "file:../..",
"@fishjam-dev/react-client": "file:../..",
"jotai": "^2.6.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
useCamera,
useMicrophone,
useStatus,
} from "./jellyfishSetup";
} from "./fishjamSetup";
import { DeviceControls } from "./DeviceControls";
import { atomWithStorage } from "jotai/utils";
import { useAtom } from "jotai";
Expand Down
2 changes: 1 addition & 1 deletion examples/use-camera-and-microphone-example/src/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PeerStatus } from "@jellyfish-dev/react-client-sdk";
import { PeerStatus } from "@fishjam-dev/react-client";

type Props = {
status: PeerStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import {
PeerStatus,
UseMicrophoneResult,
UseCameraResult,
UseScreenShareResult,
} from "@jellyfish-dev/react-client-sdk";
import { TrackMetadata } from "./jellyfishSetup";
import { PeerStatus, UseMicrophoneResult, UseCameraResult, UseScreenShareResult } from "@fishjam-dev/react-client";
import { TrackMetadata } from "./fishjamSetup";

type DeviceControlsProps = {
status: PeerStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import {
useSelector,
useSetupMedia,
useStatus,
} from "./jellyfishSetup";
} from "./fishjamSetup";
import VideoPlayer from "./VideoPlayer";
import { DeviceSelector } from "./DeviceSelector";
import { useAtom } from "jotai";
import { atomWithStorage } from "jotai/utils";
import { ThreeStateRadio } from "./ThreeStateRadio";
import AudioVisualizer from "./AudioVisualizer";
import { AUDIO_TRACK_CONSTRAINTS, VIDEO_TRACK_CONSTRAINTS } from "@jellyfish-dev/react-client-sdk";
import { AUDIO_TRACK_CONSTRAINTS, VIDEO_TRACK_CONSTRAINTS } from "@fishjam-dev/react-client";
import { Badge } from "./Badge";
import { DeviceControls } from "./DeviceControls";
import { Radio } from "./Radio";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { z } from "zod";
import { ClientEvents, create } from "@jellyfish-dev/react-client-sdk";
import { ClientEvents, create } from "@fishjam-dev/react-client";
import { useEffect, useState } from "react";

const peerMetadataSchema = z.object({
Expand Down Expand Up @@ -53,7 +53,7 @@ export const {
useStatus,
useConnect,
useDisconnect,
JellyfishContextProvider,
FishjamContextProvider,
useSetupMedia,
useCamera,
useMicrophone,
Expand Down
6 changes: 3 additions & 3 deletions examples/use-camera-and-microphone-example/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import React from "react";
import ReactDOM from "react-dom/client";
import MainControls from "./MainControls";
import "./index.css";
import { JellyfishContextProvider } from "./jellyfishSetup";
import { FishjamContextProvider } from "./fishjamSetup";
import AdditionalControls from "./AdditionalControls";

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<JellyfishContextProvider>
<FishjamContextProvider>
<MainControls />
<AdditionalControls />
</JellyfishContextProvider>
</FishjamContextProvider>
</React.StrictMode>,
);
Loading

0 comments on commit 56bc0f4

Please sign in to comment.