From c88255c2cd84f5b747b161e8ec2169394b3b28f0 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Fri, 24 May 2024 15:07:37 +0200 Subject: [PATCH] Update react-client --- .env.example | 2 +- .../workflows/production_build_and_deploy.yml | 2 +- .../workflows/sandbox_build_and_deploy.yml | 2 +- .../workflows/staging_build_and_deploy.yml | 2 +- README.md | 4 +- assets/Dockerfile | 4 +- assets/package-lock.json | 44 +++++++++---------- assets/package.json | 2 +- assets/src/App.tsx | 6 +-- .../devices/LocalMediaMessagesBoundary.tsx | 4 +- .../devices/LocalPeerMediaContext.tsx | 4 +- .../features/devices/MediaSettingsModal.tsx | 2 +- .../home-page/components/HomePageLayout.tsx | 4 +- .../components/HomePageVideoTile.tsx | 2 +- .../components/VideoroomHomePage.tsx | 2 +- assets/src/features/recording/useRecording.ts | 4 +- .../room-page/components/PeopleComponent.tsx | 2 +- .../features/room-page/components/Sidebar.tsx | 2 +- .../streaming/StreamingErrorBoundary.tsx | 2 +- assets/src/{jellyfish.types.ts => fishjam.ts} | 4 +- assets/src/pages/room/RoomPage.tsx | 2 +- assets/src/pages/room/VideochatSection.tsx | 2 +- assets/src/pages/room/bandwidth.tsx | 4 +- .../room/components/MediaControlButtons.tsx | 4 +- .../StreamPlayer/PinnedTilesSection.tsx | 2 +- .../StreamPlayer/RemoteMediaPlayerTile.tsx | 4 +- .../StreamPlayer/UnpinnedTilesSection.tsx | 2 +- .../simulcast/SimulcastEncodingToReceive.tsx | 2 +- .../simulcast/SimulcastReceivingEncoding.tsx | 2 +- assets/src/pages/room/consts.ts | 4 +- .../hooks/useAutomaticEncodingSwitching.tsx | 2 +- assets/src/pages/room/hooks/usePeerState.tsx | 4 +- .../room/hooks/useSimulcastRemoteEncoding.tsx | 4 +- .../src/pages/room/hooks/useSimulcastSend.tsx | 4 +- .../room/hooks/useStoreFirstNonNullValue.tsx | 2 +- .../src/pages/room/hooks/useTilePinning.tsx | 4 +- assets/src/pages/types.ts | 2 +- docker-compose-deploy.yaml | 2 +- docker-compose-dev.yaml | 2 +- docker-compose.yaml | 6 +-- grafana/provisioning/dashboards/metrics.json | 2 +- mix.exs | 2 +- openapi.yaml | 2 +- prometheus/Dockerfile | 6 +-- prometheus/prometheus.yaml | 2 +- .../controllers/room_json_test.exs | 12 ++--- 46 files changed, 93 insertions(+), 93 deletions(-) rename assets/src/{jellyfish.types.ts => fishjam.ts} (96%) diff --git a/.env.example b/.env.example index 62d43c04..d4563b54 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -#JELLYFISH +#FISHJAM # TURN default configuration # note: loopback address as EXTERNAL_IP cannot be used inside a Docker container # EXTERNAL_IP= diff --git a/.github/workflows/production_build_and_deploy.yml b/.github/workflows/production_build_and_deploy.yml index 6b04b370..1233fe11 100644 --- a/.github/workflows/production_build_and_deploy.yml +++ b/.github/workflows/production_build_and_deploy.yml @@ -29,7 +29,7 @@ jobs: run: | echo "DOMAIN=${{env.DOMAIN}} FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }} - JELLYFISH_VERSION=${{ steps.versions.outputs.fishjam }} + FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }} JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_PRODUCTION}} BE_HOST=${{env.BE_HOST}} BE_JF_SECURE_CONNECTION=true diff --git a/.github/workflows/sandbox_build_and_deploy.yml b/.github/workflows/sandbox_build_and_deploy.yml index 9482bd27..aca3ba39 100644 --- a/.github/workflows/sandbox_build_and_deploy.yml +++ b/.github/workflows/sandbox_build_and_deploy.yml @@ -31,7 +31,7 @@ jobs: run: | echo "DOMAIN=${{env.DOMAIN}} FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }} - JELLYFISH_VERSION=${{ steps.versions.outputs.fishjam }} + FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }} JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_SANDBOX}} BE_HOST=${{env.BE_HOST}} BE_JF_SECURE_CONNECTION=true diff --git a/.github/workflows/staging_build_and_deploy.yml b/.github/workflows/staging_build_and_deploy.yml index 55454554..fd23c46e 100644 --- a/.github/workflows/staging_build_and_deploy.yml +++ b/.github/workflows/staging_build_and_deploy.yml @@ -29,7 +29,7 @@ jobs: run: | echo "DOMAIN=${{env.DOMAIN}} FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }} - JELLYFISH_VERSION=${{ steps.versions.outputs.fishjam }} + FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }} JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_STAGING}} BE_HOST=${{env.BE_HOST}} BE_JF_SECURE_CONNECTION=true diff --git a/README.md b/README.md index 30c1d3f0..d42defa9 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,8 @@ DOMAIN= JF1_IP= # IP address of first node on which fishjam will be run JF2_IP= # IP address of second node on which fishjam will be run JF_SERVER_API_TOKEN= #The same API token is used for all fishjams -JF1_HOST= OR : # Value passed to fishjam and returns by it when creating a room on this speicific fishjam -JF2_HOST= OR : +JF1_HOST= OR : # Value passed to fishjam and returns by it when creating a room on this speicific fishjam +JF2_HOST= OR : BE_JF_ADDRESSES= #Used by backend to create a notifier to one of fishjams PROMETHEUS_TARGETS=:9568,:9568 #Addresses on which prometheus will query for data BE_HOST= diff --git a/assets/Dockerfile b/assets/Dockerfile index bf9d1f4a..fbde252d 100644 --- a/assets/Dockerfile +++ b/assets/Dockerfile @@ -5,10 +5,10 @@ WORKDIR '/app' ARG FE_BE_HOST ARG FISHJAM_ROOM_VERSION -ARG JELLYFISH_VERSION +ARG FISHJAM_VERSION ENV VITE_BE_HOST=$FE_BE_HOST ENV VITE_FISHJAM_ROOM_VERSION=$FISHJAM_ROOM_VERSION -ENV VITE_JELLYFISH_VERSION=$JELLYFISH_VERSION +ENV VITE_FISHJAM_VERSION=$FISHJAM_VERSION # Install nodejs and npm RUN apk add --no-cache nodejs npm diff --git a/assets/package-lock.json b/assets/package-lock.json index 61a39e79..553d3cb7 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/react-client-sdk": "^0.3.1", + "@fishjam-dev/react-client": "^0.4.0", "@mediapipe/tasks-vision": "^0.10.12", "axios": "^1.6.8", "chartist": "^1.3.0", @@ -1033,6 +1033,27 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fishjam-dev/react-client": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@fishjam-dev/react-client/-/react-client-0.4.0.tgz", + "integrity": "sha512-hZBbJkuq7f+tDSi8W/ESgIw6VBwMu7Td6wP/RACmuY250Qs1aI5pFV181vZFyTtKuLBNOSE5rLpORljec7kDcg==", + "dependencies": { + "@fishjam-dev/ts-client": "^0.5.0", + "events": "3.3.0", + "lodash.isequal": "4.5.0" + } + }, + "node_modules/@fishjam-dev/ts-client": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@fishjam-dev/ts-client/-/ts-client-0.5.0.tgz", + "integrity": "sha512-Hbcm0hcjovj8zEu9R6A5uFAVpZNLrO/ycV6W+wQyzIkJn6/sUgunqdqyRHYgsnNz2WMM1J4SI0P5tonMAvTViQ==", + "dependencies": { + "events": "^3.3.0", + "ts-proto": "^1.165.0", + "typed-emitter": "^2.1.0", + "uuid": "^9.0.1" + } + }, "node_modules/@floating-ui/core": { "version": "1.3.1", "license": "MIT" @@ -1076,27 +1097,6 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, - "node_modules/@jellyfish-dev/react-client-sdk": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jellyfish-dev/react-client-sdk/-/react-client-sdk-0.3.1.tgz", - "integrity": "sha512-j7IMHgWjqpHfijbCX3lsE9vo9BGm7o/N3XW+W/pymiAdm34EGBZ1HSxn6B8ky4vz3YmEzp7sr74Ha37GNT7hAQ==", - "dependencies": { - "@jellyfish-dev/ts-client-sdk": "^0.4.0", - "events": "3.3.0", - "lodash.isequal": "4.5.0" - } - }, - "node_modules/@jellyfish-dev/ts-client-sdk": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@jellyfish-dev/ts-client-sdk/-/ts-client-sdk-0.4.0.tgz", - "integrity": "sha512-lg3jcqxEA1H4NMDv3m1Ipwkjhzd3+nvqjPFGXD/b1LFk0nIN8VVZs/Hqv+BzEI2QzYlziYgeGxl75YLJDI+TNg==", - "dependencies": { - "events": "^3.3.0", - "ts-proto": "^1.165.0", - "typed-emitter": "^2.1.0", - "uuid": "^9.0.1" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "dev": true, diff --git a/assets/package.json b/assets/package.json index 1f4867ac..66ae09cc 100644 --- a/assets/package.json +++ b/assets/package.json @@ -11,7 +11,7 @@ "preview": "vite preview" }, "dependencies": { - "@jellyfish-dev/react-client-sdk": "^0.3.1", + "@fishjam-dev/react-client": "^0.4.0", "@mediapipe/tasks-vision": "^0.10.12", "axios": "^1.6.8", "chartist": "^1.3.0", diff --git a/assets/src/App.tsx b/assets/src/App.tsx index 3e1010b0..da654340 100644 --- a/assets/src/App.tsx +++ b/assets/src/App.tsx @@ -12,7 +12,7 @@ import ReactModal from "react-modal"; import "./index.css"; import { StreamingErrorBoundary } from "./features/streaming/StreamingErrorBoundary"; -import { JellyfishContextProvider } from "./jellyfish.types"; +import { FishjamContextProvider } from "./fishjam"; // When returning to the videoroom page from another domain using the 'Back' button on the Safari browser, // the page is served from the cache, which prevents lifecycle events from being triggered. @@ -24,7 +24,7 @@ const App: FC = () => { return ( - + @@ -36,7 +36,7 @@ const App: FC = () => { - + ); diff --git a/assets/src/features/devices/LocalMediaMessagesBoundary.tsx b/assets/src/features/devices/LocalMediaMessagesBoundary.tsx index d20d16c2..a92e190a 100644 --- a/assets/src/features/devices/LocalMediaMessagesBoundary.tsx +++ b/assets/src/features/devices/LocalMediaMessagesBoundary.tsx @@ -7,8 +7,8 @@ import { useCamera, useClient, useMicrophone -} from "../../jellyfish.types.ts"; -import { ClientEvents } from "@jellyfish-dev/react-client-sdk"; +} from "../../fishjam.ts"; +import { ClientEvents } from "@fishjam-dev/react-client"; const prepareErrorMessage = (videoDeviceError: string | null, audioDeviceError: string | null): null | string => { if (videoDeviceError && audioDeviceError) { diff --git a/assets/src/features/devices/LocalPeerMediaContext.tsx b/assets/src/features/devices/LocalPeerMediaContext.tsx index a485c999..90b628c4 100644 --- a/assets/src/features/devices/LocalPeerMediaContext.tsx +++ b/assets/src/features/devices/LocalPeerMediaContext.tsx @@ -4,8 +4,8 @@ import { SCREENSHARING_TRACK_CONSTRAINTS, VIDEO_TRACK_CONSTRAINTS } from "../../pages/room/consts"; -import { PeerMetadata, TrackMetadata, useCamera, useClient, useMicrophone, useSetupMedia } from "../../jellyfish.types"; -import { ClientEvents, UseCameraResult, SimulcastConfig } from "@jellyfish-dev/react-client-sdk"; +import { PeerMetadata, TrackMetadata, useCamera, useClient, useMicrophone, useSetupMedia } from "../../fishjam"; +import { ClientEvents, UseCameraResult, SimulcastConfig } from "@fishjam-dev/react-client"; import { BlurProcessor } from "./BlurProcessor"; import { selectBandwidthLimit } from "../../pages/room/bandwidth.tsx"; import { useDeveloperInfo } from "../../contexts/DeveloperInfoContext.tsx"; diff --git a/assets/src/features/devices/MediaSettingsModal.tsx b/assets/src/features/devices/MediaSettingsModal.tsx index 30c89ad5..7563c7fe 100644 --- a/assets/src/features/devices/MediaSettingsModal.tsx +++ b/assets/src/features/devices/MediaSettingsModal.tsx @@ -6,7 +6,7 @@ import { Modal } from "../shared/components/modal/Modal"; import { Checkbox } from "../shared/components/Checkbox"; import { useRecording } from "../recording/useRecording"; import Button from "../shared/components/Button"; -import { useCamera, useMicrophone } from "../../jellyfish.types.ts"; +import { useCamera, useMicrophone } from "../../fishjam.ts"; export const MediaSettingsModal: React.FC = () => { const { setOpen, isOpen } = useModal(); diff --git a/assets/src/features/home-page/components/HomePageLayout.tsx b/assets/src/features/home-page/components/HomePageLayout.tsx index 9676d4ca..523e6692 100644 --- a/assets/src/features/home-page/components/HomePageLayout.tsx +++ b/assets/src/features/home-page/components/HomePageLayout.tsx @@ -4,7 +4,7 @@ import BlockingScreen from "../../shared/components/BlockingScreen"; import Navbar from "./Navbar"; import useSmartphoneViewport from "../../shared/hooks/useSmartphoneViewport"; -import { JELLYFISH_VERSION, FISHJAM_ROOM_VERSION } from "../../../pages/room/consts"; +import { FISHJAM_VERSION, FISHJAM_ROOM_VERSION } from "../../../pages/room/consts"; const HomePageLayout: FC = ({ children }) => { const { isSmartphone, isHorizontal } = useSmartphoneViewport(); @@ -25,7 +25,7 @@ const HomePageLayout: FC = ({ children }) => {
- {`${FISHJAM_ROOM_VERSION} (jellyfish ${JELLYFISH_VERSION})`} + {`${FISHJAM_ROOM_VERSION} (fishjam ${FISHJAM_VERSION})`}
diff --git a/assets/src/features/home-page/components/HomePageVideoTile.tsx b/assets/src/features/home-page/components/HomePageVideoTile.tsx index cd7c5ac3..a09ec69b 100644 --- a/assets/src/features/home-page/components/HomePageVideoTile.tsx +++ b/assets/src/features/home-page/components/HomePageVideoTile.tsx @@ -9,7 +9,7 @@ import MicrophoneOff from "../../room-page/icons/MicrophoneOff"; import Settings from "../../room-page/icons/Settings"; import { useModal } from "../../../contexts/ModalContext"; import GenericMediaPlayerTile from "../../../pages/room/components/StreamPlayer/GenericMediaPlayerTile"; -import { useMicrophone } from "../../../jellyfish.types.ts"; +import { useMicrophone } from "../../../fishjam.ts"; import { useLocalPeer } from "../../devices/LocalPeerMediaContext.tsx"; type HomePageVideoTileProps = { diff --git a/assets/src/features/home-page/components/VideoroomHomePage.tsx b/assets/src/features/home-page/components/VideoroomHomePage.tsx index 20924fc8..29522c5f 100644 --- a/assets/src/features/home-page/components/VideoroomHomePage.tsx +++ b/assets/src/features/home-page/components/VideoroomHomePage.tsx @@ -15,7 +15,7 @@ import HomePageLayout from "./HomePageLayout"; import HomePageVideoTile from "./HomePageVideoTile"; import { useLocalPeer } from "../../devices/LocalPeerMediaContext"; -import { useMicrophone } from "../../../jellyfish.types.ts"; +import { useMicrophone } from "../../../fishjam.ts"; const VideoroomHomePage: FC = () => { const lastDisplayName: string | null = localStorage.getItem("displayName"); diff --git a/assets/src/features/recording/useRecording.ts b/assets/src/features/recording/useRecording.ts index 107b38a8..aa48ef93 100644 --- a/assets/src/features/recording/useRecording.ts +++ b/assets/src/features/recording/useRecording.ts @@ -1,9 +1,9 @@ import { useCallback, useEffect, useState } from "react"; -import { PeerMetadata, TrackMetadata, useClient, useStatus } from "../../jellyfish.types"; +import { PeerMetadata, TrackMetadata, useClient, useStatus } from "../../fishjam"; import { useParams } from "react-router-dom"; import useToast from "../shared/hooks/useToast"; import { startRecording as startRecordingOpenApi } from "../../room.api"; -import { ClientEvents } from "@jellyfish-dev/react-client-sdk"; +import { ClientEvents } from "@fishjam-dev/react-client"; type UseRecording = { canStartRecording: boolean; diff --git a/assets/src/features/room-page/components/PeopleComponent.tsx b/assets/src/features/room-page/components/PeopleComponent.tsx index 34b9ac63..acbc1dcb 100644 --- a/assets/src/features/room-page/components/PeopleComponent.tsx +++ b/assets/src/features/room-page/components/PeopleComponent.tsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import { FC } from "react"; import { computeInitials } from "./InitialsImage"; -import { useSelector } from "../../../jellyfish.types"; +import { useSelector } from "../../../fishjam"; type PeopleListItem = { peerId: string; diff --git a/assets/src/features/room-page/components/Sidebar.tsx b/assets/src/features/room-page/components/Sidebar.tsx index 84af3b67..47e03a47 100644 --- a/assets/src/features/room-page/components/Sidebar.tsx +++ b/assets/src/features/room-page/components/Sidebar.tsx @@ -3,7 +3,7 @@ import { FC } from "react"; import Button from "../../shared/components/Button"; import ChevronDown from "../icons/ChevronDown"; import PeopleComponent from "./PeopleComponent"; -import { useSelector } from "../../../jellyfish.types"; +import { useSelector } from "../../../fishjam"; type SidebarProps = { onClose?: () => void; diff --git a/assets/src/features/streaming/StreamingErrorBoundary.tsx b/assets/src/features/streaming/StreamingErrorBoundary.tsx index b5064862..c07dda4a 100644 --- a/assets/src/features/streaming/StreamingErrorBoundary.tsx +++ b/assets/src/features/streaming/StreamingErrorBoundary.tsx @@ -1,7 +1,7 @@ import { FC, PropsWithChildren, useCallback, useEffect, useState } from "react"; import useToast from "../shared/hooks/useToast"; import { ErrorMessage, messageComparator } from "../../pages/room/errorMessage"; -import { useClient } from "../../jellyfish.types"; +import { useClient } from "../../fishjam"; import useEffectOnChange from "../shared/hooks/useEffectOnChange"; export const StreamingErrorBoundary: FC = ({ children }) => { diff --git a/assets/src/jellyfish.types.ts b/assets/src/fishjam.ts similarity index 96% rename from assets/src/jellyfish.types.ts rename to assets/src/fishjam.ts index a780d880..1fdd92cf 100644 --- a/assets/src/jellyfish.types.ts +++ b/assets/src/fishjam.ts @@ -1,7 +1,7 @@ import { toPairs } from "ramda"; import { TrackWithId } from "./pages/types"; import { ApiTrack, RemotePeer } from "./pages/room/hooks/usePeerState"; -import { create, State } from "@jellyfish-dev/react-client-sdk"; +import { create, State } from "@fishjam-dev/react-client"; import { z } from "zod"; const trackTypeSchema = z.union([z.literal("screensharing"), z.literal("camera"), z.literal("audio")]); @@ -33,7 +33,7 @@ export const { useScreenShare, useTracks, useClient, - JellyfishContextProvider + FishjamContextProvider } = create({ peerMetadataParser: (obj) => peerMetadataSchema.parse(obj), trackMetadataParser: (obj) => trackMetadataSchema.parse(obj), diff --git a/assets/src/pages/room/RoomPage.tsx b/assets/src/pages/room/RoomPage.tsx index eb64b188..36d87b90 100644 --- a/assets/src/pages/room/RoomPage.tsx +++ b/assets/src/pages/room/RoomPage.tsx @@ -6,7 +6,7 @@ import PageLayout from "../../features/room-page/components/PageLayout"; import { useAcquireWakeLockAutomatically } from "./hooks/useAcquireWakeLockAutomatically"; import clsx from "clsx"; import RoomSidebar from "./RoomSidebar"; -import { useClient, useConnect, useDisconnect } from "../../jellyfish.types.ts"; +import { useClient, useConnect, useDisconnect } from "../../fishjam.ts"; import { useUser } from "../../contexts/UserContext"; import { useLocalPeer } from "../../features/devices/LocalPeerMediaContext.tsx"; import { InboundRtpId, useDeveloperInfo } from "../../contexts/DeveloperInfoContext.tsx"; diff --git a/assets/src/pages/room/VideochatSection.tsx b/assets/src/pages/room/VideochatSection.tsx index ee6f6e15..5c86423d 100644 --- a/assets/src/pages/room/VideochatSection.tsx +++ b/assets/src/pages/room/VideochatSection.tsx @@ -9,7 +9,7 @@ import { MediaPlayerTileConfig, PeerTileConfig, ScreenShareTileConfig, TrackWith import UnpinnedTilesSection from "./components/StreamPlayer/UnpinnedTilesSection"; import PinnedTilesSection from "./components/StreamPlayer/PinnedTilesSection"; import useTilePinning from "./hooks/useTilePinning"; -import { toLocalTrackSelector, toRemotePeerSelector, TrackType, useSelector } from "../../jellyfish.types"; +import { toLocalTrackSelector, toRemotePeerSelector, TrackType, useSelector } from "../../fishjam"; type Props = { showSimulcast: boolean; diff --git a/assets/src/pages/room/bandwidth.tsx b/assets/src/pages/room/bandwidth.tsx index a987825e..09d1ced0 100644 --- a/assets/src/pages/room/bandwidth.tsx +++ b/assets/src/pages/room/bandwidth.tsx @@ -1,5 +1,5 @@ -import { BandwidthLimit, SimulcastBandwidthLimit, TrackBandwidthLimit } from "@jellyfish-dev/react-client-sdk"; -import { TrackType } from "../../jellyfish.types.ts"; +import { BandwidthLimit, SimulcastBandwidthLimit, TrackBandwidthLimit } from "@fishjam-dev/react-client"; +import { TrackType } from "../../fishjam.ts"; const NO_LIMIT: BandwidthLimit = 0; const DEFAULT_LIMIT: BandwidthLimit = 1500; diff --git a/assets/src/pages/room/components/MediaControlButtons.tsx b/assets/src/pages/room/components/MediaControlButtons.tsx index 34812fc6..ec090ab5 100644 --- a/assets/src/pages/room/components/MediaControlButtons.tsx +++ b/assets/src/pages/room/components/MediaControlButtons.tsx @@ -21,8 +21,8 @@ import { useClient, useMicrophone, useScreenShare -} from "../../../jellyfish.types.ts"; -import { UseCameraResult, UseMicrophoneResult, UseScreenShareResult, Client } from "@jellyfish-dev/react-client-sdk"; +} from "../../../fishjam.ts"; +import { UseCameraResult, UseMicrophoneResult, UseScreenShareResult, Client } from "@fishjam-dev/react-client"; import { LocalPeerContext, useLocalPeer } from "../../../features/devices/LocalPeerMediaContext.tsx"; import { useUser } from "../../../contexts/UserContext.tsx"; diff --git a/assets/src/pages/room/components/StreamPlayer/PinnedTilesSection.tsx b/assets/src/pages/room/components/StreamPlayer/PinnedTilesSection.tsx index 01b75727..2aa2d24c 100644 --- a/assets/src/pages/room/components/StreamPlayer/PinnedTilesSection.tsx +++ b/assets/src/pages/room/components/StreamPlayer/PinnedTilesSection.tsx @@ -1,6 +1,6 @@ import { FC, ReactNode } from "react"; import { MediaPlayerTileConfig } from "../../../types"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; import { PinTileLayer } from "../../../../features/room-page/components/PinComponents"; import { getGridConfig, GridConfigType } from "../../../../features/room-page/utils/getVideoGridConfig"; import clsx from "clsx"; diff --git a/assets/src/pages/room/components/StreamPlayer/RemoteMediaPlayerTile.tsx b/assets/src/pages/room/components/StreamPlayer/RemoteMediaPlayerTile.tsx index 9991c441..b893466b 100644 --- a/assets/src/pages/room/components/StreamPlayer/RemoteMediaPlayerTile.tsx +++ b/assets/src/pages/room/components/StreamPlayer/RemoteMediaPlayerTile.tsx @@ -1,9 +1,9 @@ import { ComponentProps, FC } from "react"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; import { useAutomaticEncodingSwitching } from "../../hooks/useAutomaticEncodingSwitching"; import { SimulcastEncodingToReceive } from "./simulcast/SimulcastEncodingToReceive"; import GenericMediaPlayerTile from "./GenericMediaPlayerTile"; -import { useTracks } from "../../../../jellyfish.types.ts"; +import { useTracks } from "../../../../fishjam.ts"; import { StatisticsLayer } from "./StatisticsLayer.tsx"; import { useDeveloperInfo } from "../../../../contexts/DeveloperInfoContext.tsx"; diff --git a/assets/src/pages/room/components/StreamPlayer/UnpinnedTilesSection.tsx b/assets/src/pages/room/components/StreamPlayer/UnpinnedTilesSection.tsx index 1076d695..a6443c83 100644 --- a/assets/src/pages/room/components/StreamPlayer/UnpinnedTilesSection.tsx +++ b/assets/src/pages/room/components/StreamPlayer/UnpinnedTilesSection.tsx @@ -1,6 +1,6 @@ import { FC, useMemo } from "react"; import RemoteMediaPlayerTile from "./RemoteMediaPlayerTile"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; import clsx from "clsx"; import { MediaPlayerTileConfig, TrackWithId } from "../../../types"; import PeerInfoLayer from "./PeerInfoLayer"; diff --git a/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastEncodingToReceive.tsx b/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastEncodingToReceive.tsx index a43a7e94..81dbb968 100644 --- a/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastEncodingToReceive.tsx +++ b/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastEncodingToReceive.tsx @@ -1,5 +1,5 @@ import { FC } from "react"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; import { Tooltip } from "./Tooltip"; import { LayerButton } from "./LayerButton"; diff --git a/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastReceivingEncoding.tsx b/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastReceivingEncoding.tsx index f88c69df..98e9bfa8 100644 --- a/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastReceivingEncoding.tsx +++ b/assets/src/pages/room/components/StreamPlayer/simulcast/SimulcastReceivingEncoding.tsx @@ -1,5 +1,5 @@ import { FC } from "react"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; type Props = { encoding?: TrackEncoding; diff --git a/assets/src/pages/room/consts.ts b/assets/src/pages/room/consts.ts index b383e359..dd0dc7d9 100644 --- a/assets/src/pages/room/consts.ts +++ b/assets/src/pages/room/consts.ts @@ -46,7 +46,7 @@ export const BACKEND_URL = isDevEnv ? new URL(`${protocol}://${import.meta.env.VITE_BE_HOST}`) // @ts-ignore -export const JELLYFISH_VERSION = import.meta.env.VITE_JELLYFISH_VERSION +export const FISHJAM_VERSION = import.meta.env.VITE_FISHJAM_VERSION // @ts-ignore export const FISHJAM_ROOM_VERSION = import.meta.env.VITE_FISHJAM_ROOM_VERSION @@ -63,7 +63,7 @@ export const getSignalingAddress = (serverAddress: String) => { } } -export const JELLYFISH_WEBSOCKET_PROTOCOL = isSecure ? "wss" : "ws"; +export const FISHJAM_WEBSOCKET_PROTOCOL = isSecure ? "wss" : "ws"; export const MAX_TILE_HEIGHT_FOR_MEDIUM_ENCODING = 600; export const MAX_TILE_HEIGHT_FOR_LOW_ENCODING = 250; diff --git a/assets/src/pages/room/hooks/useAutomaticEncodingSwitching.tsx b/assets/src/pages/room/hooks/useAutomaticEncodingSwitching.tsx index 372d8785..1498eab3 100644 --- a/assets/src/pages/room/hooks/useAutomaticEncodingSwitching.tsx +++ b/assets/src/pages/room/hooks/useAutomaticEncodingSwitching.tsx @@ -1,4 +1,4 @@ -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; import { useCallback, useEffect, useState } from "react"; import { useResizeDetector } from "react-resize-detector"; import { useStoreFirstNonNullValue } from "./useStoreFirstNonNullValue"; diff --git a/assets/src/pages/room/hooks/usePeerState.tsx b/assets/src/pages/room/hooks/usePeerState.tsx index 3a71e1fb..a273caac 100644 --- a/assets/src/pages/room/hooks/usePeerState.tsx +++ b/assets/src/pages/room/hooks/usePeerState.tsx @@ -1,6 +1,6 @@ import { useCallback, useMemo, useState } from "react"; -import { TrackEncoding, VadStatus} from "@jellyfish-dev/react-client-sdk"; -import { PeerMetadata, TrackType } from "../../../jellyfish.types.ts"; +import { TrackEncoding, VadStatus} from "@fishjam-dev/react-client"; +import { PeerMetadata, TrackType } from "../../../fishjam.ts"; export type ApiTrack = { trackId: string; diff --git a/assets/src/pages/room/hooks/useSimulcastRemoteEncoding.tsx b/assets/src/pages/room/hooks/useSimulcastRemoteEncoding.tsx index 814c0907..18c3a2d8 100644 --- a/assets/src/pages/room/hooks/useSimulcastRemoteEncoding.tsx +++ b/assets/src/pages/room/hooks/useSimulcastRemoteEncoding.tsx @@ -1,6 +1,6 @@ import { useCallback, useRef, useState } from "react"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; -import { useClient } from "../../../jellyfish.types.ts"; +import { TrackEncoding } from "@fishjam-dev/react-client"; +import { useClient } from "../../../fishjam.ts"; export type UseSimulcastRemoteEncodingResult = { targetEncoding: TrackEncoding | null; diff --git a/assets/src/pages/room/hooks/useSimulcastSend.tsx b/assets/src/pages/room/hooks/useSimulcastSend.tsx index a1648add..2059d96a 100644 --- a/assets/src/pages/room/hooks/useSimulcastSend.tsx +++ b/assets/src/pages/room/hooks/useSimulcastSend.tsx @@ -1,6 +1,6 @@ import { useToggle } from "./useToggle"; -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; -import { useClient, useCurrentUserVideoTrackId } from "../../../jellyfish.types"; +import { TrackEncoding } from "@fishjam-dev/react-client"; +import { useClient, useCurrentUserVideoTrackId } from "../../../fishjam"; export type UseSimulcastLocalEncoding = { highQuality: boolean; diff --git a/assets/src/pages/room/hooks/useStoreFirstNonNullValue.tsx b/assets/src/pages/room/hooks/useStoreFirstNonNullValue.tsx index 839920ef..c60f8b9d 100644 --- a/assets/src/pages/room/hooks/useStoreFirstNonNullValue.tsx +++ b/assets/src/pages/room/hooks/useStoreFirstNonNullValue.tsx @@ -1,4 +1,4 @@ -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; import { useEffect, useState } from "react"; export const useStoreFirstNonNullValue = (variable: TrackEncoding | null) => { diff --git a/assets/src/pages/room/hooks/useTilePinning.tsx b/assets/src/pages/room/hooks/useTilePinning.tsx index 35295d5e..188c7a9e 100644 --- a/assets/src/pages/room/hooks/useTilePinning.tsx +++ b/assets/src/pages/room/hooks/useTilePinning.tsx @@ -6,9 +6,9 @@ import { TrackType, useClient, useSelector -} from "../../../jellyfish.types"; +} from "../../../fishjam"; import useEffectOnChange from "../../../features/shared/hooks/useEffectOnChange"; -import { ClientEvents, MessageEvents } from "@jellyfish-dev/react-client-sdk"; +import { ClientEvents, MessageEvents } from "@fishjam-dev/react-client"; import { LOCAL_SCREEN_SHARING_ID, LOCAL_VIDEO_ID } from "../consts"; type PinningFlags = { diff --git a/assets/src/pages/types.ts b/assets/src/pages/types.ts index 5c89719e..69ad08ae 100644 --- a/assets/src/pages/types.ts +++ b/assets/src/pages/types.ts @@ -1,4 +1,4 @@ -import { TrackEncoding } from "@jellyfish-dev/react-client-sdk"; +import { TrackEncoding } from "@fishjam-dev/react-client"; const StreamSourceValues = ["local", "remote"] as const; export type StreamSource = (typeof StreamSourceValues)[number]; diff --git a/docker-compose-deploy.yaml b/docker-compose-deploy.yaml index 96fa0f2c..fae9c6bb 100644 --- a/docker-compose-deploy.yaml +++ b/docker-compose-deploy.yaml @@ -8,7 +8,7 @@ services: args: FE_BE_HOST: ${BE_HOST:-$DOMAIN:5004} FISHJAM_ROOM_VERSION: ${FISHJAM_ROOM_VERSION} - JELLYFISH_VERSION: ${JELLYFISH_VERSION} + FISHJAM_VERSION: ${FISHJAM_VERSION} container_name: frontend restart: unless-stopped depends_on: diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index 201e6350..3847e67d 100644 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -2,7 +2,7 @@ version: "3" services: fishjam: - image: "ghcr.io/fishjam-dev/fishjam:${JELLYFISH_VERSION:-edge}" + image: "ghcr.io/fishjam-dev/fishjam:${FISHJAM_VERSION:-edge}" container_name: fishjam restart: on-failure healthcheck: diff --git a/docker-compose.yaml b/docker-compose.yaml index 4d0c8035..c9663a3d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3.8' x-fishjam-template: &fishjam-template - image: "ghcr.io/fishjam-dev/fishjam:${JELLYFISH_VERSION:-edge}" + image: "ghcr.io/fishjam-dev/fishjam:${FISHJAM_VERSION:-edge}" restart: unless-stopped environment: &fishjam-environment JF_SERVER_API_TOKEN: ${JF_SERVER_API_TOKEN:-development} @@ -49,7 +49,7 @@ services: dockerfile: ./Dockerfile args: FE_BE_HOST: ${BE_HOST:-$DOMAIN:5004} - JELLYFISH_VERSION: ${JELLYFISH_VERSION:-0.3.0} + FISHJAM_VERSION: ${FISHJAM_VERSION:-0.3.0} FISHJAM_ROOM_VERSION: ${FISHJAM_ROOM_VERSION:-build} container_name: frontend restart: unless-stopped @@ -84,7 +84,7 @@ services: context: ./prometheus dockerfile: Dockerfile args: - PROM_JELLYFISH_TARGETS: ${PROM_JELLYFISH_TARGETS:-fishjam1:9568,fishjam2:9568} + PROM_FISHJAM_TARGETS: ${PROM_FISHJAM_TARGETS:-fishjam1:9568,fishjam2:9568} # Through 172.17.0.1 address docker containers (not running in network mode host) can access # services running on host OS (localhost). In this example through this address prometheus could access # node-exporter which is running in network mode host. diff --git a/grafana/provisioning/dashboards/metrics.json b/grafana/provisioning/dashboards/metrics.json index 30907001..fd6092b8 100644 --- a/grafana/provisioning/dashboards/metrics.json +++ b/grafana/provisioning/dashboards/metrics.json @@ -1602,7 +1602,7 @@ }, "timepicker": {}, "timezone": "", - "title": "Jellyfishes dashboard", + "title": "Fishjams dashboard", "uid": "ef7bdb94-c912-49ac-a273-e7a31598001a", "version": 22, "weekStart": "" diff --git a/mix.exs b/mix.exs index 30735442..3b6bdcee 100644 --- a/mix.exs +++ b/mix.exs @@ -41,7 +41,7 @@ defmodule Videoroom.MixProject do {:plug_cowboy, "~> 2.5"}, {:cors_plug, "~> 2.0"}, - # Jellyfish deps + # Fishjam deps {:fishjam_server_sdk, "~> 0.6.0"}, # Dev diff --git a/openapi.yaml b/openapi.yaml index 34978af7..495e347a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9,7 +9,7 @@ components: type: string x-struct: Elixir.Videoroom.ApiSpec.Error PeerToken: - description: Peer token used for authorizing websocket connection to the Jellyfish Server + description: Peer token used for authorizing websocket connection to the Fishjam Server example: SFMyNTY.g2gDdAAhiOL4CdsaboT9-jtMzhoI title: PeerToken type: string diff --git a/prometheus/Dockerfile b/prometheus/Dockerfile index 4c5376cf..fea3798e 100644 --- a/prometheus/Dockerfile +++ b/prometheus/Dockerfile @@ -1,9 +1,9 @@ FROM prom/prometheus:v2.22.0 -ARG PROM_JELLYFISH_TARGETS +ARG PROM_FISHJAM_TARGETS ARG PROM_NODE_TARGETS COPY ./prometheus.yaml /etc/prometheus/prometheus.yml -RUN sed -i 's/$PROM_JELLYFISH_TARGETS/'"$PROM_JELLYFISH_TARGETS"'/' /etc/prometheus/prometheus.yml -RUN sed -i 's/$PROM_NODE_TARGETS/'"$PROM_NODE_TARGETS"'/' /etc/prometheus/prometheus.yml \ No newline at end of file +RUN sed -i 's/$PROM_FISHJAM_TARGETS/'"$PROM_FISHJAM_TARGETS"'/' /etc/prometheus/prometheus.yml +RUN sed -i 's/$PROM_NODE_TARGETS/'"$PROM_NODE_TARGETS"'/' /etc/prometheus/prometheus.yml diff --git a/prometheus/prometheus.yaml b/prometheus/prometheus.yaml index 00063a4e..edef6ec5 100644 --- a/prometheus/prometheus.yaml +++ b/prometheus/prometheus.yaml @@ -7,7 +7,7 @@ global: scrape_configs: - job_name: 'fishjams' static_configs: - - targets: [$PROM_JELLYFISH_TARGETS] + - targets: [$PROM_FISHJAM_TARGETS] - job_name: 'nodes' static_configs: diff --git a/test/videoroom_web/controllers/room_json_test.exs b/test/videoroom_web/controllers/room_json_test.exs index f6f28698..bffbba69 100644 --- a/test/videoroom_web/controllers/room_json_test.exs +++ b/test/videoroom_web/controllers/room_json_test.exs @@ -1,9 +1,9 @@ defmodule VideoroomWeb.RoomJsonTest do use VideoroomWeb.ConnCase, async: false - alias Jellyfish.Room + alias Fishjam.Room alias Videoroom.Test.Peer - alias Jellyfish.Notification.{PeerConnected, PeerDisconnected, RoomCreated, RoomDeleted} + alias Fishjam.Notification.{PeerConnected, PeerDisconnected, RoomCreated, RoomDeleted} @url Application.compile_env!(:fishjam_server_sdk, :server_address) @peer_url "ws://#{@url}/socket/peer/websocket" @@ -11,9 +11,9 @@ defmodule VideoroomWeb.RoomJsonTest do @timeout 5000 setup context do - client = Jellyfish.Client.new() - {:ok, notifier} = Jellyfish.WSNotifier.start() - :ok = Jellyfish.WSNotifier.subscribe_server_notifications(notifier) + client = Fishjam.Client.new() + {:ok, notifier} = Fishjam.WSNotifier.start() + :ok = Fishjam.WSNotifier.subscribe_server_notifications(notifier) prev_env = Application.get_all_env(:videoroom) @@ -194,7 +194,7 @@ defmodule VideoroomWeb.RoomJsonTest do end defp delete_all_rooms() do - client = Jellyfish.Client.new() + client = Fishjam.Client.new() {:ok, rooms} = Room.get_all(client) rooms