@fishjam-cloud/js-server-sdk 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/proto.d.mts DELETED
@@ -1,210 +0,0 @@
1
- import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
-
3
- /** Defines message groups for which peer can subscribe */
4
- declare enum ServerMessage_EventType {
5
- EVENT_TYPE_UNSPECIFIED = 0,
6
- EVENT_TYPE_SERVER_NOTIFICATION = 1,
7
- UNRECOGNIZED = -1
8
- }
9
- /** Defines types of tracks being published by peers and component */
10
- declare enum ServerMessage_TrackType {
11
- TRACK_TYPE_UNSPECIFIED = 0,
12
- TRACK_TYPE_VIDEO = 1,
13
- TRACK_TYPE_AUDIO = 2,
14
- UNRECOGNIZED = -1
15
- }
16
- /** Defines any type of message passed between FJ and server peer */
17
- interface ServerMessage {
18
- roomCrashed?: ServerMessage_RoomCrashed | undefined;
19
- peerConnected?: ServerMessage_PeerConnected | undefined;
20
- peerDisconnected?: ServerMessage_PeerDisconnected | undefined;
21
- peerCrashed?: ServerMessage_PeerCrashed | undefined;
22
- componentCrashed?: ServerMessage_ComponentCrashed | undefined;
23
- authenticated?: ServerMessage_Authenticated | undefined;
24
- authRequest?: ServerMessage_AuthRequest | undefined;
25
- subscribeRequest?: ServerMessage_SubscribeRequest | undefined;
26
- subscribeResponse?: ServerMessage_SubscribeResponse | undefined;
27
- roomCreated?: ServerMessage_RoomCreated | undefined;
28
- roomDeleted?: ServerMessage_RoomDeleted | undefined;
29
- hlsPlayable?: ServerMessage_HlsPlayable | undefined;
30
- hlsUploaded?: ServerMessage_HlsUploaded | undefined;
31
- hlsUploadCrashed?: ServerMessage_HlsUploadCrashed | undefined;
32
- peerMetadataUpdated?: ServerMessage_PeerMetadataUpdated | undefined;
33
- trackAdded?: ServerMessage_TrackAdded | undefined;
34
- trackRemoved?: ServerMessage_TrackRemoved | undefined;
35
- trackMetadataUpdated?: ServerMessage_TrackMetadataUpdated | undefined;
36
- peerAdded?: ServerMessage_PeerAdded | undefined;
37
- peerDeleted?: ServerMessage_PeerDeleted | undefined;
38
- streamConnected?: ServerMessage_StreamConnected | undefined;
39
- streamDisconnected?: ServerMessage_StreamDisconnected | undefined;
40
- viewerConnected?: ServerMessage_ViewerConnected | undefined;
41
- viewerDisconnected?: ServerMessage_ViewerDisconnected | undefined;
42
- }
43
- declare const ServerMessage: MessageFns<ServerMessage>;
44
- /** Notification sent when a room crashes */
45
- interface ServerMessage_RoomCrashed {
46
- roomId: string;
47
- }
48
- declare const ServerMessage_RoomCrashed: MessageFns<ServerMessage_RoomCrashed>;
49
- /** Notification sent when a peer is added */
50
- interface ServerMessage_PeerAdded {
51
- roomId: string;
52
- peerId: string;
53
- }
54
- declare const ServerMessage_PeerAdded: MessageFns<ServerMessage_PeerAdded>;
55
- /** Notification sent when a peer is removed */
56
- interface ServerMessage_PeerDeleted {
57
- roomId: string;
58
- peerId: string;
59
- }
60
- declare const ServerMessage_PeerDeleted: MessageFns<ServerMessage_PeerDeleted>;
61
- /** Notification sent when a peer connects */
62
- interface ServerMessage_PeerConnected {
63
- roomId: string;
64
- peerId: string;
65
- }
66
- declare const ServerMessage_PeerConnected: MessageFns<ServerMessage_PeerConnected>;
67
- /** Notification sent when a peer disconnects from FJ */
68
- interface ServerMessage_PeerDisconnected {
69
- roomId: string;
70
- peerId: string;
71
- }
72
- declare const ServerMessage_PeerDisconnected: MessageFns<ServerMessage_PeerDisconnected>;
73
- /** Notification sent when a peer crashes */
74
- interface ServerMessage_PeerCrashed {
75
- roomId: string;
76
- peerId: string;
77
- reason: string;
78
- }
79
- declare const ServerMessage_PeerCrashed: MessageFns<ServerMessage_PeerCrashed>;
80
- /** Notification sent when a component crashes */
81
- interface ServerMessage_ComponentCrashed {
82
- roomId: string;
83
- componentId: string;
84
- }
85
- declare const ServerMessage_ComponentCrashed: MessageFns<ServerMessage_ComponentCrashed>;
86
- /** Response sent by FJ, confirming successfull authentication */
87
- interface ServerMessage_Authenticated {
88
- }
89
- declare const ServerMessage_Authenticated: MessageFns<ServerMessage_Authenticated>;
90
- /** Request sent by peer, to authenticate to FJ server */
91
- interface ServerMessage_AuthRequest {
92
- token: string;
93
- }
94
- declare const ServerMessage_AuthRequest: MessageFns<ServerMessage_AuthRequest>;
95
- /** Request sent by peer to subsribe for certain message type */
96
- interface ServerMessage_SubscribeRequest {
97
- eventType: ServerMessage_EventType;
98
- }
99
- declare const ServerMessage_SubscribeRequest: MessageFns<ServerMessage_SubscribeRequest>;
100
- /** Response sent by FJ, confirming subscription for message type */
101
- interface ServerMessage_SubscribeResponse {
102
- eventType: ServerMessage_EventType;
103
- }
104
- declare const ServerMessage_SubscribeResponse: MessageFns<ServerMessage_SubscribeResponse>;
105
- /** Notification sent when a room is created */
106
- interface ServerMessage_RoomCreated {
107
- roomId: string;
108
- }
109
- declare const ServerMessage_RoomCreated: MessageFns<ServerMessage_RoomCreated>;
110
- /** Notification sent when a room is deleted */
111
- interface ServerMessage_RoomDeleted {
112
- roomId: string;
113
- }
114
- declare const ServerMessage_RoomDeleted: MessageFns<ServerMessage_RoomDeleted>;
115
- /** Notification sent when the HLS stream becomes available in a room */
116
- interface ServerMessage_HlsPlayable {
117
- roomId: string;
118
- componentId: string;
119
- }
120
- declare const ServerMessage_HlsPlayable: MessageFns<ServerMessage_HlsPlayable>;
121
- /** Notification sent when the HLS recording is successfully uploded to AWS S3 */
122
- interface ServerMessage_HlsUploaded {
123
- roomId: string;
124
- }
125
- declare const ServerMessage_HlsUploaded: MessageFns<ServerMessage_HlsUploaded>;
126
- /** Notification sent when the upload of HLS recording to AWS S3 fails */
127
- interface ServerMessage_HlsUploadCrashed {
128
- roomId: string;
129
- }
130
- declare const ServerMessage_HlsUploadCrashed: MessageFns<ServerMessage_HlsUploadCrashed>;
131
- /** Notification sent when peer updates its metadata */
132
- interface ServerMessage_PeerMetadataUpdated {
133
- roomId: string;
134
- peerId: string;
135
- metadata: string;
136
- }
137
- declare const ServerMessage_PeerMetadataUpdated: MessageFns<ServerMessage_PeerMetadataUpdated>;
138
- /** Describes a media track */
139
- interface ServerMessage_Track {
140
- id: string;
141
- type: ServerMessage_TrackType;
142
- metadata: string;
143
- }
144
- declare const ServerMessage_Track: MessageFns<ServerMessage_Track>;
145
- /** Notification sent when peer or component adds new track */
146
- interface ServerMessage_TrackAdded {
147
- roomId: string;
148
- peerId?: string | undefined;
149
- componentId?: string | undefined;
150
- track: ServerMessage_Track | undefined;
151
- }
152
- declare const ServerMessage_TrackAdded: MessageFns<ServerMessage_TrackAdded>;
153
- /** Notification sent when a track is removed */
154
- interface ServerMessage_TrackRemoved {
155
- roomId: string;
156
- peerId?: string | undefined;
157
- componentId?: string | undefined;
158
- track: ServerMessage_Track | undefined;
159
- }
160
- declare const ServerMessage_TrackRemoved: MessageFns<ServerMessage_TrackRemoved>;
161
- /** Notification sent when metadata of a multimedia track is updated */
162
- interface ServerMessage_TrackMetadataUpdated {
163
- roomId: string;
164
- peerId?: string | undefined;
165
- componentId?: string | undefined;
166
- track: ServerMessage_Track | undefined;
167
- }
168
- declare const ServerMessage_TrackMetadataUpdated: MessageFns<ServerMessage_TrackMetadataUpdated>;
169
- /** Notification sent when streamer successfully connects */
170
- interface ServerMessage_StreamConnected {
171
- streamId: string;
172
- }
173
- declare const ServerMessage_StreamConnected: MessageFns<ServerMessage_StreamConnected>;
174
- /** Notification sent when streamer disconnects */
175
- interface ServerMessage_StreamDisconnected {
176
- streamId: string;
177
- }
178
- declare const ServerMessage_StreamDisconnected: MessageFns<ServerMessage_StreamDisconnected>;
179
- /** Notification sent when viewer successfully connects */
180
- interface ServerMessage_ViewerConnected {
181
- streamId: string;
182
- viewerId: string;
183
- }
184
- declare const ServerMessage_ViewerConnected: MessageFns<ServerMessage_ViewerConnected>;
185
- /** Notification sent when viewer disconnects */
186
- interface ServerMessage_ViewerDisconnected {
187
- streamId: string;
188
- viewerId: string;
189
- }
190
- declare const ServerMessage_ViewerDisconnected: MessageFns<ServerMessage_ViewerDisconnected>;
191
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
192
- type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
193
- [K in keyof T]?: DeepPartial<T[K]>;
194
- } : Partial<T>;
195
- type KeysOfUnion<T> = T extends T ? keyof T : never;
196
- type Exact<P, I extends P> = P extends Builtin ? P : P & {
197
- [K in keyof P]: Exact<P[K], I[K]>;
198
- } & {
199
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
200
- };
201
- interface MessageFns<T> {
202
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
203
- decode(input: BinaryReader | Uint8Array, length?: number): T;
204
- fromJSON(object: any): T;
205
- toJSON(message: T): unknown;
206
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
207
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
208
- }
209
-
210
- export { ServerMessage, ServerMessage_AuthRequest, ServerMessage_EventType };
package/dist/proto.d.ts DELETED
@@ -1,210 +0,0 @@
1
- import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
-
3
- /** Defines message groups for which peer can subscribe */
4
- declare enum ServerMessage_EventType {
5
- EVENT_TYPE_UNSPECIFIED = 0,
6
- EVENT_TYPE_SERVER_NOTIFICATION = 1,
7
- UNRECOGNIZED = -1
8
- }
9
- /** Defines types of tracks being published by peers and component */
10
- declare enum ServerMessage_TrackType {
11
- TRACK_TYPE_UNSPECIFIED = 0,
12
- TRACK_TYPE_VIDEO = 1,
13
- TRACK_TYPE_AUDIO = 2,
14
- UNRECOGNIZED = -1
15
- }
16
- /** Defines any type of message passed between FJ and server peer */
17
- interface ServerMessage {
18
- roomCrashed?: ServerMessage_RoomCrashed | undefined;
19
- peerConnected?: ServerMessage_PeerConnected | undefined;
20
- peerDisconnected?: ServerMessage_PeerDisconnected | undefined;
21
- peerCrashed?: ServerMessage_PeerCrashed | undefined;
22
- componentCrashed?: ServerMessage_ComponentCrashed | undefined;
23
- authenticated?: ServerMessage_Authenticated | undefined;
24
- authRequest?: ServerMessage_AuthRequest | undefined;
25
- subscribeRequest?: ServerMessage_SubscribeRequest | undefined;
26
- subscribeResponse?: ServerMessage_SubscribeResponse | undefined;
27
- roomCreated?: ServerMessage_RoomCreated | undefined;
28
- roomDeleted?: ServerMessage_RoomDeleted | undefined;
29
- hlsPlayable?: ServerMessage_HlsPlayable | undefined;
30
- hlsUploaded?: ServerMessage_HlsUploaded | undefined;
31
- hlsUploadCrashed?: ServerMessage_HlsUploadCrashed | undefined;
32
- peerMetadataUpdated?: ServerMessage_PeerMetadataUpdated | undefined;
33
- trackAdded?: ServerMessage_TrackAdded | undefined;
34
- trackRemoved?: ServerMessage_TrackRemoved | undefined;
35
- trackMetadataUpdated?: ServerMessage_TrackMetadataUpdated | undefined;
36
- peerAdded?: ServerMessage_PeerAdded | undefined;
37
- peerDeleted?: ServerMessage_PeerDeleted | undefined;
38
- streamConnected?: ServerMessage_StreamConnected | undefined;
39
- streamDisconnected?: ServerMessage_StreamDisconnected | undefined;
40
- viewerConnected?: ServerMessage_ViewerConnected | undefined;
41
- viewerDisconnected?: ServerMessage_ViewerDisconnected | undefined;
42
- }
43
- declare const ServerMessage: MessageFns<ServerMessage>;
44
- /** Notification sent when a room crashes */
45
- interface ServerMessage_RoomCrashed {
46
- roomId: string;
47
- }
48
- declare const ServerMessage_RoomCrashed: MessageFns<ServerMessage_RoomCrashed>;
49
- /** Notification sent when a peer is added */
50
- interface ServerMessage_PeerAdded {
51
- roomId: string;
52
- peerId: string;
53
- }
54
- declare const ServerMessage_PeerAdded: MessageFns<ServerMessage_PeerAdded>;
55
- /** Notification sent when a peer is removed */
56
- interface ServerMessage_PeerDeleted {
57
- roomId: string;
58
- peerId: string;
59
- }
60
- declare const ServerMessage_PeerDeleted: MessageFns<ServerMessage_PeerDeleted>;
61
- /** Notification sent when a peer connects */
62
- interface ServerMessage_PeerConnected {
63
- roomId: string;
64
- peerId: string;
65
- }
66
- declare const ServerMessage_PeerConnected: MessageFns<ServerMessage_PeerConnected>;
67
- /** Notification sent when a peer disconnects from FJ */
68
- interface ServerMessage_PeerDisconnected {
69
- roomId: string;
70
- peerId: string;
71
- }
72
- declare const ServerMessage_PeerDisconnected: MessageFns<ServerMessage_PeerDisconnected>;
73
- /** Notification sent when a peer crashes */
74
- interface ServerMessage_PeerCrashed {
75
- roomId: string;
76
- peerId: string;
77
- reason: string;
78
- }
79
- declare const ServerMessage_PeerCrashed: MessageFns<ServerMessage_PeerCrashed>;
80
- /** Notification sent when a component crashes */
81
- interface ServerMessage_ComponentCrashed {
82
- roomId: string;
83
- componentId: string;
84
- }
85
- declare const ServerMessage_ComponentCrashed: MessageFns<ServerMessage_ComponentCrashed>;
86
- /** Response sent by FJ, confirming successfull authentication */
87
- interface ServerMessage_Authenticated {
88
- }
89
- declare const ServerMessage_Authenticated: MessageFns<ServerMessage_Authenticated>;
90
- /** Request sent by peer, to authenticate to FJ server */
91
- interface ServerMessage_AuthRequest {
92
- token: string;
93
- }
94
- declare const ServerMessage_AuthRequest: MessageFns<ServerMessage_AuthRequest>;
95
- /** Request sent by peer to subsribe for certain message type */
96
- interface ServerMessage_SubscribeRequest {
97
- eventType: ServerMessage_EventType;
98
- }
99
- declare const ServerMessage_SubscribeRequest: MessageFns<ServerMessage_SubscribeRequest>;
100
- /** Response sent by FJ, confirming subscription for message type */
101
- interface ServerMessage_SubscribeResponse {
102
- eventType: ServerMessage_EventType;
103
- }
104
- declare const ServerMessage_SubscribeResponse: MessageFns<ServerMessage_SubscribeResponse>;
105
- /** Notification sent when a room is created */
106
- interface ServerMessage_RoomCreated {
107
- roomId: string;
108
- }
109
- declare const ServerMessage_RoomCreated: MessageFns<ServerMessage_RoomCreated>;
110
- /** Notification sent when a room is deleted */
111
- interface ServerMessage_RoomDeleted {
112
- roomId: string;
113
- }
114
- declare const ServerMessage_RoomDeleted: MessageFns<ServerMessage_RoomDeleted>;
115
- /** Notification sent when the HLS stream becomes available in a room */
116
- interface ServerMessage_HlsPlayable {
117
- roomId: string;
118
- componentId: string;
119
- }
120
- declare const ServerMessage_HlsPlayable: MessageFns<ServerMessage_HlsPlayable>;
121
- /** Notification sent when the HLS recording is successfully uploded to AWS S3 */
122
- interface ServerMessage_HlsUploaded {
123
- roomId: string;
124
- }
125
- declare const ServerMessage_HlsUploaded: MessageFns<ServerMessage_HlsUploaded>;
126
- /** Notification sent when the upload of HLS recording to AWS S3 fails */
127
- interface ServerMessage_HlsUploadCrashed {
128
- roomId: string;
129
- }
130
- declare const ServerMessage_HlsUploadCrashed: MessageFns<ServerMessage_HlsUploadCrashed>;
131
- /** Notification sent when peer updates its metadata */
132
- interface ServerMessage_PeerMetadataUpdated {
133
- roomId: string;
134
- peerId: string;
135
- metadata: string;
136
- }
137
- declare const ServerMessage_PeerMetadataUpdated: MessageFns<ServerMessage_PeerMetadataUpdated>;
138
- /** Describes a media track */
139
- interface ServerMessage_Track {
140
- id: string;
141
- type: ServerMessage_TrackType;
142
- metadata: string;
143
- }
144
- declare const ServerMessage_Track: MessageFns<ServerMessage_Track>;
145
- /** Notification sent when peer or component adds new track */
146
- interface ServerMessage_TrackAdded {
147
- roomId: string;
148
- peerId?: string | undefined;
149
- componentId?: string | undefined;
150
- track: ServerMessage_Track | undefined;
151
- }
152
- declare const ServerMessage_TrackAdded: MessageFns<ServerMessage_TrackAdded>;
153
- /** Notification sent when a track is removed */
154
- interface ServerMessage_TrackRemoved {
155
- roomId: string;
156
- peerId?: string | undefined;
157
- componentId?: string | undefined;
158
- track: ServerMessage_Track | undefined;
159
- }
160
- declare const ServerMessage_TrackRemoved: MessageFns<ServerMessage_TrackRemoved>;
161
- /** Notification sent when metadata of a multimedia track is updated */
162
- interface ServerMessage_TrackMetadataUpdated {
163
- roomId: string;
164
- peerId?: string | undefined;
165
- componentId?: string | undefined;
166
- track: ServerMessage_Track | undefined;
167
- }
168
- declare const ServerMessage_TrackMetadataUpdated: MessageFns<ServerMessage_TrackMetadataUpdated>;
169
- /** Notification sent when streamer successfully connects */
170
- interface ServerMessage_StreamConnected {
171
- streamId: string;
172
- }
173
- declare const ServerMessage_StreamConnected: MessageFns<ServerMessage_StreamConnected>;
174
- /** Notification sent when streamer disconnects */
175
- interface ServerMessage_StreamDisconnected {
176
- streamId: string;
177
- }
178
- declare const ServerMessage_StreamDisconnected: MessageFns<ServerMessage_StreamDisconnected>;
179
- /** Notification sent when viewer successfully connects */
180
- interface ServerMessage_ViewerConnected {
181
- streamId: string;
182
- viewerId: string;
183
- }
184
- declare const ServerMessage_ViewerConnected: MessageFns<ServerMessage_ViewerConnected>;
185
- /** Notification sent when viewer disconnects */
186
- interface ServerMessage_ViewerDisconnected {
187
- streamId: string;
188
- viewerId: string;
189
- }
190
- declare const ServerMessage_ViewerDisconnected: MessageFns<ServerMessage_ViewerDisconnected>;
191
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
192
- type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
193
- [K in keyof T]?: DeepPartial<T[K]>;
194
- } : Partial<T>;
195
- type KeysOfUnion<T> = T extends T ? keyof T : never;
196
- type Exact<P, I extends P> = P extends Builtin ? P : P & {
197
- [K in keyof P]: Exact<P[K], I[K]>;
198
- } & {
199
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
200
- };
201
- interface MessageFns<T> {
202
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
203
- decode(input: BinaryReader | Uint8Array, length?: number): T;
204
- fromJSON(object: any): T;
205
- toJSON(message: T): unknown;
206
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
207
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
208
- }
209
-
210
- export { ServerMessage, ServerMessage_AuthRequest, ServerMessage_EventType };