From 80cd16975f9d634927a57a73403252e38442e35f Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Wed, 5 Mar 2025 17:54:35 +0100 Subject: [PATCH 1/5] Add room type to Authenticated message --- doc/docs.md | 23 +++++++++++++++++-- fishjam/peer_notifications.proto | 12 ++++++++-- .../lib/fishjam/media_events/peer/peer.pb.ex | 2 +- .../lib/fishjam/peer_notifications.pb.ex | 11 +++++++++ 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 06fc235..966c101 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -60,6 +60,8 @@ - [PeerMessage.MediaEvent](#fishjam-PeerMessage-MediaEvent) - [PeerMessage.RTCStatsReport](#fishjam-PeerMessage-RTCStatsReport) + - [PeerMessage.RoomType](#fishjam-PeerMessage-RoomType) + - [fishjam/server_notifications.proto](#fishjam_server_notifications-proto) - [ServerMessage](#fishjam-ServerMessage) - [ServerMessage.AuthRequest](#fishjam-ServerMessage-AuthRequest) @@ -876,7 +878,12 @@ Request sent by peer, to authenticate to FJ server ### PeerMessage.Authenticated -Response sent by FJ, confirming successfull authentication +Response sent by FJ, confirming successful authentication + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| room_type | [PeerMessage.RoomType](#fishjam-PeerMessage-RoomType) | | | @@ -915,6 +922,18 @@ https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport#the_statistic_ty + + + +### PeerMessage.RoomType +Defines types of rooms peers may connect to + +| Name | Number | Description | +| ---- | ------ | ----------- | +| FULL_FEATURE | 0 | | +| AUDIO_ONLY | 1 | | + + @@ -949,7 +968,7 @@ Defines any type of message passed between FJ and server peer | subscribe_response | [ServerMessage.SubscribeResponse](#fishjam-ServerMessage-SubscribeResponse) | | | | room_created | [ServerMessage.RoomCreated](#fishjam-ServerMessage-RoomCreated) | | | | room_deleted | [ServerMessage.RoomDeleted](#fishjam-ServerMessage-RoomDeleted) | | | -| metrics_report | [ServerMessage.MetricsReport](#fishjam-ServerMessage-MetricsReport) | | | +| metrics_report | [ServerMessage.MetricsReport](#fishjam-ServerMessage-MetricsReport) | | **Deprecated.** | | hls_playable | [ServerMessage.HlsPlayable](#fishjam-ServerMessage-HlsPlayable) | | | | hls_uploaded | [ServerMessage.HlsUploaded](#fishjam-ServerMessage-HlsUploaded) | | | | hls_upload_crashed | [ServerMessage.HlsUploadCrashed](#fishjam-ServerMessage-HlsUploadCrashed) | | | diff --git a/fishjam/peer_notifications.proto b/fishjam/peer_notifications.proto index 1a6ccce..751af79 100644 --- a/fishjam/peer_notifications.proto +++ b/fishjam/peer_notifications.proto @@ -7,8 +7,16 @@ import "fishjam/media_events/server/server.proto"; // Defines any type of message sent between FJ and a peer message PeerMessage { - // Response sent by FJ, confirming successfull authentication - message Authenticated {} + // Defines types of rooms peers may connect to + enum RoomType { + FULL_FEATURE = 0; + AUDIO_ONLY = 1; + } + + // Response sent by FJ, confirming successful authentication + message Authenticated { + RoomType room_type = 1; + } // Request sent by peer, to authenticate to FJ server message AuthRequest { 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 b699c13..15d46d2 100644 --- a/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex +++ b/fishjam_protos/lib/fishjam/media_events/peer/peer.pb.ex @@ -131,7 +131,7 @@ end defmodule Fishjam.MediaEvents.Peer.MediaEvent.SetTargetTrackVariant do @moduledoc false - use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0" + use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 field :track_id, 1, type: :string, json_name: "trackId" field :variant, 2, type: Fishjam.MediaEvents.Variant, enum: true diff --git a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex index 14b63c8..5691103 100644 --- a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex @@ -1,7 +1,18 @@ +defmodule Fishjam.PeerMessage.RoomType do + @moduledoc false + + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + + field :FULL_FEATURE, 0 + field :AUDIO_ONLY, 1 +end + defmodule Fishjam.PeerMessage.Authenticated do @moduledoc false use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + + field :room_type, 1, type: Fishjam.PeerMessage.RoomType, json_name: "roomType", enum: true end defmodule Fishjam.PeerMessage.AuthRequest do From f5b77ec9864a9c2f4f0b5072a735a4ecf2295a9b Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:10:04 +0100 Subject: [PATCH 2/5] Update deps and fix linting --- .../lib/fishjam/media_events/peer/peer.pb.ex | 30 +++++------ .../fishjam/media_events/server/server.pb.ex | 50 +++++++++---------- .../lib/fishjam/media_events/shared.pb.ex | 4 +- .../lib/fishjam/peer_notifications.pb.ex | 16 +++--- .../lib/fishjam/server_notifications.pb.ex | 50 +++++++++---------- fishjam_protos/mix.lock | 2 +- 6 files changed, 76 insertions(+), 76 deletions(-) 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 15d46d2..fa751ed 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.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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 do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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 a05ef7e..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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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.14.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 f628ff9..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.14.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.14.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 5691103..d240fd2 100644 --- a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex @@ -1,16 +1,16 @@ defmodule Fishjam.PeerMessage.RoomType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 - field :FULL_FEATURE, 0 - field :AUDIO_ONLY, 1 + field :ROOM_TYPE_UNSPECIFIED, 0 + field :ROOM_TYPE_AUDIO_ONLY, 1 end defmodule Fishjam.PeerMessage.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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 @@ -18,7 +18,7 @@ end defmodule Fishjam.PeerMessage.AuthRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -27,7 +27,7 @@ end defmodule Fishjam.PeerMessage.RTCStatsReport do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :data, 1, type: :string end @@ -35,7 +35,7 @@ end defmodule Fishjam.PeerMessage.MediaEvent do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :data, 1, type: :string end @@ -43,7 +43,7 @@ end defmodule Fishjam.PeerMessage do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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 785fb25..792abfe 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.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 @@ -11,7 +11,7 @@ end defmodule Fishjam.ServerMessage.TrackType do @moduledoc false - use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :TRACK_TYPE_UNSPECIFIED, 0 field :TRACK_TYPE_VIDEO, 1 @@ -21,7 +21,7 @@ end defmodule Fishjam.ServerMessage.RoomCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -29,7 +29,7 @@ end defmodule Fishjam.ServerMessage.PeerAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -38,7 +38,7 @@ end defmodule Fishjam.ServerMessage.PeerDeleted do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -47,7 +47,7 @@ end defmodule Fishjam.ServerMessage.PeerConnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -56,7 +56,7 @@ end defmodule Fishjam.ServerMessage.PeerDisconnected do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -65,7 +65,7 @@ end defmodule Fishjam.ServerMessage.PeerCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -75,7 +75,7 @@ end defmodule Fishjam.ServerMessage.ComponentCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -84,13 +84,13 @@ end defmodule Fishjam.ServerMessage.Authenticated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :token, 1, type: :string end @@ -98,7 +98,7 @@ end defmodule Fishjam.ServerMessage.SubscribeRequest do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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 @@ -106,7 +106,7 @@ end defmodule Fishjam.ServerMessage.SubscribeResponse do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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 @@ -114,7 +114,7 @@ end defmodule Fishjam.ServerMessage.RoomCreated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -122,7 +122,7 @@ end defmodule Fishjam.ServerMessage.RoomDeleted do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -130,7 +130,7 @@ end defmodule Fishjam.ServerMessage.MetricsReport do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :metrics, 1, type: :string end @@ -138,7 +138,7 @@ end defmodule Fishjam.ServerMessage.HlsPlayable do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -147,7 +147,7 @@ end defmodule Fishjam.ServerMessage.HlsUploaded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -155,7 +155,7 @@ end defmodule Fishjam.ServerMessage.HlsUploadCrashed do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :room_id, 1, type: :string, json_name: "roomId" end @@ -163,7 +163,7 @@ end defmodule Fishjam.ServerMessage.PeerMetadataUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.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" @@ -173,7 +173,7 @@ end defmodule Fishjam.ServerMessage.Track do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :id, 1, type: :string field :type, 2, type: Fishjam.ServerMessage.TrackType, enum: true @@ -183,7 +183,7 @@ end defmodule Fishjam.ServerMessage.TrackAdded do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :endpoint_info, 0 @@ -196,7 +196,7 @@ end defmodule Fishjam.ServerMessage.TrackRemoved do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :endpoint_info, 0 @@ -209,7 +209,7 @@ end defmodule Fishjam.ServerMessage.TrackMetadataUpdated do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :endpoint_info, 0 @@ -222,7 +222,7 @@ end defmodule Fishjam.ServerMessage do @moduledoc false - use Protobuf, protoc_gen_elixir_version: "0.14.0", syntax: :proto3 + use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 oneof :content, 0 diff --git a/fishjam_protos/mix.lock b/fishjam_protos/mix.lock index 08b530d..79ab06f 100644 --- a/fishjam_protos/mix.lock +++ b/fishjam_protos/mix.lock @@ -1,3 +1,3 @@ %{ - "protobuf": {:hex, :protobuf, "0.14.0", "75b64b8c1f0c833b5e76cd841d3448f077f655c2a2eed53358651fbfe4a6b70e", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "0f747eaa54ace9617536f1cb4b2a4962bc7e43f1aa475c6fa9c60079955c4cb0"}, + "protobuf": {:hex, :protobuf, "0.14.1", "9ac0582170df27669ccb2ef6cb0a3d55020d58896edbba330f20d0748881530a", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "39a9d49d346e3ed597e5ae3168a43d9603870fc159419617f584cdf6071f0e25"}, } From 3398689ecbdb01f68527c8ff6d526ab8faed34c1 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:16:01 +0100 Subject: [PATCH 3/5] Actually commit changes --- fishjam/peer_notifications.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fishjam/peer_notifications.proto b/fishjam/peer_notifications.proto index 751af79..8b3ff11 100644 --- a/fishjam/peer_notifications.proto +++ b/fishjam/peer_notifications.proto @@ -9,8 +9,8 @@ import "fishjam/media_events/server/server.proto"; message PeerMessage { // Defines types of rooms peers may connect to enum RoomType { - FULL_FEATURE = 0; - AUDIO_ONLY = 1; + ROOM_TYPE_UNSPECIFIED = 0; + ROOM_TYPE_AUDIO_ONLY = 1; } // Response sent by FJ, confirming successful authentication From 65f5eba6afcf53ce39d42c81dbc548ec541fac3f Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:20:39 +0100 Subject: [PATCH 4/5] Regenerate docs --- doc/docs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 966c101..eb4b23c 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -930,8 +930,8 @@ Defines types of rooms peers may connect to | Name | Number | Description | | ---- | ------ | ----------- | -| FULL_FEATURE | 0 | | -| AUDIO_ONLY | 1 | | +| ROOM_TYPE_UNSPECIFIED | 0 | | +| ROOM_TYPE_AUDIO_ONLY | 1 | | From 6dcbc6525fb0c0e63adf8039c4e685176f76bcfa Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:50:00 +0100 Subject: [PATCH 5/5] Add explicit ROOM_TYPE_FULL_FEATURE option --- doc/docs.md | 3 ++- fishjam/peer_notifications.proto | 3 ++- fishjam_protos/lib/fishjam/peer_notifications.pb.ex | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index eb4b23c..affaf5f 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -931,7 +931,8 @@ Defines types of rooms peers may connect to | Name | Number | Description | | ---- | ------ | ----------- | | ROOM_TYPE_UNSPECIFIED | 0 | | -| ROOM_TYPE_AUDIO_ONLY | 1 | | +| ROOM_TYPE_FULL_FEATURE | 1 | | +| ROOM_TYPE_AUDIO_ONLY | 2 | | diff --git a/fishjam/peer_notifications.proto b/fishjam/peer_notifications.proto index 8b3ff11..314b405 100644 --- a/fishjam/peer_notifications.proto +++ b/fishjam/peer_notifications.proto @@ -10,7 +10,8 @@ message PeerMessage { // Defines types of rooms peers may connect to enum RoomType { ROOM_TYPE_UNSPECIFIED = 0; - ROOM_TYPE_AUDIO_ONLY = 1; + ROOM_TYPE_FULL_FEATURE = 1; + ROOM_TYPE_AUDIO_ONLY = 2; } // Response sent by FJ, confirming successful authentication diff --git a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex index d240fd2..ef5a2f2 100644 --- a/fishjam_protos/lib/fishjam/peer_notifications.pb.ex +++ b/fishjam_protos/lib/fishjam/peer_notifications.pb.ex @@ -4,7 +4,8 @@ defmodule Fishjam.PeerMessage.RoomType do use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :ROOM_TYPE_UNSPECIFIED, 0 - field :ROOM_TYPE_AUDIO_ONLY, 1 + field :ROOM_TYPE_FULL_FEATURE, 1 + field :ROOM_TYPE_AUDIO_ONLY, 2 end defmodule Fishjam.PeerMessage.Authenticated do