diff --git a/jellyfish/peer_notifications.proto b/jellyfish/peer_notifications.proto index ffcc17e..269a018 100644 --- a/jellyfish/peer_notifications.proto +++ b/jellyfish/peer_notifications.proto @@ -2,13 +2,17 @@ syntax = "proto3"; package jellyfish; +// Defines any type of message sent between JF and a peer message PeerMessage { + // Response sent by JF, confirming successfull authentication message Authenticated {} + // Request sent by peer, to authenticate to JF server message AuthRequest { string token = 1; } + // Any type of WebRTC messages passed betweend JF and peer message MediaEvent { string data = 1; } diff --git a/jellyfish/server_notifications.proto b/jellyfish/server_notifications.proto index 1c0c925..f8e200d 100644 --- a/jellyfish/server_notifications.proto +++ b/jellyfish/server_notifications.proto @@ -2,76 +2,144 @@ syntax = "proto3"; package jellyfish; +// Defines any type of message passed between JF and server client message ServerMessage { + // Notification sent when a room crashes message RoomCrashed { string room_id = 1; } + // Notification sent when a peer connects message PeerConnected { string room_id = 1; string peer_id = 2; } + // Notification sent when a peer disconnects from JF message PeerDisconnected { string room_id = 1; string peer_id = 2; } + // Notification sent when a peer crashes message PeerCrashed { string room_id = 1; string peer_id = 2; } + // Notification sent when a component crashes message ComponentCrashed { string room_id = 1; string component_id = 2; } + // Response sent by JF, confirming successfull authentication message Authenticated {} + // Request sent by client, to authenticate to JF server message AuthRequest { string token = 1; } + // Defines message groups for which client can subscribe enum EventType { EVENT_TYPE_UNSPECIFIED = 0; EVENT_TYPE_SERVER_NOTIFICATION = 1; EVENT_TYPE_METRICS = 2; } + // Request sent by client to subsribe for certain message type message SubscribeRequest { EventType event_type = 1; } + // Response sent by JF, confirming subscription for message type message SubscribeResponse { EventType event_type = 1; } + // Notification sent when a room is created message RoomCreated { string room_id = 1; } + // Notification sent when a room is deleted message RoomDeleted { string room_id = 1; } + // Message containing WebRTC metrics from JF message MetricsReport { string metrics = 1; } + // Notification sent when the HLS stream becomes available in a room message HlsPlayable { string room_id = 1; string component_id = 2; } + // Notification sent when the HLS recording is successfully uploded to AWS S3 message HlsUploaded { string room_id = 1; } + // Notification sent when the upload of HLS recording to AWS S3 fails message HlsUploadCrashed { string room_id = 1; } + // Notification sent when peer updates its metadata + message PeerMetadataUpdated { + string room_id = 1; + string peer_id = 2; + 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; + oneof endpoint_info { + string peer_id = 2; + string component_id = 3; + } + Track track = 4; + } + + // Notification sent when a track is removed + message TrackRemoved { + string room_id = 1; + oneof endpoint_info { + string peer_id = 2; + string component_id = 3; + } + Track track = 4; + } + + // Notification sent when metadata of a multimedia track is updated + message TrackMetadataUpdated { + string room_id = 1; + oneof endpoint_info { + string peer_id = 2; + string component_id = 3; + } + Track track = 4; + } + oneof content { RoomCrashed room_crashed = 1; PeerConnected peer_connected = 2; @@ -88,5 +156,9 @@ message ServerMessage { HlsPlayable hls_playable = 13; HlsUploaded hls_uploaded = 14; HlsUploadCrashed hls_upload_crashed = 15; + PeerMetadataUpdated peer_metadata_updated = 16; + TrackAdded track_added = 17; + TrackRemoved track_removed = 18; + TrackMetadataUpdated track_metadata_updated = 19; } }