getting main flow of everything but don't know if it works

This commit is contained in:
talksik
2022-05-07 17:45:26 -05:00
parent 3c68128469
commit b16778fa8d
4 changed files with 219 additions and 52 deletions
+31
View File
@@ -41,6 +41,9 @@ export enum ServerRequestChannels {
BROADCAST_TO_LINE = "BROADCAST_TO_LINE",
STOP_BROADCAST_TO_LINE = "STOP_BROADCAST_TO_LINE",
RTC_CALL_REQUEST = "RTC_CALL_PREFIX",
RTC_ANSWER_REQUEST = "RTC_ANSWER_REQUEST_PREFIX",
}
export enum ServerResponseChannels {
@@ -52,6 +55,10 @@ export enum ServerResponseChannels {
SOMEONE_STARTED_BROADCASTING = "SOMEONE_STARTED_BROADCASTING", //show their stream tracks
SOMEONE_STOPPED_BROADCASTING = "SOMEONE_STOPPED_BROADCASTING", // stop showing their stream tracks
// sending to the correct room of tunedin folks AND also making sure it's the right event handler in the right handler for this component
RTC_NEW_USER_JOINED_RESPONSE_PREFIX = "RTC_NEW_USER_JOINED_RESPONSE_PREFIX",
RTC_RECEIVING_ANSWER_RESPONSE_PREFIX = "RTC_RECEIVING_ANSWER_RESPONSE_PREFIX",
}
export default SocketChannels;
@@ -107,3 +114,27 @@ export class UserStoppedBroadcastingResponse {
export class SocketEmitter<T> {
constructor(public channel: SocketChannels, data: T) {}
}
export class RtcCallRequest {
constructor(
public lineId: string,
public userIdToCall: string,
public simplePeerSignal: any
) {}
}
export class RtcNewUserResponse {
constructor(public newUserId: string, public simplePeerSignal: any) {}
}
export class RtcAnswerRequest {
constructor(
public lineId: string,
public userIdToCall: string,
public simplePeerSignal: any
) {}
}
export class RtcReceiveAnswerResponse {
constructor(public answererUserId: string, public simplePeerSignal: any) {}
}