Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jellyfish/peer_notifications.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
72 changes: 72 additions & 0 deletions jellyfish/server_notifications.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}