From 2ad9e6892b1d4430a43a8827f1331a2bc49d24c4 Mon Sep 17 00:00:00 2001
From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com>
Date: Wed, 17 Sep 2025 16:52:10 +0200
Subject: [PATCH 1/4] Add interruption events
---
fishjam/agent_notifications.proto | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto
index 2ac3d12..236ba47 100644
--- a/fishjam/agent_notifications.proto
+++ b/fishjam/agent_notifications.proto
@@ -39,11 +39,21 @@ message AgentRequest {
bytes data = 2;
}
+ // Interrupts an agent's outgoing track, preventing already queued audio from being played
+ message InterruptTrack {
+ string track_id = 1;
+ }
+
+ // Interrupts all of the agent's outgoing tracks, preventing already queued audio from being played
+ message InterruptAllTracks {}
+
oneof content {
AuthRequest auth_request = 1;
AddTrack add_track = 2;
RemoveTrack remove_track = 3;
TrackData track_data = 4;
+ InterruptTrack interrupt_track = 5;
+ InterruptAllTracks interrupt_all_tracks = 6;
}
}
From 0ed69ece16837260972d987d452e75a2dbbde6a2 Mon Sep 17 00:00:00 2001
From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com>
Date: Wed, 17 Sep 2025 16:58:06 +0200
Subject: [PATCH 2/4] Generate elixir stubs
---
.../lib/fishjam/agent_notifications.pb.ex | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex
index d40d1b7..e2064c3 100644
--- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex
+++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex
@@ -45,6 +45,20 @@ defmodule Fishjam.AgentRequest.TrackData do
field :data, 2, type: :bytes
end
+defmodule Fishjam.AgentRequest.InterruptTrack do
+ @moduledoc false
+
+ use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3
+
+ field :track_id, 1, type: :string, json_name: "trackId"
+end
+
+defmodule Fishjam.AgentRequest.InterruptAllTracks do
+ @moduledoc false
+
+ use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3
+end
+
defmodule Fishjam.AgentRequest do
@moduledoc false
@@ -65,6 +79,16 @@ defmodule Fishjam.AgentRequest do
oneof: 0
field :track_data, 4, type: Fishjam.AgentRequest.TrackData, json_name: "trackData", oneof: 0
+
+ field :interrupt_track, 5,
+ type: Fishjam.AgentRequest.InterruptTrack,
+ json_name: "interruptTrack",
+ oneof: 0
+
+ field :interrupt_all_tracks, 6,
+ type: Fishjam.AgentRequest.InterruptAllTracks,
+ json_name: "interruptAllTracks",
+ oneof: 0
end
defmodule Fishjam.AgentResponse.Authenticated do
From d3a2781f0db23badd56b45bb9455c46070354439 Mon Sep 17 00:00:00 2001
From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com>
Date: Wed, 17 Sep 2025 17:06:06 +0200
Subject: [PATCH 3/4] Generate docs
---
doc/docs.md | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/doc/docs.md b/doc/docs.md
index cbe6413..67fc976 100644
--- a/doc/docs.md
+++ b/doc/docs.md
@@ -8,6 +8,8 @@
- [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack)
- [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters)
- [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest)
+ - [AgentRequest.InterruptAllTracks](#fishjam-AgentRequest-InterruptAllTracks)
+ - [AgentRequest.InterruptTrack](#fishjam-AgentRequest-InterruptTrack)
- [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack)
- [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData)
- [AgentResponse](#fishjam-AgentResponse)
@@ -133,6 +135,8 @@ Defines any type of message passed from agent peer to Fishjam
| add_track | [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack) | | |
| remove_track | [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack) | | |
| track_data | [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) | | |
+| interrupt_track | [AgentRequest.InterruptTrack](#fishjam-AgentRequest-InterruptTrack) | | |
+| interrupt_all_tracks | [AgentRequest.InterruptAllTracks](#fishjam-AgentRequest-InterruptAllTracks) | | |
@@ -187,6 +191,31 @@ Request sent by agent, to authenticate to Fishjam server
+
+
+### AgentRequest.InterruptAllTracks
+Interrupts all of the agent's outgoing tracks, preventing already queued audio from being played
+
+
+
+
+
+
+
+
+### AgentRequest.InterruptTrack
+Interrupts an agent's outgoing track, preventing already queued audio from being played
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| track_id | [string](#string) | | |
+
+
+
+
+
+
### AgentRequest.RemoveTrack
From e7acb9acd0c1092e6f231b20d6e2e2100f561f82 Mon Sep 17 00:00:00 2001
From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com>
Date: Wed, 17 Sep 2025 19:29:17 +0200
Subject: [PATCH 4/4] Remove InterruptAllTracks for simplicity
---
doc/docs.md | 12 ------------
fishjam/agent_notifications.proto | 4 ----
fishjam_protos/lib/fishjam/agent_notifications.pb.ex | 11 -----------
3 files changed, 27 deletions(-)
diff --git a/doc/docs.md b/doc/docs.md
index 67fc976..80d0940 100644
--- a/doc/docs.md
+++ b/doc/docs.md
@@ -8,7 +8,6 @@
- [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack)
- [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters)
- [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest)
- - [AgentRequest.InterruptAllTracks](#fishjam-AgentRequest-InterruptAllTracks)
- [AgentRequest.InterruptTrack](#fishjam-AgentRequest-InterruptTrack)
- [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack)
- [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData)
@@ -136,7 +135,6 @@ Defines any type of message passed from agent peer to Fishjam
| remove_track | [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack) | | |
| track_data | [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) | | |
| interrupt_track | [AgentRequest.InterruptTrack](#fishjam-AgentRequest-InterruptTrack) | | |
-| interrupt_all_tracks | [AgentRequest.InterruptAllTracks](#fishjam-AgentRequest-InterruptAllTracks) | | |
@@ -191,16 +189,6 @@ Request sent by agent, to authenticate to Fishjam server
-
-
-### AgentRequest.InterruptAllTracks
-Interrupts all of the agent's outgoing tracks, preventing already queued audio from being played
-
-
-
-
-
-
### AgentRequest.InterruptTrack
diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto
index 236ba47..c54c7be 100644
--- a/fishjam/agent_notifications.proto
+++ b/fishjam/agent_notifications.proto
@@ -44,16 +44,12 @@ message AgentRequest {
string track_id = 1;
}
- // Interrupts all of the agent's outgoing tracks, preventing already queued audio from being played
- message InterruptAllTracks {}
-
oneof content {
AuthRequest auth_request = 1;
AddTrack add_track = 2;
RemoveTrack remove_track = 3;
TrackData track_data = 4;
InterruptTrack interrupt_track = 5;
- InterruptAllTracks interrupt_all_tracks = 6;
}
}
diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex
index e2064c3..9f5db6a 100644
--- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex
+++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex
@@ -53,12 +53,6 @@ defmodule Fishjam.AgentRequest.InterruptTrack do
field :track_id, 1, type: :string, json_name: "trackId"
end
-defmodule Fishjam.AgentRequest.InterruptAllTracks do
- @moduledoc false
-
- use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3
-end
-
defmodule Fishjam.AgentRequest do
@moduledoc false
@@ -84,11 +78,6 @@ defmodule Fishjam.AgentRequest do
type: Fishjam.AgentRequest.InterruptTrack,
json_name: "interruptTrack",
oneof: 0
-
- field :interrupt_all_tracks, 6,
- type: Fishjam.AgentRequest.InterruptAllTracks,
- json_name: "interruptAllTracks",
- oneof: 0
end
defmodule Fishjam.AgentResponse.Authenticated do