Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit c326ae2

Browse files
Fishjam rebranding - update to 0.6.0 (#78)
1 parent ff0c13d commit c326ae2

File tree

71 files changed

+669
-1597
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+669
-1597
lines changed

.env.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#JELLYFISH
1+
#FISHJAM
22
# TURN default configuration
33
# note: loopback address as EXTERNAL_IP cannot be used inside a Docker container
44
# EXTERNAL_IP=<your_public_ip_address>
55
JF_SERVER_API_TOKEN="development"
66

77
# SSL
88
DOMAIN=localhost
9-
# BE_JF_ADDRESSES=<jellyfish_domain_address1> <jellyfish_domain_address2>
9+
# BE_JF_ADDRESSES=<fishjam_domain_address1> <fishjam_domain_address2>
1010
# BE_HOST=<backend_domain_address>
1111
# BE_JF_SECURE_CONNECTION=false
1212
# JF_CHECK_ORIGIN=false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Staging Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- "debug-staging"
6+
paths:
7+
- "**"
8+
9+
env:
10+
DOMAIN: room.fishjam.work
11+
BE_HOST: server.room.fishjam.work
12+
PROJECT: staging
13+
COMPOSE_FILE_NAME: docker-compose-deploy.yaml
14+
15+
jobs:
16+
deploy1:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Debug staging
20+
uses: JimCronqvist/action-ssh@master
21+
with:
22+
hosts: ${{ secrets.STAGING_HOST }}
23+
privateKey: ${{ secrets.SSH_PRIV_KEY }}
24+
command: |
25+
cat test.txt
26+

.github/workflows/production_build_and_deploy.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ jobs:
2020
id: versions
2121
run: |
2222
cat << EOF >> $GITHUB_OUTPUT
23-
jellyroom=${GITHUB_REF#refs/*/}
24-
jellyfish=$(cat .jellyfish-version)
23+
fishjam_room=${GITHUB_REF#refs/*/}
24+
fishjam=$(cat .fishjam-version)
2525
EOF
2626
2727
- name: Prepare .env file for the deployment
2828
id: variables_population
2929
run: |
3030
echo "DOMAIN=${{env.DOMAIN}}
31-
JELLYROOM_VERSION=${{ steps.versions.outputs.jellyroom }}
32-
JELLYFISH_VERSION=${{ steps.versions.outputs.jellyfish }}
31+
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
32+
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3333
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_PRODUCTION}}
3434
BE_HOST=${{env.BE_HOST}}
3535
BE_JF_SECURE_CONNECTION=true

.github/workflows/sandbox_build_and_deploy.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
id: versions
2323
run: |
2424
cat << EOF >> $GITHUB_OUTPUT
25-
jellyroom=${GITHUB_SHA:0:7}
26-
jellyfish=$(cat .jellyfish-version)
25+
fishjam_room=${GITHUB_SHA:0:7}
26+
fishjam=$(cat .fishjam-version)
2727
EOF
2828
2929
- name: Prepare .env file for the deployment
3030
id: variables_population
3131
run: |
3232
echo "DOMAIN=${{env.DOMAIN}}
33-
JELLYROOM_VERSION=${{ steps.versions.outputs.jellyroom }}
34-
JELLYFISH_VERSION=${{ steps.versions.outputs.jellyfish }}
33+
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
34+
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3535
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_SANDBOX}}
3636
BE_HOST=${{env.BE_HOST}}
3737
BE_JF_SECURE_CONNECTION=true

.github/workflows/staging_build_and_deploy.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ jobs:
2020
id: versions
2121
run: |
2222
cat << EOF >> $GITHUB_OUTPUT
23-
jellyroom=${GITHUB_SHA:0:7}
24-
jellyfish=$(cat .jellyfish-version)
23+
fishjam_room=${GITHUB_SHA:0:7}
24+
fishjam=$(cat .fishjam-version)
2525
EOF
2626
2727
- name: Prepare .env file for the deployment
2828
id: variables_population
2929
run: |
3030
echo "DOMAIN=${{env.DOMAIN}}
31-
JELLYROOM_VERSION=${{ steps.versions.outputs.jellyroom }}
32-
JELLYFISH_VERSION=${{ steps.versions.outputs.jellyfish }}
31+
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
32+
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3333
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_STAGING}}
3434
BE_HOST=${{env.BE_HOST}}
3535
BE_JF_SECURE_CONNECTION=true

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "protos"]
22
path = protos
3-
url = https://github.com/jellyfish-dev/protos.git
3+
url = https://github.com/fishjam-dev/protos.git

