From bad8c835b769323a6d4a9d8ba05f52c0c88724bc Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:35:44 +0200 Subject: [PATCH 1/7] Add protobufs for agent socket --- fishjam/agent_notifications.proto | 64 +++++++++++++ fishjam/server_notifications.proto | 31 +------ fishjam/shared_notifications.proto | 23 +++++ .../lib/fishjam/agent_notifications.pb.ex | 81 +++++++++++++++++ .../lib/fishjam/media_events/peer/peer.pb.ex | 32 +++---- .../fishjam/media_events/server/server.pb.ex | 50 +++++----- .../lib/fishjam/media_events/shared.pb.ex | 4 +- .../lib/fishjam/peer_notifications.pb.ex | 12 +-- .../lib/fishjam/server_notifications.pb.ex | 91 ++++++------------- .../lib/fishjam/shared_notifications.pb.ex | 29 ++++++ 10 files changed, 280 insertions(+), 137 deletions(-) create mode 100644 fishjam/agent_notifications.proto create mode 100644 fishjam/shared_notifications.proto create mode 100644 fishjam_protos/lib/fishjam/agent_notifications.pb.ex create mode 100644 fishjam_protos/lib/fishjam/shared_notifications.pb.ex diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto new file mode 100644 index 0000000..6a3c5c3 --- /dev/null +++ b/fishjam/agent_notifications.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +package fishjam; + +import "fishjam/shared_notifications.proto"; + +// Defines any type of message passed from agent peer to Fishjam +message AgentRequest { + // Request sent by agent, to authenticate to Fishjam server + message AuthRequest { + string token = 1; + string room_id = 2; + } + + // Request to add a track of the specified type + message AddTrack { + message TrackConfig { + // The format of the input stream, defaults to pcm16 + fishjam.TrackEncoding encoding = 1; + // The sample rate of the input stream, may be omitted for opus + uint32 sample_rate = 2; + // The number of channels. 1 means mono, 2 means stereo + uint32 channels = 3; + } + + // Specification of the track to be added + fishjam.Track track = 1; + // Configuration of the input data stream + TrackConfig config = 2; + } + + // Notification containing a chunk of an agent's track's data stream + message TrackData { + string track_id = 1; + bytes data = 2; + } + + oneof content { + AuthRequest auth_request = 1; + AddTrack add_track = 2; + TrackData track_data = 3; + } +} + +// Defines any type of message passed from Fishjam to agent peer +message AgentResponse { + // Response confirming successful authentication + message Authenticated { + // The Peer ID assigned to the connected Agent + string peer_id = 1; + } + + // Notification containing a chunk of a track's data stream + message TrackData { + string peer_id = 1; + fishjam.Track track = 2; + bytes data = 3; + } + + oneof content { + Authenticated authenticated = 1; + TrackData track_data = 2; + } +} diff --git a/fishjam/server_notifications.proto b/fishjam/server_notifications.proto index 385afab..b392df5 100644 --- a/fishjam/server_notifications.proto +++ b/fishjam/server_notifications.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package fishjam; +import "fishjam/shared_notifications.proto"; + // Defines any type of message passed between FJ and server peer message ServerMessage { // Notification sent when a room crashes @@ -104,20 +106,6 @@ message ServerMessage { string metadata = 3; } - // Defines types of tracks being published by peers and component - enum TrackType { - TRACK_TYPE_UNSPECIFIED = 0; - TRACK_TYPE_VIDEO = 1; - TRACK_TYPE_AUDIO = 2; - } - - // Describes a media track - message Track { - string id = 1; - TrackType type = 2; - string metadata = 3; - } - // Notification sent when peer or component adds new track message TrackAdded { string room_id = 1; @@ -125,7 +113,7 @@ message ServerMessage { string peer_id = 2; string component_id = 3; } - Track track = 4; + fishjam.Track track = 4; } // Notification sent when a track is removed @@ -135,7 +123,7 @@ message ServerMessage { string peer_id = 2; string component_id = 3; } - Track track = 4; + fishjam.Track track = 4; } // Notification sent when metadata of a multimedia track is updated @@ -145,15 +133,7 @@ message ServerMessage { string peer_id = 2; string component_id = 3; } - Track track = 4; - } - - // Notification containing a chunk of a track's data stream - message TrackData { - string room_id = 1; - string peer_id = 2; - Track track = 3; - bytes data = 4; + fishjam.Track track = 4; } // Notification sent when streamer successfully connects @@ -205,6 +185,5 @@ message ServerMessage { StreamDisconnected stream_disconnected = 23; ViewerConnected viewer_connected = 24; ViewerDisconnected viewer_disconnected = 25; - TrackData track_data = 26; } } diff --git a/fishjam/shared_notifications.proto b/fishjam/shared_notifications.proto new file mode 100644 index 0000000..061353f --- /dev/null +++ b/fishjam/shared_notifications.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package fishjam; + +// Defines types of tracks being published by peers and component +enum TrackType { + TRACK_TYPE_UNSPECIFIED = 0; + TRACK_TYPE_VIDEO = 1; + TRACK_TYPE_AUDIO = 2; +} + +// Describes a media track +message Track { + string id = 1; + TrackType type = 2; + string metadata = 3; +} + +enum TrackEncoding { + TRACK_ENCODING_UNSPECIFIED = 0; + TRACK_ENCODING_PCM16 = 1; + TRACK_ENCODING_OPUS = 2; +} diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex new file mode 100644 index 0000000..349551a --- /dev/null +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -0,0 +1,81 @@ +defmodule Fishjam.AgentRequest.AuthRequest do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :token, 1, type: :string + field :room_id, 2, type: :string, json_name: "roomId" +end + +defmodule Fishjam.AgentRequest.AddTrack.TrackConfig do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :encoding, 1, type: Fishjam.TrackEncoding, enum: true + field :sample_rate, 2, type: :uint32, json_name: "sampleRate" + field :channels, 3, type: :uint32 +end + +defmodule Fishjam.AgentRequest.AddTrack do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :track, 1, type: Fishjam.Track + field :config, 2, type: Fishjam.AgentRequest.AddTrack.TrackConfig +end + +defmodule Fishjam.AgentRequest.TrackData do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :track_id, 1, type: :string, json_name: "trackId" + field :data, 2, type: :bytes +end + +defmodule Fishjam.AgentRequest do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + oneof :content, 0 + + field :auth_request, 1, + type: Fishjam.AgentRequest.AuthRequest, + json_name: "authRequest", + oneof: 0 + + field :add_track, 2, type: Fishjam.AgentRequest.AddTrack, json_name: "addTrack", oneof: 0 + field :track_data, 3, type: Fishjam.AgentRequest.TrackData, json_name: "trackData", oneof: 0 +end + +defmodule Fishjam.AgentResponse.Authenticated do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :peer_id, 1, type: :string, json_name: "peerId" +end + +defmodule Fishjam.AgentResponse.TrackData do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :peer_id, 1, type: :string, json_name: "peerId" + field :track, 2, type: Fishjam.Track + field :data, 3, type: :bytes +end + +defmodule Fishjam.AgentResponse do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + oneof :content, 0 + + field :authenticated, 1, type: Fishjam.AgentResponse.Authenticated, oneof: 0 + field :track_data, 2, type: Fishjam.AgentResponse.TrackData, json_name: "trackData", oneof: 0 +end diff --git a/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex b/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex index 0ec3086..d6f93e3 100644 --- a/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.MediaEvents.Peer.MediaEvent.VariantBitrate do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :variant, 1, type: Fishjam.MediaEvents.Variant, enum: true field :bitrate, 2, type: :int32 @@ -10,7 +10,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.Connect do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :metadata_json, 1, type: :string, json_name: "metadataJson" end @@ -18,13 +18,13 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.Disconnect do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 end defmodule Fishjam.MediaEvents.Peer.MediaEvent.UpdateEndpointMetadata do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :metadata_json, 1, type: :string, json_name: "metadataJson" end @@ -32,7 +32,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.UpdateTrackMetadata do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :metadata_json, 2, type: :string, json_name: "metadataJson" @@ -41,13 +41,13 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.RenegotiateTracks do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer.TrackIdToMetadataJsonEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: :string @@ -56,7 +56,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer.TrackIdToBitratesEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrates @@ -65,7 +65,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer.MidToTrackIdEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: :string @@ -74,7 +74,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :sdp, 1, type: :string @@ -100,7 +100,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrates do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" @@ -113,7 +113,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.DisableTrackVariant do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true @@ -122,7 +122,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.EnableTrackVariant do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true @@ -131,7 +131,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SetTargetTrackVariant do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true @@ -140,7 +140,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.UnmuteTrack do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" end @@ -148,7 +148,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex b/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex index 0025642..b9c693e 100644 --- a/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.MediaEvents.Server.MediaEvent.VadNotification.Status do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :STATUS_UNSPECIFIED, 0 field :STATUS_SILENCE, 1 @@ -11,7 +11,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Track.SimulcastConfig do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :enabled, 1, type: :bool @@ -31,7 +31,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Track do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :metadata_json, 1, type: :string, json_name: "metadataJson" @@ -43,7 +43,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Endpoint.TrackIdToTrackEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Server.MediaEvent.Track @@ -52,7 +52,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Endpoint do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_type, 2, type: :string, json_name: "endpointType" field :metadata_json, 3, type: :string, json_name: "metadataJson" @@ -67,7 +67,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.IceServer do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :credential, 1, type: :string field :urls, 2, repeated: true, type: :string @@ -77,7 +77,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.EndpointUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :metadata_json, 2, type: :string, json_name: "metadataJson" @@ -86,7 +86,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -96,7 +96,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TracksAdded.TrackIdToTrackEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Server.MediaEvent.Track @@ -105,7 +105,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TracksAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" @@ -119,7 +119,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TracksRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_ids, 2, repeated: true, type: :string, json_name: "trackIds" @@ -128,7 +128,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.EndpointAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :metadata_json, 2, type: :string, json_name: "metadataJson" @@ -137,7 +137,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Connected.EndpointIdToEndpointEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Server.MediaEvent.Endpoint @@ -146,7 +146,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Connected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" @@ -165,7 +165,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.EndpointRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" end @@ -173,7 +173,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Error do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :message, 1, type: :string end @@ -181,7 +181,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.OfferData.TrackTypes do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :audio, 1, type: :int32 field :video, 2, type: :int32 @@ -190,7 +190,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.OfferData do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :tracks_types, 1, type: Fishjam.MediaEvents.Server.MediaEvent.OfferData.TrackTypes, @@ -200,7 +200,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.SdpAnswer.MidToTrackIdEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: :string @@ -209,7 +209,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.SdpAnswer do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :sdp, 1, type: :string @@ -223,7 +223,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.VadNotification do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :status, 2, type: Fishjam.MediaEvents.Server.MediaEvent.VadNotification.Status, enum: true @@ -232,7 +232,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackVariantSwitched do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -242,7 +242,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackVariantDisabled do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -252,7 +252,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackVariantEnabled do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -262,7 +262,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/media_events/shared.pb.ex b/fishjam_protos/lib/fishjam/media_events/shared.pb.ex index 8115aab..954175f 100644 --- a/fishjam_protos/lib/fishjam/media_events/shared.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/shared.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.MediaEvents.Variant do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :VARIANT_UNSPECIFIED, 0 field :VARIANT_LOW, 1 @@ -12,7 +12,7 @@ end defmodule Fishjam.MediaEvents.Candidate do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :candidate, 1, type: :string field :sdp_m_line_index, 2, type: :int32, json_name: "sdpMLineIndex" diff --git a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex index c2863e6..65aefbd 100644 --- a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.PeerMessage.RoomType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :ROOM_TYPE_UNSPECIFIED, 0 field :ROOM_TYPE_CONFERENCE, 1 @@ -12,7 +12,7 @@ end defmodule Fishjam.PeerMessage.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_type, 1, type: Fishjam.PeerMessage.RoomType, json_name: "roomType", enum: true end @@ -20,7 +20,7 @@ end defmodule Fishjam.PeerMessage.AuthRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :token, 1, type: :string field :sdk_version, 2, type: :string, json_name: "sdkVersion" @@ -29,7 +29,7 @@ end defmodule Fishjam.PeerMessage.RTCStatsReport do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :data, 1, type: :string end @@ -37,7 +37,7 @@ end defmodule Fishjam.PeerMessage.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :data, 1, type: :string end @@ -45,7 +45,7 @@ end defmodule Fishjam.PeerMessage do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/server_notifications.pb.ex b/fishjam_protos/lib/fishjam/server_notifications.pb.ex index f0debf7..993b566 100644 --- a/fishjam_protos/lib/fishjam/server_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/server_notifications.pb.ex @@ -1,26 +1,16 @@ defmodule Fishjam.ServerMessage.EventType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :EVENT_TYPE_UNSPECIFIED, 0 field :EVENT_TYPE_SERVER_NOTIFICATION, 1 end -defmodule Fishjam.ServerMessage.TrackType do - @moduledoc false - - use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 - - field :TRACK_TYPE_UNSPECIFIED, 0 - field :TRACK_TYPE_VIDEO, 1 - field :TRACK_TYPE_AUDIO, 2 -end - defmodule Fishjam.ServerMessage.RoomCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -28,7 +18,7 @@ end defmodule Fishjam.ServerMessage.PeerAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -37,7 +27,7 @@ end defmodule Fishjam.ServerMessage.PeerDeleted do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -46,7 +36,7 @@ end defmodule Fishjam.ServerMessage.PeerConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -55,7 +45,7 @@ end defmodule Fishjam.ServerMessage.PeerDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -64,7 +54,7 @@ end defmodule Fishjam.ServerMessage.PeerCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -74,7 +64,7 @@ end defmodule Fishjam.ServerMessage.ComponentCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :component_id, 2, type: :string, json_name: "componentId" @@ -83,13 +73,13 @@ end defmodule Fishjam.ServerMessage.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 end defmodule Fishjam.ServerMessage.AuthRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :token, 1, type: :string end @@ -97,7 +87,7 @@ end defmodule Fishjam.ServerMessage.SubscribeRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :event_type, 1, type: Fishjam.ServerMessage.EventType, json_name: "eventType", enum: true end @@ -105,7 +95,7 @@ end defmodule Fishjam.ServerMessage.SubscribeResponse do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :event_type, 1, type: Fishjam.ServerMessage.EventType, json_name: "eventType", enum: true end @@ -113,7 +103,7 @@ end defmodule Fishjam.ServerMessage.RoomCreated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -121,7 +111,7 @@ end defmodule Fishjam.ServerMessage.RoomDeleted do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -129,7 +119,7 @@ end defmodule Fishjam.ServerMessage.HlsPlayable do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :component_id, 2, type: :string, json_name: "componentId" @@ -138,7 +128,7 @@ end defmodule Fishjam.ServerMessage.HlsUploaded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -146,7 +136,7 @@ end defmodule Fishjam.ServerMessage.HlsUploadCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -154,77 +144,56 @@ end defmodule Fishjam.ServerMessage.PeerMetadataUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" field :metadata, 3, type: :string end -defmodule Fishjam.ServerMessage.Track do - @moduledoc false - - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 - - field :id, 1, type: :string - field :type, 2, type: Fishjam.ServerMessage.TrackType, enum: true - field :metadata, 3, type: :string -end - defmodule Fishjam.ServerMessage.TrackAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :endpoint_info, 0 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId", oneof: 0 field :component_id, 3, type: :string, json_name: "componentId", oneof: 0 - field :track, 4, type: Fishjam.ServerMessage.Track + field :track, 4, type: Fishjam.Track end defmodule Fishjam.ServerMessage.TrackRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :endpoint_info, 0 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId", oneof: 0 field :component_id, 3, type: :string, json_name: "componentId", oneof: 0 - field :track, 4, type: Fishjam.ServerMessage.Track + field :track, 4, type: Fishjam.Track end defmodule Fishjam.ServerMessage.TrackMetadataUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :endpoint_info, 0 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId", oneof: 0 field :component_id, 3, type: :string, json_name: "componentId", oneof: 0 - field :track, 4, type: Fishjam.ServerMessage.Track -end - -defmodule Fishjam.ServerMessage.TrackData do - @moduledoc false - - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 - - field :room_id, 1, type: :string, json_name: "roomId" - field :peer_id, 2, type: :string, json_name: "peerId" - field :track, 3, type: Fishjam.ServerMessage.Track - field :data, 4, type: :bytes + field :track, 4, type: Fishjam.Track end defmodule Fishjam.ServerMessage.StreamConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" end @@ -232,7 +201,7 @@ end defmodule Fishjam.ServerMessage.StreamDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" end @@ -240,7 +209,7 @@ end defmodule Fishjam.ServerMessage.ViewerConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" field :viewer_id, 2, type: :string, json_name: "viewerId" @@ -249,7 +218,7 @@ end defmodule Fishjam.ServerMessage.ViewerDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" field :viewer_id, 2, type: :string, json_name: "viewerId" @@ -258,7 +227,7 @@ end defmodule Fishjam.ServerMessage do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :content, 0 @@ -375,6 +344,4 @@ defmodule Fishjam.ServerMessage do type: Fishjam.ServerMessage.ViewerDisconnected, json_name: "viewerDisconnected", oneof: 0 - - field :track_data, 26, type: Fishjam.ServerMessage.TrackData, json_name: "trackData", oneof: 0 end diff --git a/fishjam_protos/lib/fishjam/shared_notifications.pb.ex b/fishjam_protos/lib/fishjam/shared_notifications.pb.ex new file mode 100644 index 0000000..60d9a50 --- /dev/null +++ b/fishjam_protos/lib/fishjam/shared_notifications.pb.ex @@ -0,0 +1,29 @@ +defmodule Fishjam.TrackType do + @moduledoc false + + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :TRACK_TYPE_UNSPECIFIED, 0 + field :TRACK_TYPE_VIDEO, 1 + field :TRACK_TYPE_AUDIO, 2 +end + +defmodule Fishjam.TrackEncoding do + @moduledoc false + + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :TRACK_ENCODING_UNSPECIFIED, 0 + field :TRACK_ENCODING_PCM16, 1 + field :TRACK_ENCODING_OPUS, 2 +end + +defmodule Fishjam.Track do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :id, 1, type: :string + field :type, 2, type: Fishjam.TrackType, enum: true + field :metadata, 3, type: :string +end From 6656292a8fdd479ea7ff72e9587cc40179dc6909 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:46:27 +0200 Subject: [PATCH 2/7] Add RemoveTrack notification --- fishjam/agent_notifications.proto | 5 +++++ fishjam_protos/lib/fishjam/agent_notifications.pb.ex | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto index 6a3c5c3..e3726df 100644 --- a/fishjam/agent_notifications.proto +++ b/fishjam/agent_notifications.proto @@ -29,6 +29,11 @@ message AgentRequest { TrackConfig config = 2; } + // Removes the given track + message RemoveTrack { + string track_id = 1; + } + // Notification containing a chunk of an agent's track's data stream message TrackData { string track_id = 1; diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex index 349551a..1c35dad 100644 --- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -26,6 +26,14 @@ defmodule Fishjam.AgentRequest.AddTrack do field :config, 2, type: Fishjam.AgentRequest.AddTrack.TrackConfig end +defmodule Fishjam.AgentRequest.RemoveTrack do + @moduledoc false + + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + + field :track_id, 1, type: :string, json_name: "trackId" +end + defmodule Fishjam.AgentRequest.TrackData do @moduledoc false From e12f8db7b3acde65e3b2a759c05bceb39ca1cd1d Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:47:23 +0200 Subject: [PATCH 3/7] Update docs --- doc/docs.md | 273 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 229 insertions(+), 44 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index ad51cca..80f7dab 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -3,6 +3,17 @@ ## Table of Contents +- [fishjam/agent_notifications.proto](#fishjam_agent_notifications-proto) + - [AgentRequest](#fishjam-AgentRequest) + - [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack) + - [AgentRequest.AddTrack.TrackConfig](#fishjam-AgentRequest-AddTrack-TrackConfig) + - [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest) + - [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack) + - [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) + - [AgentResponse](#fishjam-AgentResponse) + - [AgentResponse.Authenticated](#fishjam-AgentResponse-Authenticated) + - [AgentResponse.TrackData](#fishjam-AgentResponse-TrackData) + - [fishjam/media_events/peer/peer.proto](#fishjam_media_events_peer_peer-proto) - [MediaEvent](#fishjam-media_events-peer-MediaEvent) - [MediaEvent.Connect](#fishjam-media_events-peer-MediaEvent-Connect) @@ -84,21 +95,185 @@ - [ServerMessage.StreamDisconnected](#fishjam-ServerMessage-StreamDisconnected) - [ServerMessage.SubscribeRequest](#fishjam-ServerMessage-SubscribeRequest) - [ServerMessage.SubscribeResponse](#fishjam-ServerMessage-SubscribeResponse) - - [ServerMessage.Track](#fishjam-ServerMessage-Track) - [ServerMessage.TrackAdded](#fishjam-ServerMessage-TrackAdded) - - [ServerMessage.TrackData](#fishjam-ServerMessage-TrackData) - [ServerMessage.TrackMetadataUpdated](#fishjam-ServerMessage-TrackMetadataUpdated) - [ServerMessage.TrackRemoved](#fishjam-ServerMessage-TrackRemoved) - [ServerMessage.ViewerConnected](#fishjam-ServerMessage-ViewerConnected) - [ServerMessage.ViewerDisconnected](#fishjam-ServerMessage-ViewerDisconnected) - [ServerMessage.EventType](#fishjam-ServerMessage-EventType) - - [ServerMessage.TrackType](#fishjam-ServerMessage-TrackType) + +- [fishjam/shared_notifications.proto](#fishjam_shared_notifications-proto) + - [Track](#fishjam-Track) + + - [TrackEncoding](#fishjam-TrackEncoding) + - [TrackType](#fishjam-TrackType) - [Scalar Value Types](#scalar-value-types) + +

