@bytepulse/pulsewave-shared 0.2.3 → 0.2.4
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/package.json +1 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -67
- package/dist/__tests__/types.test.js.map +0 -1
- package/dist/constants/errors.d.ts +0 -4
- package/dist/constants/errors.d.ts.map +0 -1
- package/dist/constants/errors.js +0 -27
- package/dist/constants/errors.js.map +0 -1
- package/dist/constants/events.d.ts +0 -35
- package/dist/constants/events.d.ts.map +0 -1
- package/dist/constants/events.js +0 -38
- package/dist/constants/events.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -10
- package/dist/index.js.map +0 -1
- package/dist/types/data-provider.types.d.ts +0 -34
- package/dist/types/data-provider.types.d.ts.map +0 -1
- package/dist/types/data-provider.types.js +0 -14
- package/dist/types/data-provider.types.js.map +0 -1
- package/dist/types/room.types.d.ts +0 -89
- package/dist/types/room.types.d.ts.map +0 -1
- package/dist/types/room.types.js +0 -47
- package/dist/types/room.types.js.map +0 -1
- package/dist/types/signal.types.d.ts +0 -319
- package/dist/types/signal.types.d.ts.map +0 -1
- package/dist/types/signal.types.js +0 -3
- package/dist/types/signal.types.js.map +0 -1
- package/dist/types/token.types.d.ts +0 -27
- package/dist/types/token.types.d.ts.map +0 -1
- package/dist/types/token.types.js +0 -3
- package/dist/types/token.types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/types.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const pulsewave_shared_1 = require("@bytepulse/pulsewave-shared");
|
|
4
|
-
describe('Shared Types', () => {
|
|
5
|
-
describe('RoomInfo', () => {
|
|
6
|
-
it('should create a valid RoomInfo object', () => {
|
|
7
|
-
const roomInfo = {
|
|
8
|
-
sid: 'RM_123',
|
|
9
|
-
name: 'test-room',
|
|
10
|
-
numParticipants: 0,
|
|
11
|
-
creationTime: Date.now(),
|
|
12
|
-
};
|
|
13
|
-
expect(roomInfo.sid).toBe('RM_123');
|
|
14
|
-
expect(roomInfo.name).toBe('test-room');
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
describe('ParticipantInfo', () => {
|
|
18
|
-
it('should create a valid ParticipantInfo object', () => {
|
|
19
|
-
const participantInfo = {
|
|
20
|
-
sid: 'PA_123',
|
|
21
|
-
identity: 'user-1',
|
|
22
|
-
name: 'Test User',
|
|
23
|
-
state: pulsewave_shared_1.ConnectionState.Connected,
|
|
24
|
-
tracks: [],
|
|
25
|
-
};
|
|
26
|
-
expect(participantInfo.sid).toBe('PA_123');
|
|
27
|
-
expect(participantInfo.identity).toBe('user-1');
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
describe('TrackInfo', () => {
|
|
31
|
-
it('should create a valid TrackInfo object', () => {
|
|
32
|
-
const trackInfo = {
|
|
33
|
-
sid: 'TR_123',
|
|
34
|
-
kind: pulsewave_shared_1.TrackKind.Video,
|
|
35
|
-
source: pulsewave_shared_1.TrackSource.Camera,
|
|
36
|
-
muted: false,
|
|
37
|
-
};
|
|
38
|
-
expect(trackInfo.sid).toBe('TR_123');
|
|
39
|
-
expect(trackInfo.kind).toBe(pulsewave_shared_1.TrackKind.Video);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
describe('ConnectionState', () => {
|
|
43
|
-
it('should have valid connection states', () => {
|
|
44
|
-
const states = [
|
|
45
|
-
pulsewave_shared_1.ConnectionState.Connected,
|
|
46
|
-
pulsewave_shared_1.ConnectionState.Disconnected,
|
|
47
|
-
pulsewave_shared_1.ConnectionState.Reconnecting,
|
|
48
|
-
];
|
|
49
|
-
expect(states).toContain(pulsewave_shared_1.ConnectionState.Connected);
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
describe('TrackKind', () => {
|
|
53
|
-
it('should have valid track kinds', () => {
|
|
54
|
-
const kinds = [pulsewave_shared_1.TrackKind.Audio, pulsewave_shared_1.TrackKind.Video];
|
|
55
|
-
expect(kinds).toContain(pulsewave_shared_1.TrackKind.Audio);
|
|
56
|
-
expect(kinds).toContain(pulsewave_shared_1.TrackKind.Video);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
describe('TrackSource', () => {
|
|
60
|
-
it('should have valid track sources', () => {
|
|
61
|
-
const sources = [pulsewave_shared_1.TrackSource.Camera, pulsewave_shared_1.TrackSource.Microphone, pulsewave_shared_1.TrackSource.ScreenShare];
|
|
62
|
-
expect(sources).toContain(pulsewave_shared_1.TrackSource.Camera);
|
|
63
|
-
expect(sources).toContain(pulsewave_shared_1.TrackSource.Microphone);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
//# sourceMappingURL=types.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.test.js","sourceRoot":"","sources":["../../src/__tests__/types.test.ts"],"names":[],"mappings":";;AAKA,kEAAsF;AAEtF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;YAC/C,MAAM,QAAQ,GAAa;gBACzB,GAAG,EAAE,QAAQ;gBACb,IAAI,EAAE,WAAW;gBACjB,eAAe,EAAE,CAAC;gBAClB,YAAY,EAAE,IAAI,CAAC,GAAG,EAAE;aACzB,CAAC;YAEF,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,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}
|
package/dist/constants/errors.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ERROR_MESSAGES = void 0;
|
|
4
|
-
exports.getErrorMessage = getErrorMessage;
|
|
5
|
-
const room_types_1 = require("../types/room.types");
|
|
6
|
-
exports.ERROR_MESSAGES = {
|
|
7
|
-
[room_types_1.ErrorCode.Unknown]: 'An unknown error occurred',
|
|
8
|
-
[room_types_1.ErrorCode.InvalidRequest]: 'Invalid request',
|
|
9
|
-
[room_types_1.ErrorCode.Unauthorized]: 'Unauthorized access',
|
|
10
|
-
[room_types_1.ErrorCode.NotFound]: 'Resource not found',
|
|
11
|
-
[room_types_1.ErrorCode.RoomNotFound]: 'Room not found',
|
|
12
|
-
[room_types_1.ErrorCode.RoomFull]: 'Room is full',
|
|
13
|
-
[room_types_1.ErrorCode.RoomClosed]: 'Room is closed',
|
|
14
|
-
[room_types_1.ErrorCode.ParticipantNotFound]: 'Participant not found',
|
|
15
|
-
[room_types_1.ErrorCode.ParticipantAlreadyJoined]: 'Participant already joined',
|
|
16
|
-
[room_types_1.ErrorCode.TrackNotFound]: 'Track not found',
|
|
17
|
-
[room_types_1.ErrorCode.TrackPublishError]: 'Failed to publish track',
|
|
18
|
-
[room_types_1.ErrorCode.TrackSubscribeError]: 'Failed to subscribe to track',
|
|
19
|
-
[room_types_1.ErrorCode.TransportError]: 'Transport error',
|
|
20
|
-
[room_types_1.ErrorCode.MediaError]: 'Media error',
|
|
21
|
-
[room_types_1.ErrorCode.DeviceNotFound]: 'Media device not found',
|
|
22
|
-
[room_types_1.ErrorCode.PermissionDenied]: 'Permission denied',
|
|
23
|
-
};
|
|
24
|
-
function getErrorMessage(code) {
|
|
25
|
-
return exports.ERROR_MESSAGES[code] || exports.ERROR_MESSAGES[room_types_1.ErrorCode.Unknown];
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/constants/errors.ts"],"names":[],"mappings":";;;AA4BA,0CAEC;AA1BD,oDAAgD;AAEnC,QAAA,cAAc,GAA8B;IACvD,CAAC,sBAAS,CAAC,OAAO,CAAC,EAAE,2BAA2B;IAChD,CAAC,sBAAS,CAAC,cAAc,CAAC,EAAE,iBAAiB;IAC7C,CAAC,sBAAS,CAAC,YAAY,CAAC,EAAE,qBAAqB;IAC/C,CAAC,sBAAS,CAAC,QAAQ,CAAC,EAAE,oBAAoB;IAC1C,CAAC,sBAAS,CAAC,YAAY,CAAC,EAAE,gBAAgB;IAC1C,CAAC,sBAAS,CAAC,QAAQ,CAAC,EAAE,cAAc;IACpC,CAAC,sBAAS,CAAC,UAAU,CAAC,EAAE,gBAAgB;IACxC,CAAC,sBAAS,CAAC,mBAAmB,CAAC,EAAE,uBAAuB;IACxD,CAAC,sBAAS,CAAC,wBAAwB,CAAC,EAAE,4BAA4B;IAClE,CAAC,sBAAS,CAAC,aAAa,CAAC,EAAE,iBAAiB;IAC5C,CAAC,sBAAS,CAAC,iBAAiB,CAAC,EAAE,yBAAyB;IACxD,CAAC,sBAAS,CAAC,mBAAmB,CAAC,EAAE,8BAA8B;IAC/D,CAAC,sBAAS,CAAC,cAAc,CAAC,EAAE,iBAAiB;IAC7C,CAAC,sBAAS,CAAC,UAAU,CAAC,EAAE,aAAa;IACrC,CAAC,sBAAS,CAAC,cAAc,CAAC,EAAE,wBAAwB;IACpD,CAAC,sBAAS,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;CAClD,CAAC;AAKF,SAAgB,eAAe,CAAC,IAAe;IAC7C,OAAO,sBAAc,CAAC,IAAI,CAAC,IAAI,sBAAc,CAAC,sBAAS,CAAC,OAAO,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const CLIENT_EVENTS: {
|
|
2
|
-
readonly JOIN: "join";
|
|
3
|
-
readonly LEAVE: "leave";
|
|
4
|
-
readonly CREATE_WEBRTC_TRANSPORT: "create_webrtc_transport";
|
|
5
|
-
readonly CONNECT_TRANSPORT: "connect_transport";
|
|
6
|
-
readonly PUBLISH: "publish";
|
|
7
|
-
readonly UNPUBLISH: "unpublish";
|
|
8
|
-
readonly SUBSCRIBE: "subscribe";
|
|
9
|
-
readonly UNSUBSCRIBE: "unsubscribe";
|
|
10
|
-
readonly RESUME_CONSUMER: "resume_consumer";
|
|
11
|
-
readonly MUTE: "mute";
|
|
12
|
-
readonly DATA: "data";
|
|
13
|
-
};
|
|
14
|
-
export declare const SERVER_EVENTS: {
|
|
15
|
-
readonly JOINED: "joined";
|
|
16
|
-
readonly PARTICIPANT_JOINED: "participant_joined";
|
|
17
|
-
readonly PARTICIPANT_LEFT: "participant_left";
|
|
18
|
-
readonly TRACK_PUBLISHED: "track_published";
|
|
19
|
-
readonly TRACK_UNPUBLISHED: "track_unpublished";
|
|
20
|
-
readonly TRACK_SUBSCRIBED: "track_subscribed";
|
|
21
|
-
readonly TRACK_UNSUBSCRIBED: "track_unsubscribed";
|
|
22
|
-
readonly TRACK_MUTED: "track_muted";
|
|
23
|
-
readonly DATA: "data";
|
|
24
|
-
readonly ERROR: "error";
|
|
25
|
-
};
|
|
26
|
-
export declare const ROOM_EVENTS: {
|
|
27
|
-
readonly PARTICIPANT_CONNECTED: "participant:connected";
|
|
28
|
-
readonly PARTICIPANT_DISCONNECTED: "participant:disconnected";
|
|
29
|
-
readonly TRACK_ADDED: "track:added";
|
|
30
|
-
readonly TRACK_REMOVED: "track:removed";
|
|
31
|
-
readonly TRACK_MUTED: "track:muted";
|
|
32
|
-
readonly TRACK_UNMUTED: "track:unmuted";
|
|
33
|
-
readonly ROOM_CLOSED: "room:closed";
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/constants/events.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;;;;;;;CAYhB,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;;;;;;;CAWhB,CAAC;AAGX,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC"}
|
package/dist/constants/events.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROOM_EVENTS = exports.SERVER_EVENTS = exports.CLIENT_EVENTS = void 0;
|
|
4
|
-
exports.CLIENT_EVENTS = {
|
|
5
|
-
JOIN: 'join',
|
|
6
|
-
LEAVE: 'leave',
|
|
7
|
-
CREATE_WEBRTC_TRANSPORT: 'create_webrtc_transport',
|
|
8
|
-
CONNECT_TRANSPORT: 'connect_transport',
|
|
9
|
-
PUBLISH: 'publish',
|
|
10
|
-
UNPUBLISH: 'unpublish',
|
|
11
|
-
SUBSCRIBE: 'subscribe',
|
|
12
|
-
UNSUBSCRIBE: 'unsubscribe',
|
|
13
|
-
RESUME_CONSUMER: 'resume_consumer',
|
|
14
|
-
MUTE: 'mute',
|
|
15
|
-
DATA: 'data',
|
|
16
|
-
};
|
|
17
|
-
exports.SERVER_EVENTS = {
|
|
18
|
-
JOINED: 'joined',
|
|
19
|
-
PARTICIPANT_JOINED: 'participant_joined',
|
|
20
|
-
PARTICIPANT_LEFT: 'participant_left',
|
|
21
|
-
TRACK_PUBLISHED: 'track_published',
|
|
22
|
-
TRACK_UNPUBLISHED: 'track_unpublished',
|
|
23
|
-
TRACK_SUBSCRIBED: 'track_subscribed',
|
|
24
|
-
TRACK_UNSUBSCRIBED: 'track_unsubscribed',
|
|
25
|
-
TRACK_MUTED: 'track_muted',
|
|
26
|
-
DATA: 'data',
|
|
27
|
-
ERROR: 'error',
|
|
28
|
-
};
|
|
29
|
-
exports.ROOM_EVENTS = {
|
|
30
|
-
PARTICIPANT_CONNECTED: 'participant:connected',
|
|
31
|
-
PARTICIPANT_DISCONNECTED: 'participant:disconnected',
|
|
32
|
-
TRACK_ADDED: 'track:added',
|
|
33
|
-
TRACK_REMOVED: 'track:removed',
|
|
34
|
-
TRACK_MUTED: 'track:muted',
|
|
35
|
-
TRACK_UNMUTED: 'track:unmuted',
|
|
36
|
-
ROOM_CLOSED: 'room:closed',
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=events.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/constants/events.ts"],"names":[],"mappings":";;;AAKa,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,uBAAuB,EAAE,yBAAyB;IAClD,iBAAiB,EAAE,mBAAmB;IACtC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAGE,QAAA,aAAa,GAAG;IAC3B,MAAM,EAAE,QAAQ;IAChB,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,oBAAoB;IACxC,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAGE,QAAA,WAAW,GAAG;IACzB,qBAAqB,EAAE,uBAAuB;IAC9C,wBAAwB,EAAE,0BAA0B;IACpD,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;CAClB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './types/room.types';
|
|
2
|
-
export * from './types/signal.types';
|
|
3
|
-
export * from './types/token.types';
|
|
4
|
-
export * from './types/data-provider.types';
|
|
5
|
-
export * from './constants/events';
|
|
6
|
-
export * from './constants/errors';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAG5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./types/room.types"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./types/signal.types"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./types/token.types"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./types/data-provider.types"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./constants/events"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./constants/errors"), exports);
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAOA,6DAAmC;AACnC,+DAAqC;AACrC,8DAAoC;AACpC,sEAA4C;AAG5C,6DAAmC;AACnC,6DAAmC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { DataPacket } from './room.types';
|
|
2
|
-
export declare enum DataProviderType {
|
|
3
|
-
WebSocket = "websocket",
|
|
4
|
-
WebRTC = "webrtc"
|
|
5
|
-
}
|
|
6
|
-
export declare enum DataChannelKind {
|
|
7
|
-
Reliable = "reliable",
|
|
8
|
-
Lossy = "lossy"
|
|
9
|
-
}
|
|
10
|
-
export interface DataProviderConfig {
|
|
11
|
-
type: DataProviderType;
|
|
12
|
-
maxMessageSize?: number;
|
|
13
|
-
ordered?: boolean;
|
|
14
|
-
maxPacketLifeTime?: number;
|
|
15
|
-
maxRetransmits?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface DataProviderEvents {
|
|
18
|
-
'data-received': (packet: DataPacket, participantSid: string) => void;
|
|
19
|
-
connected: () => void;
|
|
20
|
-
disconnected: () => void;
|
|
21
|
-
error: (error: Error) => void;
|
|
22
|
-
}
|
|
23
|
-
export interface DataProvider {
|
|
24
|
-
readonly type: DataProviderType;
|
|
25
|
-
readonly config: DataProviderConfig;
|
|
26
|
-
initialize(): Promise<void>;
|
|
27
|
-
send(data: unknown, kind: DataChannelKind): Promise<void>;
|
|
28
|
-
close(): Promise<void>;
|
|
29
|
-
isReady(): boolean;
|
|
30
|
-
on<K extends keyof DataProviderEvents>(event: K, listener: DataProviderEvents[K]): void;
|
|
31
|
-
off<K extends keyof DataProviderEvents>(event: K, listener: DataProviderEvents[K]): void;
|
|
32
|
-
removeAllListeners(): void;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=data-provider.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-provider.types.d.ts","sourceRoot":"","sources":["../../src/types/data-provider.types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK/C,oBAAY,gBAAgB;IAE1B,SAAS,cAAc;IAEvB,MAAM,WAAW;CAClB;AAKD,oBAAY,eAAe;IAEzB,QAAQ,aAAa;IAErB,KAAK,UAAU;CAChB;AAKD,MAAM,WAAW,kBAAkB;IAEjC,IAAI,EAAE,gBA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|
5
|
-
(function (DataProviderType) {
|
|
6
|
-
DataProviderType["WebSocket"] = "websocket";
|
|
7
|
-
DataProviderType["WebRTC"] = "webrtc";
|
|
8
|
-
})(DataProviderType || (exports.DataProviderType = DataProviderType = {}));
|
|
9
|
-
var DataChannelKind;
|
|
10
|
-
(function (DataChannelKind) {
|
|
11
|
-
DataChannelKind["Reliable"] = "reliable";
|
|
12
|
-
DataChannelKind["Lossy"] = "lossy";
|
|
13
|
-
})(DataChannelKind || (exports.DataChannelKind = DataChannelKind = {}));
|
|
14
|
-
//# sourceMappingURL=data-provider.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-provider.types.js","sourceRoot":"","sources":["../../src/types/data-provider.types.ts"],"names":[],"mappings":";;;AASA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAE1B,2CAAuB,CAAA;IAEvB,qCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAKD,IAAY,eAKX;AALD,WAAY,eAAe;IAEzB,wCAAqB,CAAA;IAErB,kCAAe,CAAA;AACjB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export declare enum ConnectionState {
|
|
2
|
-
Connected = "connected",
|
|
3
|
-
Disconnected = "disconnected",
|
|
4
|
-
Reconnecting = "reconnecting"
|
|
5
|
-
}
|
|
6
|
-
export interface RoomInfo {
|
|
7
|
-
sid: string;
|
|
8
|
-
name: string;
|
|
9
|
-
numParticipants: number;
|
|
10
|
-
maxParticipants?: number;
|
|
11
|
-
creationTime: number;
|
|
12
|
-
metadata?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface RoomState {
|
|
15
|
-
sid: string;
|
|
16
|
-
name: string;
|
|
17
|
-
participants: Map<string, ParticipantInfo>;
|
|
18
|
-
active: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ParticipantInfo {
|
|
21
|
-
sid: string;
|
|
22
|
-
identity: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
state: ConnectionState;
|
|
25
|
-
metadata?: Record<string, unknown>;
|
|
26
|
-
tracks: TrackInfo[];
|
|
27
|
-
permission?: ParticipantPermission;
|
|
28
|
-
}
|
|
29
|
-
export interface ParticipantPermission {
|
|
30
|
-
canPublish: boolean;
|
|
31
|
-
canSubscribe: boolean;
|
|
32
|
-
canPublishData: boolean;
|
|
33
|
-
hidden?: boolean;
|
|
34
|
-
recorder?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export interface TrackInfo {
|
|
37
|
-
sid: string;
|
|
38
|
-
kind: TrackKind;
|
|
39
|
-
source: TrackSource;
|
|
40
|
-
muted: boolean;
|
|
41
|
-
width?: number;
|
|
42
|
-
height?: number;
|
|
43
|
-
simulcast?: boolean;
|
|
44
|
-
}
|
|
45
|
-
export declare enum TrackKind {
|
|
46
|
-
Audio = "audio",
|
|
47
|
-
Video = "video"
|
|
48
|
-
}
|
|
49
|
-
export declare enum TrackSource {
|
|
50
|
-
Camera = "camera",
|
|
51
|
-
Microphone = "microphone",
|
|
52
|
-
ScreenShare = "screen_share",
|
|
53
|
-
ScreenShareAudio = "screen_share_audio",
|
|
54
|
-
Unknown = "unknown"
|
|
55
|
-
}
|
|
56
|
-
export declare enum DataPacketKind {
|
|
57
|
-
Reliable = "reliable",
|
|
58
|
-
Lossy = "lossy"
|
|
59
|
-
}
|
|
60
|
-
export interface DataPacket {
|
|
61
|
-
kind: DataPacketKind;
|
|
62
|
-
value: unknown;
|
|
63
|
-
participantSid?: string;
|
|
64
|
-
timestamp: number;
|
|
65
|
-
}
|
|
66
|
-
export declare enum ErrorCode {
|
|
67
|
-
Unknown = 0,
|
|
68
|
-
InvalidRequest = 1,
|
|
69
|
-
Unauthorized = 2,
|
|
70
|
-
NotFound = 3,
|
|
71
|
-
RoomNotFound = 100,
|
|
72
|
-
RoomFull = 101,
|
|
73
|
-
RoomClosed = 102,
|
|
74
|
-
ParticipantNotFound = 200,
|
|
75
|
-
ParticipantAlreadyJoined = 201,
|
|
76
|
-
TrackNotFound = 300,
|
|
77
|
-
TrackPublishError = 301,
|
|
78
|
-
TrackSubscribeError = 302,
|
|
79
|
-
TransportError = 400,
|
|
80
|
-
MediaError = 500,
|
|
81
|
-
DeviceNotFound = 501,
|
|
82
|
-
PermissionDenied = 502
|
|
83
|
-
}
|
|
84
|
-
export interface ErrorInfo {
|
|
85
|
-
code: ErrorCode;
|
|
86
|
-
message: string;
|
|
87
|
-
details?: Record<string, unknown>;
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=room.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"room.types.d.ts","sourceRoot":"","sources":["../../src/types/room.types.ts"],"names":[],"mappings":"AAOA,oBAAY,eAAe;IACzB,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;CAC9B;AAKD,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAKD,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAKD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;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Ac,MAAM;IACpB,gBAAgB,MAAM;CACvB;AAKD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
|
package/dist/types/room.types.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ErrorCode = exports.DataPacketKind = exports.TrackSource = exports.TrackKind = exports.ConnectionState = void 0;
|
|
4
|
-
var ConnectionState;
|
|
5
|
-
(function (ConnectionState) {
|
|
6
|
-
ConnectionState["Connected"] = "connected";
|
|
7
|
-
ConnectionState["Disconnected"] = "disconnected";
|
|
8
|
-
ConnectionState["Reconnecting"] = "reconnecting";
|
|
9
|
-
})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));
|
|
10
|
-
var TrackKind;
|
|
11
|
-
(function (TrackKind) {
|
|
12
|
-
TrackKind["Audio"] = "audio";
|
|
13
|
-
TrackKind["Video"] = "video";
|
|
14
|
-
})(TrackKind || (exports.TrackKind = TrackKind = {}));
|
|
15
|
-
var TrackSource;
|
|
16
|
-
(function (TrackSource) {
|
|
17
|
-
TrackSource["Camera"] = "camera";
|
|
18
|
-
TrackSource["Microphone"] = "microphone";
|
|
19
|
-
TrackSource["ScreenShare"] = "screen_share";
|
|
20
|
-
TrackSource["ScreenShareAudio"] = "screen_share_audio";
|
|
21
|
-
TrackSource["Unknown"] = "unknown";
|
|
22
|
-
})(TrackSource || (exports.TrackSource = TrackSource = {}));
|
|
23
|
-
var DataPacketKind;
|
|
24
|
-
(function (DataPacketKind) {
|
|
25
|
-
DataPacketKind["Reliable"] = "reliable";
|
|
26
|
-
DataPacketKind["Lossy"] = "lossy";
|
|
27
|
-
})(DataPacketKind || (exports.DataPacketKind = DataPacketKind = {}));
|
|
28
|
-
var ErrorCode;
|
|
29
|
-
(function (ErrorCode) {
|
|
30
|
-
ErrorCode[ErrorCode["Unknown"] = 0] = "Unknown";
|
|
31
|
-
ErrorCode[ErrorCode["InvalidRequest"] = 1] = "InvalidRequest";
|
|
32
|
-
ErrorCode[ErrorCode["Unauthorized"] = 2] = "Unauthorized";
|
|
33
|
-
ErrorCode[ErrorCode["NotFound"] = 3] = "NotFound";
|
|
34
|
-
ErrorCode[ErrorCode["RoomNotFound"] = 100] = "RoomNotFound";
|
|
35
|
-
ErrorCode[ErrorCode["RoomFull"] = 101] = "RoomFull";
|
|
36
|
-
ErrorCode[ErrorCode["RoomClosed"] = 102] = "RoomClosed";
|
|
37
|
-
ErrorCode[ErrorCode["ParticipantNotFound"] = 200] = "ParticipantNotFound";
|
|
38
|
-
ErrorCode[ErrorCode["ParticipantAlreadyJoined"] = 201] = "ParticipantAlreadyJoined";
|
|
39
|
-
ErrorCode[ErrorCode["TrackNotFound"] = 300] = "TrackNotFound";
|
|
40
|
-
ErrorCode[ErrorCode["TrackPublishError"] = 301] = "TrackPublishError";
|
|
41
|
-
ErrorCode[ErrorCode["TrackSubscribeError"] = 302] = "TrackSubscribeError";
|
|
42
|
-
ErrorCode[ErrorCode["TransportError"] = 400] = "TransportError";
|
|
43
|
-
ErrorCode[ErrorCode["MediaError"] = 500] = "MediaError";
|
|
44
|
-
ErrorCode[ErrorCode["DeviceNotFound"] = 501] = "DeviceNotFound";
|
|
45
|
-
ErrorCode[ErrorCode["PermissionDenied"] = 502] = "PermissionDenied";
|
|
46
|
-
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
47
|
-
//# sourceMappingURL=room.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"room.types.js","sourceRoot":"","sources":["../../src/types/room.types.ts"],"names":[],"mappings":";;;AAOA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,gDAA6B,CAAA;IAC7B,gDAA6B,CAAA;AAC/B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAgED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;AACjB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAKD,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,2CAA4B,CAAA;IAC5B,sDAAuC,CAAA;IACvC,kCAAmB,CAAA;AACrB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAKD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAeD,IAAY,SAuBX;AAvBD,WAAY,SAAS;IAEnB,+CAAW,CAAA;IACX,6DAAkB,CAAA;IAClB,yDAAgB,CAAA;IAChB,iDAAY,CAAA;IAEZ,2DAAkB,CAAA;IAClB,mDAAc,CAAA;IACd,uDAAgB,CAAA;IAEhB,yEAAyB,CAAA;IACzB,mFAA8B,CAAA;IAE9B,6DAAmB,CAAA;IACnB,qEAAuB,CAAA;IACvB,yEAAyB,CAAA;IAEzB,+DAAoB,CAAA;IAEpB,uDAAgB,CAAA;IAChB,+DAAoB,CAAA;IACpB,mEAAsB,CAAA;AACxB,CAAC,EAvBW,SAAS,yBAAT,SAAS,QAuBpB"}
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import type { RoomInfo, ParticipantInfo, TrackInfo, ErrorInfo, TrackKind } from './room.types';
|
|
2
|
-
export interface JoinMessage {
|
|
3
|
-
type: 'join';
|
|
4
|
-
room: string;
|
|
5
|
-
token: string;
|
|
6
|
-
metadata?: Record<string, unknown>;
|
|
7
|
-
}
|
|
8
|
-
export interface LeaveMessage {
|
|
9
|
-
type: 'leave';
|
|
10
|
-
}
|
|
11
|
-
export interface CreateTransportMessage {
|
|
12
|
-
type: 'create_transport';
|
|
13
|
-
direction: 'send' | 'recv';
|
|
14
|
-
rtpCapabilities: RtpCapabilities;
|
|
15
|
-
}
|
|
16
|
-
export interface ConnectTransportMessage {
|
|
17
|
-
type: 'connect_transport';
|
|
18
|
-
transportId: string;
|
|
19
|
-
dtlsParameters: DtlsParameters;
|
|
20
|
-
}
|
|
21
|
-
export interface PublishMessage {
|
|
22
|
-
type: 'publish';
|
|
23
|
-
transportId: string;
|
|
24
|
-
kind: TrackKind;
|
|
25
|
-
rtpParameters: RtpParameters;
|
|
26
|
-
appData?: Record<string, unknown>;
|
|
27
|
-
}
|
|
28
|
-
export interface UnpublishMessage {
|
|
29
|
-
type: 'unpublish';
|
|
30
|
-
producerId: string;
|
|
31
|
-
trackSid: string;
|
|
32
|
-
}
|
|
33
|
-
export interface SubscribeMessage {
|
|
34
|
-
type: 'subscribe';
|
|
35
|
-
transportId: string;
|
|
36
|
-
producerId: string;
|
|
37
|
-
rtpCapabilities: RtpCapabilities;
|
|
38
|
-
}
|
|
39
|
-
export interface UnsubscribeMessage {
|
|
40
|
-
type: 'unsubscribe';
|
|
41
|
-
consumerId: string;
|
|
42
|
-
}
|
|
43
|
-
export interface ResumeConsumerMessage {
|
|
44
|
-
type: 'resume_consumer';
|
|
45
|
-
consumerId: string;
|
|
46
|
-
}
|
|
47
|
-
export interface MuteMessage {
|
|
48
|
-
type: 'mute';
|
|
49
|
-
trackSid: string;
|
|
50
|
-
muted: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface DataMessage {
|
|
53
|
-
type: 'data';
|
|
54
|
-
payload: unknown;
|
|
55
|
-
kind?: 'reliable' | 'lossy';
|
|
56
|
-
}
|
|
57
|
-
export interface CreateWebRtcTransportMessage {
|
|
58
|
-
type: 'create_webrtc_transport';
|
|
59
|
-
direction: 'send' | 'recv';
|
|
60
|
-
}
|
|
61
|
-
export interface CreateDataProducerMessage {
|
|
62
|
-
type: 'create_data_producer';
|
|
63
|
-
transportId: string;
|
|
64
|
-
label: string;
|
|
65
|
-
protocol?: string;
|
|
66
|
-
ordered?: boolean;
|
|
67
|
-
maxPacketLifeTime?: number;
|
|
68
|
-
maxRetransmits?: number;
|
|
69
|
-
sctpStreamParameters?: SctpStreamParameters;
|
|
70
|
-
}
|
|
71
|
-
export interface CloseDataProducerMessage {
|
|
72
|
-
type: 'close_data_producer';
|
|
73
|
-
dataProducerId: string;
|
|
74
|
-
}
|
|
75
|
-
export interface DataProducerCreatedMessage {
|
|
76
|
-
type: 'data_producer_created';
|
|
77
|
-
id: string;
|
|
78
|
-
}
|
|
79
|
-
export interface DataProducerClosedMessage {
|
|
80
|
-
type: 'data_producer_closed';
|
|
81
|
-
dataProducerId: string;
|
|
82
|
-
}
|
|
83
|
-
export interface DataConsumerCreatedMessage {
|
|
84
|
-
type: 'data_consumer_created';
|
|
85
|
-
id: string;
|
|
86
|
-
dataProducerId: string;
|
|
87
|
-
participantSid: string;
|
|
88
|
-
label: string;
|
|
89
|
-
protocol?: string;
|
|
90
|
-
ordered?: boolean;
|
|
91
|
-
sctpStreamParameters: SctpStreamParameters;
|
|
92
|
-
}
|
|
93
|
-
export interface SctpStreamParameters {
|
|
94
|
-
streamId: number;
|
|
95
|
-
ordered?: boolean;
|
|
96
|
-
maxPacketLifeTime?: number;
|
|
97
|
-
maxRetransmits?: number;
|
|
98
|
-
label?: string;
|
|
99
|
-
protocol?: string;
|
|
100
|
-
}
|
|
101
|
-
export interface SctpCapabilities {
|
|
102
|
-
numStreams: {
|
|
103
|
-
OS: number;
|
|
104
|
-
MIS: number;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
export interface DataConsumerClosedMessage {
|
|
108
|
-
type: 'data_consumer_closed';
|
|
109
|
-
dataConsumerId: string;
|
|
110
|
-
}
|
|
111
|
-
export interface ConnectWebRtcTransportMessage {
|
|
112
|
-
type: 'connect_webrtc_transport';
|
|
113
|
-
transportId: string;
|
|
114
|
-
dtlsParameters: DtlsParameters;
|
|
115
|
-
}
|
|
116
|
-
export interface TrackPublishedMessage {
|
|
117
|
-
type: 'track_published';
|
|
118
|
-
participantSid: string;
|
|
119
|
-
track: TrackInfo;
|
|
120
|
-
}
|
|
121
|
-
export interface TrackUnpublishedMessage {
|
|
122
|
-
type: 'track_unpublished';
|
|
123
|
-
participantSid: string;
|
|
124
|
-
trackSid: string;
|
|
125
|
-
}
|
|
126
|
-
export interface TrackSubscribedMessage {
|
|
127
|
-
type: 'track_subscribed';
|
|
128
|
-
id: string;
|
|
129
|
-
producerId: string;
|
|
130
|
-
kind: string;
|
|
131
|
-
rtpParameters: RtpParameters;
|
|
132
|
-
trackSid: string;
|
|
133
|
-
}
|
|
134
|
-
export interface TrackUnsubscribedMessage {
|
|
135
|
-
type: 'track_unsubscribed';
|
|
136
|
-
trackSid: string;
|
|
137
|
-
}
|
|
138
|
-
export interface TrackMutedMessage {
|
|
139
|
-
type: 'track_muted';
|
|
140
|
-
participantSid: string;
|
|
141
|
-
trackSid: string;
|
|
142
|
-
muted: boolean;
|
|
143
|
-
}
|
|
144
|
-
export interface TrackUnmutedMessage {
|
|
145
|
-
type: 'track_unmuted';
|
|
146
|
-
participantSid: string;
|
|
147
|
-
trackSid: string;
|
|
148
|
-
muted: boolean;
|
|
149
|
-
}
|
|
150
|
-
export type ClientMessage = JoinMessage | LeaveMessage | CreateTransportMessage | ConnectTransportMessage | PublishMessage | UnpublishMessage | SubscribeMessage | UnsubscribeMessage | ResumeConsumerMessage | MuteMessage | DataMessage | CreateDataProducerMessage | CloseDataProducerMessage;
|
|
151
|
-
export interface JoinedMessage {
|
|
152
|
-
type: 'joined';
|
|
153
|
-
room: RoomInfo;
|
|
154
|
-
participant: ParticipantInfo;
|
|
155
|
-
otherParticipants: ParticipantInfo[];
|
|
156
|
-
rtpCapabilities?: RtpCapabilities;
|
|
157
|
-
}
|
|
158
|
-
export interface ParticipantJoinedMessage {
|
|
159
|
-
type: 'participant_joined';
|
|
160
|
-
participant: ParticipantInfo;
|
|
161
|
-
}
|
|
162
|
-
export interface ParticipantLeftMessage {
|
|
163
|
-
type: 'participant_left';
|
|
164
|
-
participantSid: string;
|
|
165
|
-
}
|
|
166
|
-
export interface SctpParameters {
|
|
167
|
-
port: number;
|
|
168
|
-
OS: number;
|
|
169
|
-
MIS: number;
|
|
170
|
-
maxMessageSize: number;
|
|
171
|
-
}
|
|
172
|
-
export interface TransportCreatedMessage {
|
|
173
|
-
type: 'transport_created';
|
|
174
|
-
id: string;
|
|
175
|
-
iceParameters: IceParameters;
|
|
176
|
-
iceCandidates: IceCandidate[];
|
|
177
|
-
dtlsParameters: DtlsParameters;
|
|
178
|
-
sctpParameters?: SctpParameters;
|
|
179
|
-
direction: 'send' | 'recv';
|
|
180
|
-
}
|
|
181
|
-
export interface TransportConnectedMessage {
|
|
182
|
-
type: 'transport_connected';
|
|
183
|
-
transportId: string;
|
|
184
|
-
}
|
|
185
|
-
export interface TrackPublishedMessage {
|
|
186
|
-
type: 'track_published';
|
|
187
|
-
participantSid: string;
|
|
188
|
-
track: TrackInfo;
|
|
189
|
-
}
|
|
190
|
-
export interface TrackPublishResponse {
|
|
191
|
-
type: 'track_published';
|
|
192
|
-
id: string;
|
|
193
|
-
trackSid: string;
|
|
194
|
-
}
|
|
195
|
-
export interface TrackUnpublishedMessage {
|
|
196
|
-
type: 'track_unpublished';
|
|
197
|
-
participantSid: string;
|
|
198
|
-
trackSid: string;
|
|
199
|
-
}
|
|
200
|
-
export interface TrackSubscribedMessage {
|
|
201
|
-
type: 'track_subscribed';
|
|
202
|
-
id: string;
|
|
203
|
-
producerId: string;
|
|
204
|
-
kind: string;
|
|
205
|
-
rtpParameters: RtpParameters;
|
|
206
|
-
trackSid: string;
|
|
207
|
-
}
|
|
208
|
-
export interface TrackUnsubscribedMessage {
|
|
209
|
-
type: 'track_unsubscribed';
|
|
210
|
-
trackSid: string;
|
|
211
|
-
}
|
|
212
|
-
export interface TrackMutedMessage {
|
|
213
|
-
type: 'track_muted';
|
|
214
|
-
participantSid: string;
|
|
215
|
-
trackSid: string;
|
|
216
|
-
muted: boolean;
|
|
217
|
-
}
|
|
218
|
-
export interface TrackUnmutedMessage {
|
|
219
|
-
type: 'track_unmuted';
|
|
220
|
-
participantSid: string;
|
|
221
|
-
trackSid: string;
|
|
222
|
-
muted: boolean;
|
|
223
|
-
}
|
|
224
|
-
export interface DataReceivedMessage {
|
|
225
|
-
type: 'data';
|
|
226
|
-
participantSid: string;
|
|
227
|
-
payload: unknown;
|
|
228
|
-
kind?: 'reliable' | 'lossy';
|
|
229
|
-
}
|
|
230
|
-
export interface ErrorMessage {
|
|
231
|
-
type: 'error';
|
|
232
|
-
error: ErrorInfo;
|
|
233
|
-
}
|
|
234
|
-
export type ServerMessage = JoinedMessage | TransportCreatedMessage | TransportConnectedMessage | ParticipantJoinedMessage | ParticipantLeftMessage | TrackPublishedMessage | TrackPublishResponse | TrackUnpublishedMessage | TrackSubscribedMessage | TrackUnsubscribedMessage | TrackMutedMessage | TrackUnmutedMessage | DataReceivedMessage | DataProducerCreatedMessage | DataProducerClosedMessage | DataConsumerCreatedMessage | DataConsumerClosedMessage | ErrorMessage;
|
|
235
|
-
export interface RtpParameters {
|
|
236
|
-
codecs?: RtpCodecParameters[];
|
|
237
|
-
headerExtensions?: RtpHeaderExtensionParameters[];
|
|
238
|
-
encodings?: RtpEncodingParameters[];
|
|
239
|
-
rtcp?: RtcpParameters;
|
|
240
|
-
}
|
|
241
|
-
export interface RtpCodecParameters {
|
|
242
|
-
mimeType: string;
|
|
243
|
-
clockRate: number;
|
|
244
|
-
channels?: number;
|
|
245
|
-
parameters?: Record<string, unknown>;
|
|
246
|
-
}
|
|
247
|
-
export interface RtpHeaderExtensionParameters {
|
|
248
|
-
uri: string;
|
|
249
|
-
id: number;
|
|
250
|
-
encrypt?: boolean;
|
|
251
|
-
parameters?: Record<string, unknown>;
|
|
252
|
-
}
|
|
253
|
-
export interface RtpEncodingParameters {
|
|
254
|
-
ssrc?: number;
|
|
255
|
-
rid?: string;
|
|
256
|
-
codecPayloadType?: number;
|
|
257
|
-
rtx?: {
|
|
258
|
-
ssrc: number;
|
|
259
|
-
};
|
|
260
|
-
dtx?: boolean;
|
|
261
|
-
scalabilityMode?: string;
|
|
262
|
-
scaleResolutionDownBy?: number;
|
|
263
|
-
maxBitrate?: number;
|
|
264
|
-
maxFramerate?: number;
|
|
265
|
-
adaptivePtime?: boolean;
|
|
266
|
-
priority?: 'very-low' | 'low' | 'medium' | 'high';
|
|
267
|
-
networkPriority?: 'very-low' | 'low' | 'medium' | 'high';
|
|
268
|
-
}
|
|
269
|
-
export interface RtcpParameters {
|
|
270
|
-
cname?: string;
|
|
271
|
-
reducedSize?: boolean;
|
|
272
|
-
mux?: boolean;
|
|
273
|
-
}
|
|
274
|
-
export interface RtpCapabilities {
|
|
275
|
-
codecs: RtpCodecCapability[];
|
|
276
|
-
headerExtensions: RtpHeaderExtension[];
|
|
277
|
-
}
|
|
278
|
-
export interface RtpCodecCapability {
|
|
279
|
-
mimeType: string;
|
|
280
|
-
kind?: string;
|
|
281
|
-
preferredPayloadType?: number;
|
|
282
|
-
clockRate: number;
|
|
283
|
-
channels?: number;
|
|
284
|
-
parameters?: Record<string, unknown>;
|
|
285
|
-
rtcpFeedback?: RtcpFeedback[];
|
|
286
|
-
}
|
|
287
|
-
export interface RtpHeaderExtension {
|
|
288
|
-
uri: string;
|
|
289
|
-
preferredId: number;
|
|
290
|
-
preferredEncrypt?: boolean;
|
|
291
|
-
direction?: 'sendrecv' | 'send' | 'recv' | 'sendonly' | 'recvonly' | 'inactive';
|
|
292
|
-
}
|
|
293
|
-
export interface RtcpFeedback {
|
|
294
|
-
type: string;
|
|
295
|
-
parameter?: string;
|
|
296
|
-
}
|
|
297
|
-
export interface IceParameters {
|
|
298
|
-
usernameFragment: string;
|
|
299
|
-
password: string;
|
|
300
|
-
iceLite?: boolean;
|
|
301
|
-
}
|
|
302
|
-
export interface IceCandidate {
|
|
303
|
-
foundation: string;
|
|
304
|
-
priority: number;
|
|
305
|
-
ip: string;
|
|
306
|
-
protocol: 'udp' | 'tcp';
|
|
307
|
-
port: number;
|
|
308
|
-
type: 'host';
|
|
309
|
-
tcpType?: 'passive';
|
|
310
|
-
}
|
|
311
|
-
export interface DtlsParameters {
|
|
312
|
-
role?: 'auto' | 'client' | 'server';
|
|
313
|
-
fingerprints: DtlsFingerprint[];
|
|
314
|
-
}
|
|
315
|
-
export interface DtlsFingerprint {
|
|
316
|
-
algorithm: string;
|
|
317
|
-
value: string;
|
|
318
|
-
}
|
|
319
|
-
//# sourceMappingURL=signal.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signal.types.d.ts","sourceRoot":"","sources":["../../src/types/signal.types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAS/F,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAKD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;CACf;AAKD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,eAAe,EAAE,eAAe,CAAC;CAClC;AAKD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,cAAc,CAAC;CAChC;AAKD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,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"","sources":["../../src/types/signal.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface VideoGrants {
|
|
2
|
-
room?: string;
|
|
3
|
-
roomJoin?: boolean;
|
|
4
|
-
canPublish?: boolean;
|
|
5
|
-
canSubscribe?: boolean;
|
|
6
|
-
canPublishData?: boolean;
|
|
7
|
-
hidden?: boolean;
|
|
8
|
-
recorder?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface AccessTokenClaims {
|
|
11
|
-
identity: string;
|
|
12
|
-
name?: string;
|
|
13
|
-
metadata?: Record<string, unknown>;
|
|
14
|
-
video?: VideoGrants;
|
|
15
|
-
iat?: number;
|
|
16
|
-
nbf?: number;
|
|
17
|
-
exp?: number;
|
|
18
|
-
iss?: string;
|
|
19
|
-
sub?: string;
|
|
20
|
-
jti?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface TokenValidationResult {
|
|
23
|
-
valid: boolean;
|
|
24
|
-
claims?: AccessTokenClaims;
|
|
25
|
-
error?: string;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=token.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.types.d.ts","sourceRoot":"","sources":["../../src/types/token.types.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAKD,MAAM,WAAW,iBAAiB;IAEhC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAGnC,KAAK,CAAC,EAAE,WAAW,CAAC;IAGpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAKD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.types.js","sourceRoot":"","sources":["../../src/types/token.types.ts"],"names":[],"mappings":""}
|