README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Videoroom
22

33
Videoroom is an open-source, basic video conferencing platform using WebRTC.
4-
It is based on [jellyfish](https://github.com/jellyfish-dev/jellyfish), a general-purpose media server.
5-
Videoroom may be a good starting point for building your own real-time communication solution using Elixir and Jellyfish.
4+
It is based on [fishjam](https://github.com/fishjam-dev/fishjam), a general-purpose media server.
5+
Videoroom may be a good starting point for building your own real-time communication solution using Elixir and Fishjam.
66

77
## Running with Docker
88
The simplest way to run videoroom is with use of Docker.
@@ -15,9 +15,9 @@ docker compose --env-file .env.example up
1515

1616
Make sure to have installed [Elixir](https://elixir-lang.org/install.html) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) first.
1717

18-
Running the Videoroom requires connecting to an instance of [Jellyfish Server](https://github.com/jellyfish-dev/jellyfish).
18+
Running the Videoroom requires connecting to an instance of [Fishjam Server](https://github.com/fishjam-dev/fishjam).
1919

20-
When running locally, you can start an instance of Jellyfish inside docker using docker compose.
20+
When running locally, you can start an instance of Fishjam inside docker using docker compose.
2121

2222
```sh
2323
EXTERNAL_IP=<your ip in local network> docker compose -f docker-compose-dev.yaml up
@@ -27,26 +27,26 @@ Now you can start the Videoroom backend:
2727
- Run `mix setup` to install and setup dependencies
2828
- Start Phoenix server with `mix phx.server`
2929

30-
When running the build version of the Phoenix app, you must specify the addresses of the Jellyfish and backend service.
30+
When running the build version of the Phoenix app, you must specify the addresses of the Fishjam and backend service.
3131
As well as the authentication token via the environment variables:
3232

3333
```sh
34-
BE_JF_ADDRESSES=<IP_ADDRESS1>:<PORT1> OR <DOMAIN1> <IP_ADDRESS2>:<PORT2> OR <DOMAIN2> #Example of using two jellyfishes: `127.0.0.1:5002 room.fishjam.ovh`, if not provided in dev environment `localhost:5002 localhost:5003` is used.
35-
BE_JF_SERVER_API_TOKEN=<TOKEN> #This must be the same token that was setup in jellyfish. In `docker-compose-dev.yaml` we setup `development` and this variable is used by default in `dev` environment
34+
BE_JF_ADDRESSES=<IP_ADDRESS1>:<PORT1> OR <DOMAIN1> <IP_ADDRESS2>:<PORT2> OR <DOMAIN2> #Example of using two fishjams: `127.0.0.1:5002 room.fishjam.ovh`, if not provided in dev environment `localhost:5002 localhost:5003` is used.
35+
BE_JF_SERVER_API_TOKEN=<TOKEN> #This must be the same token that was setup in fishjam. In `docker-compose-dev.yaml` we setup `development` and this variable is used by default in `dev` environment
3636
```
3737

3838
Optionally, in production, these variables can be set:
3939
* `BE_PEER_JOIN_TIMEOUT` - can be used to limit the period in which a new peer must join the meeting,
40-
* `BE_JF_SECURE_CONNECTION` - enforces connecting the backend to jellyfish through `wss` protocol,
40+
* `BE_JF_SECURE_CONNECTION` - enforces connecting the backend to fishjam through `wss` protocol,
4141
* `BE_HOST` - address of backend
42-
* `JF_CHECK_ORIGIN` - define whether jellyfish should check origin of incoming requests
42+
* `JF_CHECK_ORIGIN` - define whether fishjam should check origin of incoming requests
4343

4444

4545
Next you have to start a Videoroom frontend:
4646
- Run `npm ci --prefix=assets` to install and setup dependencies
4747
- Start vite server with `npm run dev --prefix=assets`
4848

49-
Now you have all needed components to use jellyfish videoroom.
49+
Now you have all needed components to use fishjam videoroom.
5050

5151
## Production
5252

@@ -56,21 +56,21 @@ You can copy the `.env.example` file to `.env` and adjust it to your needs.
5656

5757
## Deployment with load-balancing
5858

59-
`docker-compose.yaml` allows to run a jellyfish videoroom with multiple jellyfishes but all of that runs on the same machine.
59+
`docker-compose.yaml` allows to run a fishjam videoroom with multiple fishjams but all of that runs on the same machine.
6060
For properly using load-balancing two machines will be needed and `docker-compose-deploy.yaml` will be used.
6161
You can see our deployment workflow [here](.github/workflows/test_build_and_deploy.yml).
6262
This deployment is pretty simple.
63-
All containers besides `jellyfish2` are started on node1 and `jellyfish2` is started on node2.
63+
All containers besides `fishjam2` are started on node1 and `fishjam2` is started on node2.
6464
All environment variables used in our deployment are presented below:
6565

6666
```sh
6767
DOMAIN=<FRONTEND_DOMAIN>
68-
JF1_IP=<NODE1_IP> # IP address of first node on which jellyfish will be run
69-
JF2_IP=<NODE2_IP> # IP address of second node on which jellyfish will be run
70-
JF_SERVER_API_TOKEN=<API_TOKEN> #The same API token is used for all jellyfishes
71-
JF1_HOST=<DOMAIN_JELLYFISH1> OR <JF1_IP>:<JELLYFISH1_PORT> # Value passed to jellyfish and returns by it when creating a room on this speicific jellyfish
72-
JF2_HOST=<DOMAIN_JELLYFISH2> OR <JF2_IP>:<JELLYFISH2_PORT>
73-
BE_JF_ADDRESSES=<JF1_HOST> <JF2_HOST> #Used by backend to create a notifier to one of jellyfishes
68+
JF1_IP=<NODE1_IP> # IP address of first node on which fishjam will be run
69+
JF2_IP=<NODE2_IP> # IP address of second node on which fishjam will be run
70+
JF_SERVER_API_TOKEN=<API_TOKEN> #The same API token is used for all fishjams
71+
JF1_HOST=<DOMAIN_FISHJAM1> OR <JF1_IP>:<FISHJAM1_PORT> # Value passed to fishjam and returns by it when creating a room on this speicific fishjam
72+
JF2_HOST=<DOMAIN_FISHJAM2> OR <JF2_IP>:<FISHJAM2_PORT>
73+
BE_JF_ADDRESSES=<JF1_HOST> <JF2_HOST> #Used by backend to create a notifier to one of fishjams
7474
PROMETHEUS_TARGETS=<JF1_IP>:9568,<JF2_IP>:9568 #Addresses on which prometheus will query for data
7575
BE_HOST=<BACKEND_DOMAIN>
7676
GF_SECURITY_ADMIN_PASSWORD=<GRAFANA_PASSWORD>
@@ -83,9 +83,9 @@ JF_CHECK_ORIGIN=false
8383

8484
We use [Divo](https://hexdocs.pm/divo/readme.html) in tests, which is responsible for starting docker containers.
8585

86-
When running locally run tests using `mix test`, which starts Jellyfish in a container.
86+
When running locally run tests using `mix test`, which starts Fishjam in a container.
8787

88-
On CI both Jellyfish and the tests are run inside docker. If needed, e.g. when the tests are failing on the CI, but not locally you can simulate those conditions with `mix integration_test`.
88+
On CI both Fishjam and the tests are run inside docker. If needed, e.g. when the tests are failing on the CI, but not locally you can simulate those conditions with `mix integration_test`.
8989

9090
## Copyright and License
9191

assets/Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ FROM alpine:3.18 as builder
44
WORKDIR '/app'
55

66
ARG FE_BE_HOST
7-
ARG JELLYROOM_VERSION
8-
ARG JELLYFISH_VERSION
7+
ARG FISHJAM_ROOM_VERSION
8+
ARG FISHJAM_VERSION
99
ENV VITE_BE_HOST=$FE_BE_HOST
10-
ENV VITE_JELLYROOM_VERSION=$JELLYROOM_VERSION
11-
ENV VITE_JELLYFISH_VERSION=$JELLYFISH_VERSION
10+
ENV VITE_FISHJAM_ROOM_VERSION=$FISHJAM_ROOM_VERSION
11+
ENV VITE_FISHJAM_VERSION=$FISHJAM_VERSION
1212

1313
# Install nodejs and npm
1414
RUN apk add --no-cache nodejs npm
@@ -19,7 +19,7 @@ RUN adduser --disabled-password --gecos "" node
1919
# Own the app directory
2020
RUN chown node:node ./
2121

22-
# It's adviced to run the container as non-root user
22+
# It's adviced to run the container as non-root user
2323
# for added security if the base image has the user
2424
USER node
2525

@@ -29,7 +29,7 @@ COPY package*.json ./
2929
# Install dependencies
3030
RUN npm ci
3131

32-
# Copy application files
32+
# Copy application files
3333
COPY . .
3434

3535
# Build the app

assets/package-lock.json

+24-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "jellyfish-videoroom",
2+
"name": "fishjam-videoroom",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",
@@ -11,7 +11,7 @@
1111
"preview": "vite preview"
1212
},
1313
"dependencies": {
14-
"@jellyfish-dev/react-client-sdk": "^0.3.1",
14+
"@fishjam-dev/react-client": "^0.4.0",
1515
"@mediapipe/tasks-vision": "^0.10.12",
1616
"axios": "^1.6.8",
1717
"chartist": "^1.3.0",

assets/src/App.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ReactModal from "react-modal";
1212
import "./index.css";
1313

1414
import { StreamingErrorBoundary } from "./features/streaming/StreamingErrorBoundary";
15-
import { JellyfishContextProvider } from "./jellyfish.types";
15+
import { FishjamContextProvider } from "./fishjam";
1616

1717
// When returning to the videoroom page from another domain using the 'Back' button on the Safari browser,
1818
// the page is served from the cache, which prevents lifecycle events from being triggered.
@@ -24,7 +24,7 @@ const App: FC = () => {
2424
return (
2525
<UserProvider>
2626
<DeveloperInfoProvider>
27-
<JellyfishContextProvider>
27+
<FishjamContextProvider>
2828
<LocalPeerMediaProvider>
2929
<ToastProvider>
3030
<ModalProvider>
@@ -36,7 +36,7 @@ const App: FC = () => {
3636
</ModalProvider>
3737
</ToastProvider>
3838
</LocalPeerMediaProvider>
39-
</JellyfishContextProvider>
39+
</FishjamContextProvider>
4040
</DeveloperInfoProvider>
4141
</UserProvider>
4242
);

assets/src/features/devices/LocalMediaMessagesBoundary.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
useCamera,
88
useClient,
99
useMicrophone
10-
} from "../../jellyfish.types.ts";
11-
import { ClientEvents } from "@jellyfish-dev/react-client-sdk";
10+
} from "../../fishjam.ts";
11+
import { ClientEvents } from "@fishjam-dev/react-client";
1212

1313
const prepareErrorMessage = (videoDeviceError: string | null, audioDeviceError: string | null): null | string => {
1414
if (videoDeviceError && audioDeviceError) {

assets/src/features/devices/LocalPeerMediaContext.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import {
44
SCREENSHARING_TRACK_CONSTRAINTS,
55
VIDEO_TRACK_CONSTRAINTS
66
} from "../../pages/room/consts";
7-
import { PeerMetadata, TrackMetadata, useCamera, useClient, useMicrophone, useSetupMedia } from "../../jellyfish.types";
8-
import { ClientEvents, UseCameraResult, SimulcastConfig } from "@jellyfish-dev/react-client-sdk";
7+
import { PeerMetadata, TrackMetadata, useCamera, useClient, useMicrophone, useSetupMedia } from "../../fishjam";
8+
import { ClientEvents, UseCameraResult, SimulcastConfig } from "@fishjam-dev/react-client";
99
import { BlurProcessor } from "./BlurProcessor";
1010
import { selectBandwidthLimit } from "../../pages/room/bandwidth.tsx";
1111
import { useDeveloperInfo } from "../../contexts/DeveloperInfoContext.tsx";

assets/src/features/devices/MediaSettingsModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Modal } from "../shared/components/modal/Modal";
66
import { Checkbox } from "../shared/components/Checkbox";
77
import { useRecording } from "../recording/useRecording";
88
import Button from "../shared/components/Button";
9-
import { useCamera, useMicrophone } from "../../jellyfish.types.ts";
9+
import { useCamera, useMicrophone } from "../../fishjam.ts";
1010

1111
export const MediaSettingsModal: React.FC = () => {
1212
const { setOpen, isOpen } = useModal();

0 commit comments

Comments
 (0)