Top

+ +## fishjam/agent_notifications.proto + + + + + +### AgentRequest +Defines any type of message passed from agent peer to Fishjam + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| auth_request | [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest) | | | +| add_track | [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack) | | | +| track_data | [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) | | | + + + + + + + + +### AgentRequest.AddTrack +Request to add a track of the specified type + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| track | [Track](#fishjam-Track) | | Specification of the track to be added | +| config | [AgentRequest.AddTrack.TrackConfig](#fishjam-AgentRequest-AddTrack-TrackConfig) | | Configuration of the input data stream | + + + + + + + + +### AgentRequest.AddTrack.TrackConfig + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| encoding | [TrackEncoding](#fishjam-TrackEncoding) | | The format of the input stream, defaults to pcm16 | +| sample_rate | [uint32](#uint32) | | The sample rate of the input stream, may be omitted for opus | +| channels | [uint32](#uint32) | | The number of channels. 1 means mono, 2 means stereo | + + + + + + + + +### AgentRequest.AuthRequest +Request sent by agent, to authenticate to Fishjam server + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| token | [string](#string) | | | +| room_id | [string](#string) | | | + + + + + + + + +### AgentRequest.RemoveTrack +Removes the given track + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| track_id | [string](#string) | | | + + + + + + + + +### AgentRequest.TrackData +Notification containing a chunk of an agent's track's data stream + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| track_id | [string](#string) | | | +| data | [bytes](#bytes) | | | + + + + + + + + +### AgentResponse +Defines any type of message passed from Fishjam to agent peer + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| authenticated | [AgentResponse.Authenticated](#fishjam-AgentResponse-Authenticated) | | | +| track_data | [AgentResponse.TrackData](#fishjam-AgentResponse-TrackData) | | | + + + + + + + + +### AgentResponse.Authenticated +Response confirming successful authentication + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| peer_id | [string](#string) | | The Peer ID assigned to the connected Agent | + + + + + + + + +### AgentResponse.TrackData +Notification containing a chunk of a track's data stream + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| peer_id | [string](#string) | | | +| track | [Track](#fishjam-Track) | | | +| data | [bytes](#bytes) | | | + + + + + + + + + + + + + + +

