Skip to content

Commit ecd7971

Browse files
authored
Rename Jellyfish to Fishjam (#67)
1 parent 49df86c commit ecd7971

Some content is hidden

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

41 files changed

+347
-357
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "protos"]
22
path = protos
3-
url = https://github.com/jellyfish-dev/protos.git
3+
url = https://github.com/fishjam-dev/protos.git
44
branch = master

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Currently it allows for:
1313

1414
## Installation
1515

16-
The package can be installed by adding `jellyfish_server_sdk` to your list of dependencies in `mix.exs`:
16+
The package can be installed by adding `fishjam_server_sdk` to your list of dependencies in `mix.exs`:
1717

1818
```elixir
1919
def deps do
2020
[
21-
{:jellyfish_server_sdk, "~> 0.5.0"}
21+
{:fishjam_server_sdk, "~> 0.6.0"}
2222
]
2323
end
2424
```
@@ -29,22 +29,22 @@ Define the connection configuration in the mix config,
2929
specifying server address and authentication token
3030
(for more information see [Fishjam docs](https://fishjam-dev.github.io/fishjam-docs/getting_started/authentication))
3131
``` config.exs
32-
config :jellyfish_server_sdk,
32+
config :fishjam_server_sdk,
3333
server_address: "localhost:5002",
34-
server_api_token: "your-jellyfish-token",
34+
server_api_token: "your-fishjam-token",
3535
secure?: true
3636
```
3737

38-
Alternatively, the connection options can be provided when creating a `Jellyfish.Client` or starting `Jellyfish.WSNotifier`:
38+
Alternatively, the connection options can be provided when creating a `Fishjam.Client` or starting `Fishjam.WSNotifier`:
3939

4040
```elixir
4141
client =
42-
Jellyfish.Client.new(server_address: "localhost:5002", server_api_token: "your-jellyfish-token")
42+
Fishjam.Client.new(server_address: "localhost:5002", server_api_token: "your-fishjam-token")
4343

4444
{:ok, notifier} =
45-
Jellyfish.WSNotifier.start(
45+
Fishjam.WSNotifier.start(
4646
server_address: "localhost:5002",
47-
server_api_token: "your-jellyfish-token"
47+
server_api_token: "your-fishjam-token"
4848
)
4949
```
5050

@@ -54,29 +54,29 @@ Make API calls to Fishjam and receive server events:
5454

5555
```elixir
5656
# start process responsible for receiving events
57-
{:ok, notifier} = Jellyfish.WSNotifier.start()
58-
:ok = Jellyfish.WSNotifier.subscribe_server_notifications(notifier)
57+
{:ok, notifier} = Fishjam.WSNotifier.start()
58+
:ok = Fishjam.WSNotifier.subscribe_server_notifications(notifier)
5959

6060
# create HTTP client instance
61-
client = Jellyfish.Client.new()
61+
client = Fishjam.Client.new()
6262

6363
# Create room
64-
{:ok, %Jellyfish.Room{id: room_id}, jellyfish_address} = Jellyfish.Room.create(client, max_peers: 10)
64+
{:ok, %Fishjam.Room{id: room_id}, fishjam_address} = Fishjam.Room.create(client, max_peers: 10)
6565

6666
room_id
6767
# => "8878cd13-99a6-40d6-8d7e-8da23d803dab"
6868

6969
# Add peer
70-
{:ok, %Jellyfish.Peer{id: peer_id}, peer_token} =
71-
Jellyfish.Room.add_peer(client, room_id, Jellyfish.Peer.WebRTC)
70+
{:ok, %Fishjam.Peer{id: peer_id}, peer_token} =
71+
Fishjam.Room.add_peer(client, room_id, Fishjam.Peer.WebRTC)
7272

7373
receive do
74-
{:jellyfish, %Jellyfish.Notification.PeerConnected{room_id: ^room_id, peer_id: ^peer_id}} ->
74+
{:fishjam, %Fishjam.Notification.PeerConnected{room_id: ^room_id, peer_id: ^peer_id}} ->
7575
# handle the notification
7676
end
7777

7878
# Delete peer
79-
:ok = Jellyfish.Room.delete_peer(client, room_id, peer_id)
79+
:ok = Fishjam.Room.delete_peer(client, room_id, peer_id)
8080
```
8181

8282
List of structs representing events can be found in the [docs](https://hexdocs.pm/fishjam_server_sdk).

compile_proto.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ git submodule sync --recursive >> /dev/null
99
git submodule update --recursive --remote --init >> /dev/null
1010
printf "DONE\n\n"
1111

12-
server_file="./protos/jellyfish/server_notifications.proto"
12+
server_file="./protos/fishjam/server_notifications.proto"
1313
printf "Compiling: file $server_file"
1414
protoc --elixir_out=./lib/ $server_file
1515
printf "\tDONE\n"
1616

17-
peer_file="./protos/jellyfish/peer_notifications.proto"
17+
peer_file="./protos/fishjam/peer_notifications.proto"
1818
printf "Compiling: file $peer_file"
1919
protoc --elixir_out=./test/support $peer_file
2020
printf "\tDONE\n"

config/dev.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Config
22

3-
config :jellyfish_server_sdk,
3+
config :fishjam_server_sdk,
44
server_address: "localhost:5002",
55
server_api_token: "development"

config/test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Config
22

3-
config :jellyfish_server_sdk,
4-
server_address: "jellyfish:5002",
3+
config :fishjam_server_sdk,
4+
server_address: "fishjam:5002",
55
server_api_token: "development",
66
webhook_address: "test"

config/test_local.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Config
22

3-
config :jellyfish_server_sdk,
3+
config :fishjam_server_sdk,
44
server_address: "127.0.0.1:5002",
55
server_api_token: "development",
66
webhook_address: "127.0.0.1"

docker-compose-dev.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
version: "3"
2-
31
services:
4-
jellyfish:
5-
image: "ghcr.io/fishjam-dev/jellyfish:${TAG:-edge}"
6-
container_name: jellyfish
2+
fishjam:
3+
image: "ghcr.io/fishjam-dev/fishjam:${TAG:-edge}"
4+
container_name: fishjam
75
restart: on-failure
86
healthcheck:
97
test: >
@@ -13,15 +11,15 @@ services:
1311
timeout: 2s
1412
start_period: 30s
1513
environment:
16-
JF_HOST: "localhost:5002"
17-
JF_INTEGRATED_TURN_IP: "${INTEGRATED_TURN_IP:-127.0.0.1}"
18-
JF_INTEGRATED_TURN_LISTEN_IP: "0.0.0.0"
19-
JF_INTEGRATED_TURN_PORT_RANGE: "50000-50050"
20-
JF_INTEGRATED_TCP_TURN_PORT: "49999"
21-
JF_SERVER_API_TOKEN: "development"
22-
JF_SIP_USED: "true"
23-
JF_SIP_IP: "127.0.0.1"
24-
JF_PORT: 5002
14+
FJ_HOST: "localhost:5002"
15+
FJ_PORT: 5002
16+
FJ_SERVER_API_TOKEN: "development"
17+
FJ_COMPONENTS_USED: "file hls rtsp sip recording"
18+
FJ_WEBRTC_TURN_IP: "${INTEGRATED_TURN_IP:-127.0.0.1}"
19+
FJ_WEBRTC_TURN_LISTEN_IP: "0.0.0.0"
20+
FJ_WEBRTC_TURN_PORT_RANGE: "50000-50050"
21+
FJ_WEBRTC_TURN_TCP_PORT: "49999"
22+
FJ_SIP_IP: "127.0.0.1"
2523
ports:
2624
- "5002:5002"
2725
- "49999:49999"

docker-compose-test.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3"
2-
31
services:
42
test:
53
image: membraneframeworklabs/docker_membrane:v2.2.0
@@ -11,14 +9,14 @@ services:
119
ports:
1210
- "4000:4000"
1311
depends_on:
14-
jellyfish:
12+
fishjam:
1513
condition: service_healthy
1614

17-
jellyfish:
15+
fishjam:
1816
extends:
1917
file: docker-compose-dev.yaml
20-
service: jellyfish
18+
service: fishjam
2119
environment:
22-
- JF_HOST=jellyfish:5002
20+
- FJ_HOST=fishjam:5002
2321
volumes:
24-
- ./test/fixtures:/app/jellyfish_resources/file_component_sources
22+
- ./test/fixtures:/app/fishjam_resources/file_component_sources

examples/server_socket.exs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Mix.install(
22
[
3-
{:jellyfish_server_sdk, path: __DIR__ |> Path.join("..") |> Path.expand()}
3+
{:fishjam_server_sdk, path: __DIR__ |> Path.join("..") |> Path.expand()}
44
],
55
force: true
66
)
@@ -9,14 +9,14 @@ server_address = "localhost:5002"
99
server_api_token = "development"
1010

1111
{:ok, notifier} =
12-
Jellyfish.WSNotifier.start(server_address: server_address, server_api_token: server_api_token)
12+
Fishjam.WSNotifier.start(server_address: server_address, server_api_token: server_api_token)
1313

14-
{:ok, _rooms} = Jellyfish.WSNotifier.subscribe_server_notifications(notifier, :all)
15-
:ok = Jellyfish.WSNotifier.subscribe_metrics(notifier)
14+
{:ok, _rooms} = Fishjam.WSNotifier.subscribe_server_notifications(notifier, :all)
15+
:ok = Fishjam.WSNotifier.subscribe_metrics(notifier)
1616

1717
receive_notification = fn receive_notification ->
1818
receive do
19-
{:jellyfish, event} ->
19+
{:fishjam, event} ->
2020
IO.inspect(event, label: :event)
2121
after
2222
150_000 ->

lib/jellyfish/client.ex

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
defmodule Jellyfish.Client do
1+
defmodule Fishjam.Client do
22
@moduledoc """
3-
Defines a `t:Jellyfish.Client.t/0`.
3+
Defines a `t:Fishjam.Client.t/0`.
44
55
By default, Mint adapter for [Tesla](https://github.com/elixir-tesla/tesla) is used to make HTTP requests, but it can be changed:
66
```
77
# config.exs
8-
config :jellyfish_server_sdk, tesla_adapter: Tesla.Adapter.Hackney
8+
config :fishjam_server_sdk, tesla_adapter: Tesla.Adapter.Hackney
99
1010
# mix.exs
1111
defp deps do
@@ -17,7 +17,7 @@ defmodule Jellyfish.Client do
1717
For the list of supported Tesla adapters refer to [Tesla docs](https://hexdocs.pm/tesla/readme.html#adapters).
1818
"""
1919

20-
alias Jellyfish.Utils
20+
alias Fishjam.Utils
2121

2222
@enforce_keys [
2323
:http_client
@@ -29,19 +29,19 @@ defmodule Jellyfish.Client do
2929
}
3030

3131
@typedoc """
32-
Options needed to open connection to Jellyfish server.
32+
Options needed to open connection to Fishjam server.
3333
34-
* `:server_address` - address of the Jellyfish server instance.
34+
* `:server_address` - address of the Fishjam server instance.
3535
* `:server_api_token` - token used for authorizing HTTP requests and WebSocket connection.
36-
It's the same token as the one configured in Jellyfish.
36+
It's the same token as the one configured in Fishjam.
3737
* `:secure?` - if `true`, use HTTPS and WSS instead of HTTP and WS, `false` by default.
3838
3939
When an option is not explicily passed, value set in `config.exs` is used:
4040
```
4141
# in config.exs
42-
config :jellyfish_server_sdk,
42+
config :fishjam_server_sdk,
4343
server_address: "localhost:5002",
44-
server_api_token: "your-jellyfish-token",
44+
server_api_token: "your-fishjam-token",
4545
secure?: true
4646
```
4747
"""
@@ -52,15 +52,15 @@ defmodule Jellyfish.Client do
5252
]
5353

5454
@doc """
55-
Creates a new instance of `t:Jellyfish.Client.t/0`.
55+
Creates a new instance of `t:Fishjam.Client.t/0`.
5656
5757
For information about options, see `t:connection_options/0`.
5858
"""
5959
@spec new(connection_options()) :: t()
6060
def new(opts \\ []) do
6161
{address, api_token, secure?} = Utils.get_options_or_defaults(opts)
6262
address = if secure?, do: "https://#{address}", else: "http://#{address}"
63-
adapter = Application.get_env(:jellyfish_server_sdk, :tesla_adapter, Tesla.Adapter.Mint)
63+
adapter = Application.get_env(:fishjam_server_sdk, :tesla_adapter, Tesla.Adapter.Mint)
6464

6565
middleware = [
6666
{Tesla.Middleware.BaseUrl, address},
@@ -74,11 +74,11 @@ defmodule Jellyfish.Client do
7474
end
7575

7676
@doc """
77-
Updates Jellyfish address.
77+
Updates Fishjam address.
7878
79-
When running Jellyfish in a cluster, user has to
80-
manually update Jellyfish address after creating a room.
81-
See also `Jellyfish.Room.create/2`.
79+
When running Fishjam in a cluster, user has to
80+
manually update Fishjam address after creating a room.
81+
See also `Fishjam.Room.create/2`.
8282
"""
8383
@spec update_address(t(), String.t()) :: t()
8484
def update_address(client, new_address) do

0 commit comments

Comments
 (0)