diff --git a/doc/docs.md b/doc/docs.md index cbe6413..80d0940 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -8,6 +8,7 @@ - [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack) - [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters) - [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest) + - [AgentRequest.InterruptTrack](#fishjam-AgentRequest-InterruptTrack) - [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack) - [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) - [AgentResponse](#fishjam-AgentResponse) @@ -133,6 +134,7 @@ 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) | | | @@ -187,6 +189,21 @@ Request sent by agent, to authenticate to Fishjam server + + +### 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 diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto index 2ac3d12..c54c7be 100644 --- a/fishjam/agent_notifications.proto +++ b/fishjam/agent_notifications.proto @@ -39,11 +39,17 @@ message AgentRequest { bytes data = 2; } + // Interrupts an agent's outgoing track, preventing already queued audio from being played + message InterruptTrack { + string track_id = 1; + } + oneof content { AuthRequest auth_request = 1; AddTrack add_track = 2; RemoveTrack remove_track = 3; TrackData track_data = 4; + InterruptTrack interrupt_track = 5; } } diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex index d40d1b7..9f5db6a 100644 --- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -45,6 +45,14 @@ 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 do @moduledoc false @@ -65,6 +73,11 @@ 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 end defmodule Fishjam.AgentResponse.Authenticated do