Top

@@ -1004,7 +1179,6 @@ Defines any type of message passed between FJ and server peer | stream_disconnected | [ServerMessage.StreamDisconnected](#fishjam-ServerMessage-StreamDisconnected) | | | | viewer_connected | [ServerMessage.ViewerConnected](#fishjam-ServerMessage-ViewerConnected) | | | | viewer_disconnected | [ServerMessage.ViewerDisconnected](#fishjam-ServerMessage-ViewerDisconnected) | | | -| track_data | [ServerMessage.TrackData](#fishjam-ServerMessage-TrackData) | | | @@ -1301,23 +1475,6 @@ Response sent by FJ, confirming subscription for message type - - -### ServerMessage.Track -Describes a media track - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | -| type | [ServerMessage.TrackType](#fishjam-ServerMessage-TrackType) | | | -| metadata | [string](#string) | | | - - - - - - ### ServerMessage.TrackAdded @@ -1329,25 +1486,7 @@ Notification sent when peer or component adds new track | room_id | [string](#string) | | | | peer_id | [string](#string) | | | | component_id | [string](#string) | | | -| track | [ServerMessage.Track](#fishjam-ServerMessage-Track) | | | - - - - - - - - -### ServerMessage.TrackData -Notification containing a chunk of a track's data stream - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| room_id | [string](#string) | | | -| peer_id | [string](#string) | | | -| track | [ServerMessage.Track](#fishjam-ServerMessage-Track) | | | -| data | [bytes](#bytes) | | | +| track | [Track](#fishjam-Track) | | | @@ -1365,7 +1504,7 @@ Notification sent when metadata of a multimedia track is updated | room_id | [string](#string) | | | | peer_id | [string](#string) | | | | component_id | [string](#string) | | | -| track | [ServerMessage.Track](#fishjam-ServerMessage-Track) | | | +| track | [Track](#fishjam-Track) | | | @@ -1383,7 +1522,7 @@ Notification sent when a track is removed | room_id | [string](#string) | | | | peer_id | [string](#string) | | | | component_id | [string](#string) | | | -| track | [ServerMessage.Track](#fishjam-ServerMessage-Track) | | | +| track | [Track](#fishjam-Track) | | | @@ -1435,10 +1574,56 @@ Defines message groups for which peer can subscribe | EVENT_TYPE_SERVER_NOTIFICATION | 1 | | + + + + + + + + + +

Top

+ +## fishjam/shared_notifications.proto + + + + + +### Track +Describes a media track + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| type | [TrackType](#fishjam-TrackType) | | | +| metadata | [string](#string) | | | + + + + + + + + + + +### TrackEncoding + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TRACK_ENCODING_UNSPECIFIED | 0 | | +| TRACK_ENCODING_PCM16 | 1 | | +| TRACK_ENCODING_OPUS | 2 | | + + - + -### ServerMessage.TrackType +### TrackType Defines types of tracks being published by peers and component | Name | Number | Description | From c76284bcbc8e0e1c027f9fb93c4b1e9cb1a12967 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:55:05 +0200 Subject: [PATCH 4/7] Compile with 0.15.0 --- .../lib/fishjam/agent_notifications.pb.ex | 18 +++---- .../lib/fishjam/media_events/peer/peer.pb.ex | 32 ++++++------ .../fishjam/media_events/server/server.pb.ex | 50 +++++++++--------- .../lib/fishjam/media_events/shared.pb.ex | 4 +- .../lib/fishjam/peer_notifications.pb.ex | 12 ++--- .../lib/fishjam/server_notifications.pb.ex | 52 +++++++++---------- .../lib/fishjam/shared_notifications.pb.ex | 6 +-- 7 files changed, 87 insertions(+), 87 deletions(-) diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex index 1c35dad..00d7e75 100644 --- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.AgentRequest.AuthRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :token, 1, type: :string field :room_id, 2, type: :string, json_name: "roomId" @@ -10,7 +10,7 @@ end defmodule Fishjam.AgentRequest.AddTrack.TrackConfig do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :encoding, 1, type: Fishjam.TrackEncoding, enum: true field :sample_rate, 2, type: :uint32, json_name: "sampleRate" @@ -20,7 +20,7 @@ end defmodule Fishjam.AgentRequest.AddTrack do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track, 1, type: Fishjam.Track field :config, 2, type: Fishjam.AgentRequest.AddTrack.TrackConfig @@ -29,7 +29,7 @@ end defmodule Fishjam.AgentRequest.RemoveTrack do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" end @@ -37,7 +37,7 @@ end defmodule Fishjam.AgentRequest.TrackData do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :data, 2, type: :bytes @@ -46,7 +46,7 @@ end defmodule Fishjam.AgentRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :content, 0 @@ -62,7 +62,7 @@ end defmodule Fishjam.AgentResponse.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :peer_id, 1, type: :string, json_name: "peerId" end @@ -70,7 +70,7 @@ end defmodule Fishjam.AgentResponse.TrackData do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :peer_id, 1, type: :string, json_name: "peerId" field :track, 2, type: Fishjam.Track @@ -80,7 +80,7 @@ end defmodule Fishjam.AgentResponse do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex b/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex index d6f93e3..0ec3086 100644 --- a/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.MediaEvents.Peer.MediaEvent.VariantBitrate do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :variant, 1, type: Fishjam.MediaEvents.Variant, enum: true field :bitrate, 2, type: :int32 @@ -10,7 +10,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.Connect do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :metadata_json, 1, type: :string, json_name: "metadataJson" end @@ -18,13 +18,13 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.Disconnect do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 end defmodule Fishjam.MediaEvents.Peer.MediaEvent.UpdateEndpointMetadata do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :metadata_json, 1, type: :string, json_name: "metadataJson" end @@ -32,7 +32,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.UpdateTrackMetadata do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :metadata_json, 2, type: :string, json_name: "metadataJson" @@ -41,13 +41,13 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.RenegotiateTracks do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer.TrackIdToMetadataJsonEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: :string @@ -56,7 +56,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer.TrackIdToBitratesEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrates @@ -65,7 +65,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer.MidToTrackIdEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: :string @@ -74,7 +74,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SdpOffer do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :sdp, 1, type: :string @@ -100,7 +100,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.TrackBitrates do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" @@ -113,7 +113,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.DisableTrackVariant do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true @@ -122,7 +122,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.EnableTrackVariant do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true @@ -131,7 +131,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SetTargetTrackVariant do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true @@ -140,7 +140,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.UnmuteTrack do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" end @@ -148,7 +148,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex b/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex index b9c693e..0025642 100644 --- a/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/server/server.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.MediaEvents.Server.MediaEvent.VadNotification.Status do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :STATUS_UNSPECIFIED, 0 field :STATUS_SILENCE, 1 @@ -11,7 +11,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Track.SimulcastConfig do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :enabled, 1, type: :bool @@ -31,7 +31,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Track do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :metadata_json, 1, type: :string, json_name: "metadataJson" @@ -43,7 +43,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Endpoint.TrackIdToTrackEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Server.MediaEvent.Track @@ -52,7 +52,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Endpoint do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_type, 2, type: :string, json_name: "endpointType" field :metadata_json, 3, type: :string, json_name: "metadataJson" @@ -67,7 +67,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.IceServer do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :credential, 1, type: :string field :urls, 2, repeated: true, type: :string @@ -77,7 +77,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.EndpointUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :metadata_json, 2, type: :string, json_name: "metadataJson" @@ -86,7 +86,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -96,7 +96,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TracksAdded.TrackIdToTrackEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Server.MediaEvent.Track @@ -105,7 +105,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TracksAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" @@ -119,7 +119,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TracksRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_ids, 2, repeated: true, type: :string, json_name: "trackIds" @@ -128,7 +128,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.EndpointAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :metadata_json, 2, type: :string, json_name: "metadataJson" @@ -137,7 +137,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Connected.EndpointIdToEndpointEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: Fishjam.MediaEvents.Server.MediaEvent.Endpoint @@ -146,7 +146,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Connected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" @@ -165,7 +165,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.EndpointRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" end @@ -173,7 +173,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.Error do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :message, 1, type: :string end @@ -181,7 +181,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.OfferData.TrackTypes do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :audio, 1, type: :int32 field :video, 2, type: :int32 @@ -190,7 +190,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.OfferData do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :tracks_types, 1, type: Fishjam.MediaEvents.Server.MediaEvent.OfferData.TrackTypes, @@ -200,7 +200,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.SdpAnswer.MidToTrackIdEntry do @moduledoc false - use Protobuf, map: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, map: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :key, 1, type: :string field :value, 2, type: :string @@ -209,7 +209,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.SdpAnswer do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :sdp, 1, type: :string @@ -223,7 +223,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.VadNotification do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :status, 2, type: Fishjam.MediaEvents.Server.MediaEvent.VadNotification.Status, enum: true @@ -232,7 +232,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackVariantSwitched do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -242,7 +242,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackVariantDisabled do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -252,7 +252,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent.TrackVariantEnabled do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :endpoint_id, 1, type: :string, json_name: "endpointId" field :track_id, 2, type: :string, json_name: "trackId" @@ -262,7 +262,7 @@ end defmodule Fishjam.MediaEvents.Server.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/media_events/shared.pb.ex b/fishjam_protos/lib/fishjam/media_events/shared.pb.ex index 954175f..8115aab 100644 --- a/fishjam_protos/lib/fishjam/media_events/shared.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/shared.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.MediaEvents.Variant do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :VARIANT_UNSPECIFIED, 0 field :VARIANT_LOW, 1 @@ -12,7 +12,7 @@ end defmodule Fishjam.MediaEvents.Candidate do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :candidate, 1, type: :string field :sdp_m_line_index, 2, type: :int32, json_name: "sdpMLineIndex" diff --git a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex index 65aefbd..c2863e6 100644 --- a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.PeerMessage.RoomType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :ROOM_TYPE_UNSPECIFIED, 0 field :ROOM_TYPE_CONFERENCE, 1 @@ -12,7 +12,7 @@ end defmodule Fishjam.PeerMessage.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_type, 1, type: Fishjam.PeerMessage.RoomType, json_name: "roomType", enum: true end @@ -20,7 +20,7 @@ end defmodule Fishjam.PeerMessage.AuthRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :token, 1, type: :string field :sdk_version, 2, type: :string, json_name: "sdkVersion" @@ -29,7 +29,7 @@ end defmodule Fishjam.PeerMessage.RTCStatsReport do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :data, 1, type: :string end @@ -37,7 +37,7 @@ end defmodule Fishjam.PeerMessage.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :data, 1, type: :string end @@ -45,7 +45,7 @@ end defmodule Fishjam.PeerMessage do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/server_notifications.pb.ex b/fishjam_protos/lib/fishjam/server_notifications.pb.ex index 993b566..e14a683 100644 --- a/fishjam_protos/lib/fishjam/server_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/server_notifications.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.ServerMessage.EventType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :EVENT_TYPE_UNSPECIFIED, 0 field :EVENT_TYPE_SERVER_NOTIFICATION, 1 @@ -10,7 +10,7 @@ end defmodule Fishjam.ServerMessage.RoomCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -18,7 +18,7 @@ end defmodule Fishjam.ServerMessage.PeerAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -27,7 +27,7 @@ end defmodule Fishjam.ServerMessage.PeerDeleted do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -36,7 +36,7 @@ end defmodule Fishjam.ServerMessage.PeerConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -45,7 +45,7 @@ end defmodule Fishjam.ServerMessage.PeerDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -54,7 +54,7 @@ end defmodule Fishjam.ServerMessage.PeerCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -64,7 +64,7 @@ end defmodule Fishjam.ServerMessage.ComponentCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :component_id, 2, type: :string, json_name: "componentId" @@ -73,13 +73,13 @@ end defmodule Fishjam.ServerMessage.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 end defmodule Fishjam.ServerMessage.AuthRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :token, 1, type: :string end @@ -87,7 +87,7 @@ end defmodule Fishjam.ServerMessage.SubscribeRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :event_type, 1, type: Fishjam.ServerMessage.EventType, json_name: "eventType", enum: true end @@ -95,7 +95,7 @@ end defmodule Fishjam.ServerMessage.SubscribeResponse do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :event_type, 1, type: Fishjam.ServerMessage.EventType, json_name: "eventType", enum: true end @@ -103,7 +103,7 @@ end defmodule Fishjam.ServerMessage.RoomCreated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -111,7 +111,7 @@ end defmodule Fishjam.ServerMessage.RoomDeleted do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -119,7 +119,7 @@ end defmodule Fishjam.ServerMessage.HlsPlayable do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :component_id, 2, type: :string, json_name: "componentId" @@ -128,7 +128,7 @@ end defmodule Fishjam.ServerMessage.HlsUploaded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -136,7 +136,7 @@ end defmodule Fishjam.ServerMessage.HlsUploadCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -144,7 +144,7 @@ end defmodule Fishjam.ServerMessage.PeerMetadataUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" field :peer_id, 2, type: :string, json_name: "peerId" @@ -154,7 +154,7 @@ end defmodule Fishjam.ServerMessage.TrackAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :endpoint_info, 0 @@ -167,7 +167,7 @@ end defmodule Fishjam.ServerMessage.TrackRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :endpoint_info, 0 @@ -180,7 +180,7 @@ end defmodule Fishjam.ServerMessage.TrackMetadataUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :endpoint_info, 0 @@ -193,7 +193,7 @@ end defmodule Fishjam.ServerMessage.StreamConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" end @@ -201,7 +201,7 @@ end defmodule Fishjam.ServerMessage.StreamDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" end @@ -209,7 +209,7 @@ end defmodule Fishjam.ServerMessage.ViewerConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" field :viewer_id, 2, type: :string, json_name: "viewerId" @@ -218,7 +218,7 @@ end defmodule Fishjam.ServerMessage.ViewerDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :stream_id, 1, type: :string, json_name: "streamId" field :viewer_id, 2, type: :string, json_name: "viewerId" @@ -227,7 +227,7 @@ end defmodule Fishjam.ServerMessage do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/lib/fishjam/shared_notifications.pb.ex b/fishjam_protos/lib/fishjam/shared_notifications.pb.ex index 60d9a50..0e39892 100644 --- a/fishjam_protos/lib/fishjam/shared_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/shared_notifications.pb.ex @@ -1,7 +1,7 @@ defmodule Fishjam.TrackType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :TRACK_TYPE_UNSPECIFIED, 0 field :TRACK_TYPE_VIDEO, 1 @@ -11,7 +11,7 @@ end defmodule Fishjam.TrackEncoding do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :TRACK_ENCODING_UNSPECIFIED, 0 field :TRACK_ENCODING_PCM16, 1 @@ -21,7 +21,7 @@ end defmodule Fishjam.Track do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :id, 1, type: :string field :type, 2, type: Fishjam.TrackType, enum: true From 23b0800f5cb93b844218b526f7b8c5bbd3941778 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:32:23 +0200 Subject: [PATCH 5/7] Add RemoveTrack to AgentRequest --- doc/docs.md | 1 + fishjam/agent_notifications.proto | 3 ++- fishjam_protos/lib/fishjam/agent_notifications.pb.ex | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 80f7dab..5f58672 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -130,6 +130,7 @@ Defines any type of message passed from agent peer to Fishjam | ----- | ---- | ----- | ----------- | | auth_request | [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest) | | | | add_track | [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack) | | | +| remove_track | [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack) | | | | track_data | [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) | | | diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto index e3726df..b391c21 100644 --- a/fishjam/agent_notifications.proto +++ b/fishjam/agent_notifications.proto @@ -43,7 +43,8 @@ message AgentRequest { oneof content { AuthRequest auth_request = 1; AddTrack add_track = 2; - TrackData track_data = 3; + RemoveTrack remove_track = 3; + TrackData track_data = 4; } } diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex index 00d7e75..1d1f7e1 100644 --- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -56,7 +56,13 @@ defmodule Fishjam.AgentRequest do oneof: 0 field :add_track, 2, type: Fishjam.AgentRequest.AddTrack, json_name: "addTrack", oneof: 0 - field :track_data, 3, type: Fishjam.AgentRequest.TrackData, json_name: "trackData", oneof: 0 + + field :remove_track, 3, + type: Fishjam.AgentRequest.RemoveTrack, + json_name: "removeTrack", + oneof: 0 + + field :track_data, 4, type: Fishjam.AgentRequest.TrackData, json_name: "trackData", oneof: 0 end defmodule Fishjam.AgentResponse.Authenticated do From ac3948583760f346bde9bbc9a0faa9f23eda29cc Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:42:18 +0200 Subject: [PATCH 6/7] Rename TrackConfig to CodecParameters --- doc/docs.md | 8 ++++---- fishjam/agent_notifications.proto | 4 ++-- fishjam_protos/lib/fishjam/agent_notifications.pb.ex | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 5f58672..b168020 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -6,7 +6,7 @@ - [fishjam/agent_notifications.proto](#fishjam_agent_notifications-proto) - [AgentRequest](#fishjam-AgentRequest) - [AgentRequest.AddTrack](#fishjam-AgentRequest-AddTrack) - - [AgentRequest.AddTrack.TrackConfig](#fishjam-AgentRequest-AddTrack-TrackConfig) + - [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters) - [AgentRequest.AuthRequest](#fishjam-AgentRequest-AuthRequest) - [AgentRequest.RemoveTrack](#fishjam-AgentRequest-RemoveTrack) - [AgentRequest.TrackData](#fishjam-AgentRequest-TrackData) @@ -147,16 +147,16 @@ Request to add a track of the specified type | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | track | [Track](#fishjam-Track) | | Specification of the track to be added | -| config | [AgentRequest.AddTrack.TrackConfig](#fishjam-AgentRequest-AddTrack-TrackConfig) | | Configuration of the input data stream | +| config | [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters) | | Configuration of the input data stream | - + -### AgentRequest.AddTrack.TrackConfig +### AgentRequest.AddTrack.CodecParameters diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto index b391c21..61eaf40 100644 --- a/fishjam/agent_notifications.proto +++ b/fishjam/agent_notifications.proto @@ -14,7 +14,7 @@ message AgentRequest { // Request to add a track of the specified type message AddTrack { - message TrackConfig { + message CodecParameters { // The format of the input stream, defaults to pcm16 fishjam.TrackEncoding encoding = 1; // The sample rate of the input stream, may be omitted for opus @@ -26,7 +26,7 @@ message AgentRequest { // Specification of the track to be added fishjam.Track track = 1; // Configuration of the input data stream - TrackConfig config = 2; + CodecParameters config = 2; } // Removes the given track diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex index 1d1f7e1..ee9f2fa 100644 --- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -7,7 +7,7 @@ defmodule Fishjam.AgentRequest.AuthRequest do field :room_id, 2, type: :string, json_name: "roomId" end -defmodule Fishjam.AgentRequest.AddTrack.TrackConfig do +defmodule Fishjam.AgentRequest.AddTrack.CodecParameters do @moduledoc false use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 @@ -23,7 +23,7 @@ defmodule Fishjam.AgentRequest.AddTrack do use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track, 1, type: Fishjam.Track - field :config, 2, type: Fishjam.AgentRequest.AddTrack.TrackConfig + field :config, 2, type: Fishjam.AgentRequest.AddTrack.CodecParameters end defmodule Fishjam.AgentRequest.RemoveTrack do From 6f40649bb5a3c129711134e54f5d766e76819166 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:44:36 +0200 Subject: [PATCH 7/7] Rename field --- doc/docs.md | 2 +- fishjam/agent_notifications.proto | 4 ++-- fishjam_protos/lib/fishjam/agent_notifications.pb.ex | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index b168020..705340c 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -147,7 +147,7 @@ Request to add a track of the specified type | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | track | [Track](#fishjam-Track) | | Specification of the track to be added | -| config | [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters) | | Configuration of the input data stream | +| codec_params | [AgentRequest.AddTrack.CodecParameters](#fishjam-AgentRequest-AddTrack-CodecParameters) | | Parameters of the input data stream | diff --git a/fishjam/agent_notifications.proto b/fishjam/agent_notifications.proto index 61eaf40..a6e4ba2 100644 --- a/fishjam/agent_notifications.proto +++ b/fishjam/agent_notifications.proto @@ -25,8 +25,8 @@ message AgentRequest { // Specification of the track to be added fishjam.Track track = 1; - // Configuration of the input data stream - CodecParameters config = 2; + // Parameters of the input data stream + CodecParameters codec_params = 2; } // Removes the given track diff --git a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex index ee9f2fa..eed4969 100644 --- a/fishjam_protos/lib/fishjam/agent_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/agent_notifications.pb.ex @@ -23,7 +23,10 @@ defmodule Fishjam.AgentRequest.AddTrack do use Protobuf, protoc_gen_elixir_version: "0.15.0", syntax: :proto3 field :track, 1, type: Fishjam.Track - field :config, 2, type: Fishjam.AgentRequest.AddTrack.CodecParameters + + field :codec_params, 2, + type: Fishjam.AgentRequest.AddTrack.CodecParameters, + json_name: "codecParams" end defmodule Fishjam.AgentRequest.RemoveTrack do