Server Notifications
Jellyfish sends server side notifications whenever some important event occurs, e.g.:
- a room has been created
- a peer has connected
- component has crashed
- etc.
This is the list of all available notifications:
1""" 2.. include:: ../../docs/server_notifications.md 3""" 4 5# Exported messages 6from jellyfish.events._protos.jellyfish import ( 7 ServerMessageComponentCrashed, 8 ServerMessageHlsPlayable, 9 ServerMessageMetricsReport, 10 ServerMessagePeerAdded, 11 ServerMessagePeerConnected, 12 ServerMessagePeerCrashed, 13 ServerMessagePeerDeleted, 14 ServerMessagePeerDisconnected, 15 ServerMessageRoomCrashed, 16 ServerMessageRoomCreated, 17 ServerMessageRoomDeleted, 18 ServerMessageTrack, 19 ServerMessageTrackAdded, 20 ServerMessageTrackMetadataUpdated, 21 ServerMessageTrackRemoved, 22 ServerMessageTrackType, 23) 24 25__all__ = [ 26 "ServerMessageRoomCreated", 27 "ServerMessageRoomDeleted", 28 "ServerMessageRoomCrashed", 29 "ServerMessagePeerAdded", 30 "ServerMessagePeerConnected", 31 "ServerMessagePeerDeleted", 32 "ServerMessagePeerDisconnected", 33 "ServerMessagePeerCrashed", 34 "ServerMessageComponentCrashed", 35 "ServerMessageTrack", 36 "ServerMessageTrackType", 37 "ServerMessageTrackAdded", 38 "ServerMessageTrackMetadataUpdated", 39 "ServerMessageTrackRemoved", 40 "ServerMessageHlsPlayable", 41 "ServerMessageMetricsReport", 42]
181@dataclass(eq=False, repr=False) 182class ServerMessageRoomCreated(betterproto.Message): 183 """Notification sent when a room is created""" 184 185 room_id: str = betterproto.string_field(1)
Notification sent when a room is created
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
188@dataclass(eq=False, repr=False) 189class ServerMessageRoomDeleted(betterproto.Message): 190 """Notification sent when a room is deleted""" 191 192 room_id: str = betterproto.string_field(1)
Notification sent when a room is deleted
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
97@dataclass(eq=False, repr=False) 98class ServerMessageRoomCrashed(betterproto.Message): 99 """Notification sent when a room crashes""" 100 101 room_id: str = betterproto.string_field(1)
Notification sent when a room crashes
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
104@dataclass(eq=False, repr=False) 105class ServerMessagePeerAdded(betterproto.Message): 106 """Notification sent when a peer is added""" 107 108 room_id: str = betterproto.string_field(1) 109 peer_id: str = betterproto.string_field(2)
Notification sent when a peer is added
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
120@dataclass(eq=False, repr=False) 121class ServerMessagePeerConnected(betterproto.Message): 122 """Notification sent when a peer connects""" 123 124 room_id: str = betterproto.string_field(1) 125 peer_id: str = betterproto.string_field(2)
Notification sent when a peer connects
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
112@dataclass(eq=False, repr=False) 113class ServerMessagePeerDeleted(betterproto.Message): 114 """Notification sent when a peer is removed""" 115 116 room_id: str = betterproto.string_field(1) 117 peer_id: str = betterproto.string_field(2)
Notification sent when a peer is removed
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
128@dataclass(eq=False, repr=False) 129class ServerMessagePeerDisconnected(betterproto.Message): 130 """Notification sent when a peer disconnects from JF""" 131 132 room_id: str = betterproto.string_field(1) 133 peer_id: str = betterproto.string_field(2)
Notification sent when a peer disconnects from JF
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
136@dataclass(eq=False, repr=False) 137class ServerMessagePeerCrashed(betterproto.Message): 138 """Notification sent when a peer crashes""" 139 140 room_id: str = betterproto.string_field(1) 141 peer_id: str = betterproto.string_field(2) 142 reason: str = betterproto.string_field(3)
Notification sent when a peer crashes
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
145@dataclass(eq=False, repr=False) 146class ServerMessageComponentCrashed(betterproto.Message): 147 """Notification sent when a component crashes""" 148 149 room_id: str = betterproto.string_field(1) 150 component_id: str = betterproto.string_field(2)
Notification sent when a component crashes
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
235@dataclass(eq=False, repr=False) 236class ServerMessageTrack(betterproto.Message): 237 """Describes a media track""" 238 239 id: str = betterproto.string_field(1) 240 type: "ServerMessageTrackType" = betterproto.enum_field(2) 241 metadata: str = betterproto.string_field(3)
Describes a media track
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
20class ServerMessageTrackType(betterproto.Enum): 21 """Defines types of tracks being published by peers and component""" 22 23 TRACK_TYPE_UNSPECIFIED = 0 24 TRACK_TYPE_VIDEO = 1 25 TRACK_TYPE_AUDIO = 2
Defines types of tracks being published by peers and component
Inherited Members
- betterproto.Enum
- from_string
- enum.Enum
- name
- value
- builtins.int
- conjugate
- bit_length
- to_bytes
- from_bytes
- as_integer_ratio
- real
- imag
- numerator
- denominator
244@dataclass(eq=False, repr=False) 245class ServerMessageTrackAdded(betterproto.Message): 246 """Notification sent when peer or component adds new track""" 247 248 room_id: str = betterproto.string_field(1) 249 peer_id: str = betterproto.string_field(2, group="endpoint_info") 250 component_id: str = betterproto.string_field(3, group="endpoint_info") 251 track: "ServerMessageTrack" = betterproto.message_field(4)
Notification sent when peer or component adds new track
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
264@dataclass(eq=False, repr=False) 265class ServerMessageTrackMetadataUpdated(betterproto.Message): 266 """Notification sent when metadata of a multimedia track is updated""" 267 268 room_id: str = betterproto.string_field(1) 269 peer_id: str = betterproto.string_field(2, group="endpoint_info") 270 component_id: str = betterproto.string_field(3, group="endpoint_info") 271 track: "ServerMessageTrack" = betterproto.message_field(4)
Notification sent when metadata of a multimedia track is updated
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
254@dataclass(eq=False, repr=False) 255class ServerMessageTrackRemoved(betterproto.Message): 256 """Notification sent when a track is removed""" 257 258 room_id: str = betterproto.string_field(1) 259 peer_id: str = betterproto.string_field(2, group="endpoint_info") 260 component_id: str = betterproto.string_field(3, group="endpoint_info") 261 track: "ServerMessageTrack" = betterproto.message_field(4)
Notification sent when a track is removed
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
202@dataclass(eq=False, repr=False) 203class ServerMessageHlsPlayable(betterproto.Message): 204 """Notification sent when the HLS stream becomes available in a room""" 205 206 room_id: str = betterproto.string_field(1) 207 component_id: str = betterproto.string_field(2)
Notification sent when the HLS stream becomes available in a room
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set
195@dataclass(eq=False, repr=False) 196class ServerMessageMetricsReport(betterproto.Message): 197 """Message containing WebRTC metrics from JF""" 198 199 metrics: str = betterproto.string_field(1)
Message containing WebRTC metrics from JF
Inherited Members
- betterproto.Message
- SerializeToString
- parse
- FromString
- to_dict
- from_dict
- to_json
- from_json
- to_pydict
- from_pydict
- is_set