diff --git a/src/webrtc/Server.ts b/src/webrtc/Server.ts
index 0ba2e41b..2e1b98d5 100644
--- a/src/webrtc/Server.ts
+++ b/src/webrtc/Server.ts
@@ -29,15 +29,7 @@ export class Server {
public server: http.Server;
public production: boolean;
- constructor({
- port,
- server,
- production,
- }: {
- port: number;
- server?: http.Server;
- production?: boolean;
- }) {
+ constructor({ port, server, production }: { port: number; server?: http.Server; production?: boolean }) {
this.port = port;
this.production = production || false;
diff --git a/src/webrtc/events/Connection.ts b/src/webrtc/events/Connection.ts
index 6c5bab03..799e092e 100644
--- a/src/webrtc/events/Connection.ts
+++ b/src/webrtc/events/Connection.ts
@@ -28,11 +28,7 @@ import { onMessage } from "./Message";
// TODO: specify rate limit in config
// TODO: check msg max size
-export async function Connection(
- this: WS.Server,
- socket: WebSocket,
- request: IncomingMessage,
-) {
+export async function Connection(this: WS.Server, socket: WebSocket, request: IncomingMessage) {
try {
socket.on("close", onClose.bind(socket));
socket.on("message", onMessage.bind(socket));
@@ -57,8 +53,7 @@ export async function Connection(
socket.encoding = "json";
socket.version = Number(searchParams.get("v")) || 5;
- if (socket.version < 3)
- return socket.close(CLOSECODES.Unknown_error, "invalid version");
+ if (socket.version < 3) return socket.close(CLOSECODES.Unknown_error, "invalid version");
setHeartbeat(socket);
diff --git a/src/webrtc/events/Message.ts b/src/webrtc/events/Message.ts
index 22189e95..5145d640 100644
--- a/src/webrtc/events/Message.ts
+++ b/src/webrtc/events/Message.ts
@@ -31,8 +31,7 @@ const PayloadSchema = {
export async function onMessage(this: WebSocket, buffer: Buffer) {
try {
var data: Payload = JSON.parse(buffer.toString());
- if (data.op !== VoiceOPCodes.IDENTIFY && !this.user_id)
- return this.close(CLOSECODES.Not_authenticated);
+ if (data.op !== VoiceOPCodes.IDENTIFY && !this.user_id) return this.close(CLOSECODES.Not_authenticated);
// @ts-ignore
const OPCodeHandler = OPCodeHandlers[data.op];
@@ -44,11 +43,7 @@ export async function onMessage(this: WebSocket, buffer: Buffer) {
return;
}
- if (
- ![VoiceOPCodes.HEARTBEAT, VoiceOPCodes.SPEAKING].includes(
- data.op as VoiceOPCodes,
- )
- ) {
+ if (![VoiceOPCodes.HEARTBEAT, VoiceOPCodes.SPEAKING].includes(data.op as VoiceOPCodes)) {
// @ts-ignore
console.log("[WebRTC] Opcode " + VoiceOPCodes[data.op]);
}
diff --git a/src/webrtc/opcodes/Heartbeat.ts b/src/webrtc/opcodes/Heartbeat.ts
index 3d8e187b..9914568d 100644
--- a/src/webrtc/opcodes/Heartbeat.ts
+++ b/src/webrtc/opcodes/Heartbeat.ts
@@ -16,13 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {
- CLOSECODES,
- Payload,
- Send,
- setHeartbeat,
- WebSocket,
-} from "@spacebar/gateway";
+import { CLOSECODES, Payload, Send, setHeartbeat, WebSocket } from "@spacebar/gateway";
import { VoiceOPCodes } from "../util";
export async function onHeartbeat(this: WebSocket, data: Payload) {
diff --git a/src/webrtc/opcodes/Identify.ts b/src/webrtc/opcodes/Identify.ts
index 3f65127e..9481a3d6 100644
--- a/src/webrtc/opcodes/Identify.ts
+++ b/src/webrtc/opcodes/Identify.ts
@@ -17,19 +17,17 @@
*/
import { CLOSECODES, Payload, Send, WebSocket } from "@spacebar/gateway";
-import {
- validateSchema,
- VoiceIdentifySchema,
- VoiceState,
-} from "@spacebar/util";
+import { validateSchema, VoiceIdentifySchema, VoiceState } from "@spacebar/util";
import { endpoint, getClients, VoiceOPCodes, PublicIP } from "@spacebar/webrtc";
import SemanticSDP from "semantic-sdp";
const defaultSDP = require("./sdp.json");
export async function onIdentify(this: WebSocket, data: Payload) {
clearTimeout(this.readyTimeout);
- const { server_id, user_id, session_id, token, streams, video } =
- validateSchema("VoiceIdentifySchema", data.d) as VoiceIdentifySchema;
+ const { server_id, user_id, session_id, token, streams, video } = validateSchema(
+ "VoiceIdentifySchema",
+ data.d
+ ) as VoiceIdentifySchema;
const voiceState = await VoiceState.findOne({
where: { guild_id: server_id, user_id, token, session_id },
@@ -44,7 +42,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
setup: "actpass",
hash: "sha-256",
fingerprint: endpoint.getDTLSFingerprint(),
- }),
+ })
);
this.client = {
diff --git a/src/webrtc/opcodes/SelectProtocol.ts b/src/webrtc/opcodes/SelectProtocol.ts
index 0a06e722..0ae5eea7 100644
--- a/src/webrtc/opcodes/SelectProtocol.ts
+++ b/src/webrtc/opcodes/SelectProtocol.ts
@@ -24,10 +24,7 @@ import SemanticSDP, { MediaInfo, SDPInfo } from "semantic-sdp";
export async function onSelectProtocol(this: WebSocket, payload: Payload) {
if (!this.client) return;
- const data = validateSchema(
- "SelectProtocolSchema",
- payload.d,
- ) as SelectProtocolSchema;
+ const data = validateSchema("SelectProtocolSchema", payload.d) as SelectProtocolSchema;
const offer = SemanticSDP.SDPInfo.parse("m=audio\n" + data.sdp!);
this.client.sdp!.setICE(offer.getICE());
diff --git a/src/webrtc/opcodes/Video.ts b/src/webrtc/opcodes/Video.ts
index 3228d4ee..88722602 100644
--- a/src/webrtc/opcodes/Video.ts
+++ b/src/webrtc/opcodes/Video.ts
@@ -40,7 +40,7 @@ export async function onVideo(this: WebSocket, payload: Payload) {
id,
// @ts-ignore
tracks: [],
- }),
+ })
);
this.client.in.stream = stream;
@@ -65,7 +65,7 @@ export async function onVideo(this: WebSocket, payload: Payload) {
id: "out" + this.user_id,
// @ts-ignore
tracks: [],
- }),
+ })
);
this.client.out.stream = out;
@@ -95,22 +95,14 @@ export async function onVideo(this: WebSocket, payload: Payload) {
}
}
-function attachTrack(
- this: WebSocket,
- track: IncomingStreamTrack,
- user_id: string,
-) {
+function attachTrack(this: WebSocket, track: IncomingStreamTrack, user_id: string) {
if (!this.client) return;
- const outTrack = this.client.transport!.createOutgoingStreamTrack(
- track.getMedia(),
- );
+ const outTrack = this.client.transport!.createOutgoingStreamTrack(track.getMedia());
outTrack.attachTo(track);
this.client.out.stream!.addTrack(outTrack);
var ssrcs = this.client.out.tracks.get(user_id)!;
if (!ssrcs)
- ssrcs = this.client.out.tracks
- .set(user_id, { audio_ssrc: 0, rtx_ssrc: 0, video_ssrc: 0 })
- .get(user_id)!;
+ ssrcs = this.client.out.tracks.set(user_id, { audio_ssrc: 0, rtx_ssrc: 0, video_ssrc: 0 }).get(user_id)!;
if (track.getMedia() === "audio") {
ssrcs.audio_ssrc = outTrack.getSSRCs().media!;
diff --git a/src/webrtc/opcodes/sdp.json b/src/webrtc/opcodes/sdp.json
index 5f7eba38..7fdcc389 100644
--- a/src/webrtc/opcodes/sdp.json
+++ b/src/webrtc/opcodes/sdp.json
@@ -1,420 +1,420 @@
{
- "version": 0,
- "streams": [],
- "medias": [
- {
- "id": "0",
- "type": "audio",
- "direction": "sendrecv",
- "codecs": [
- {
- "codec": "opus",
- "type": 111,
- "channels": 2,
- "params": {
- "minptime": "10",
- "useinbandfec": "1"
- },
- "rtcpfbs": [
- {
- "id": "transport-cc"
- }
- ]
- }
- ],
- "extensions": {
- "1": "urn:ietf:params:rtp-hdrext:ssrc-audio-level",
- "2": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
- "3": "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
- "4": "urn:ietf:params:rtp-hdrext:sdes:mid"
- }
- },
- {
- "id": "1",
- "type": "video",
- "direction": "sendrecv",
- "codecs": [
- {
- "codec": "VP8",
- "type": 96,
- "rtx": 97,
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "VP9",
- "type": 98,
- "rtx": 99,
- "params": {
- "profile-id": "0"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "VP9",
- "type": 100,
- "rtx": 101,
- "params": {
- "profile-id": "2"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "VP9",
- "type": 102,
- "rtx": 122,
- "params": {
- "profile-id": "1"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 127,
- "rtx": 121,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "1",
- "profile-level-id": "42001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 125,
- "rtx": 107,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "0",
- "profile-level-id": "42001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 108,
- "rtx": 109,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "1",
- "profile-level-id": "42e01f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 124,
- "rtx": 120,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "0",
- "profile-level-id": "42e01f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 123,
- "rtx": 119,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "1",
- "profile-level-id": "4d001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 35,
- "rtx": 36,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "0",
- "profile-level-id": "4d001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 37,
- "rtx": 38,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "1",
- "profile-level-id": "f4001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 39,
- "rtx": 40,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "0",
- "profile-level-id": "f4001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- },
- {
- "codec": "H264",
- "type": 114,
- "rtx": 115,
- "params": {
- "level-asymmetry-allowed": "1",
- "packetization-mode": "1",
- "profile-level-id": "64001f"
- },
- "rtcpfbs": [
- {
- "id": "goog-remb"
- },
- {
- "id": "transport-cc"
- },
- {
- "id": "ccm",
- "params": ["fir"]
- },
- {
- "id": "nack"
- },
- {
- "id": "nack",
- "params": ["pli"]
- }
- ]
- }
- ],
- "extensions": {
- "2": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
- "3": "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
- "4": "urn:ietf:params:rtp-hdrext:sdes:mid",
- "5": "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay",
- "6": "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type",
- "7": "http://www.webrtc.org/experiments/rtp-hdrext/video-timing",
- "8": "http://www.webrtc.org/experiments/rtp-hdrext/color-space",
- "10": "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id",
- "11": "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id",
- "13": "urn:3gpp:video-orientation",
- "14": "urn:ietf:params:rtp-hdrext:toffset"
- }
- }
- ],
- "candidates": []
+ "version": 0,
+ "streams": [],
+ "medias": [
+ {
+ "id": "0",
+ "type": "audio",
+ "direction": "sendrecv",
+ "codecs": [
+ {
+ "codec": "opus",
+ "type": 111,
+ "channels": 2,
+ "params": {
+ "minptime": "10",
+ "useinbandfec": "1"
+ },
+ "rtcpfbs": [
+ {
+ "id": "transport-cc"
+ }
+ ]
+ }
+ ],
+ "extensions": {
+ "1": "urn:ietf:params:rtp-hdrext:ssrc-audio-level",
+ "2": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
+ "3": "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
+ "4": "urn:ietf:params:rtp-hdrext:sdes:mid"
+ }
+ },
+ {
+ "id": "1",
+ "type": "video",
+ "direction": "sendrecv",
+ "codecs": [
+ {
+ "codec": "VP8",
+ "type": 96,
+ "rtx": 97,
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "VP9",
+ "type": 98,
+ "rtx": 99,
+ "params": {
+ "profile-id": "0"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "VP9",
+ "type": 100,
+ "rtx": 101,
+ "params": {
+ "profile-id": "2"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "VP9",
+ "type": 102,
+ "rtx": 122,
+ "params": {
+ "profile-id": "1"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 127,
+ "rtx": 121,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "1",
+ "profile-level-id": "42001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 125,
+ "rtx": 107,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "0",
+ "profile-level-id": "42001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 108,
+ "rtx": 109,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "1",
+ "profile-level-id": "42e01f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 124,
+ "rtx": 120,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "0",
+ "profile-level-id": "42e01f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 123,
+ "rtx": 119,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "1",
+ "profile-level-id": "4d001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 35,
+ "rtx": 36,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "0",
+ "profile-level-id": "4d001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 37,
+ "rtx": 38,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "1",
+ "profile-level-id": "f4001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 39,
+ "rtx": 40,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "0",
+ "profile-level-id": "f4001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ },
+ {
+ "codec": "H264",
+ "type": 114,
+ "rtx": 115,
+ "params": {
+ "level-asymmetry-allowed": "1",
+ "packetization-mode": "1",
+ "profile-level-id": "64001f"
+ },
+ "rtcpfbs": [
+ {
+ "id": "goog-remb"
+ },
+ {
+ "id": "transport-cc"
+ },
+ {
+ "id": "ccm",
+ "params": ["fir"]
+ },
+ {
+ "id": "nack"
+ },
+ {
+ "id": "nack",
+ "params": ["pli"]
+ }
+ ]
+ }
+ ],
+ "extensions": {
+ "2": "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
+ "3": "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
+ "4": "urn:ietf:params:rtp-hdrext:sdes:mid",
+ "5": "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay",
+ "6": "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type",
+ "7": "http://www.webrtc.org/experiments/rtp-hdrext/video-timing",
+ "8": "http://www.webrtc.org/experiments/rtp-hdrext/color-space",
+ "10": "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id",
+ "11": "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id",
+ "13": "urn:3gpp:video-orientation",
+ "14": "urn:ietf:params:rtp-hdrext:toffset"
+ }
+ }
+ ],
+ "candidates": []
}
diff --git a/src/webrtc/util/MediaServer.ts b/src/webrtc/util/MediaServer.ts
index 0c12876c..f222db7b 100644
--- a/src/webrtc/util/MediaServer.ts
+++ b/src/webrtc/util/MediaServer.ts
@@ -17,11 +17,7 @@
*/
import { WebSocket } from "@spacebar/gateway";
-import MediaServer, {
- IncomingStream,
- OutgoingStream,
- Transport,
-} from "medooze-media-server";
+import MediaServer, { IncomingStream, OutgoingStream, Transport } from "medooze-media-server";
import SemanticSDP from "semantic-sdp";
MediaServer.enableLog(true);
@@ -35,11 +31,7 @@ try {
MediaServer.setPortRange(min, max);
} catch (error) {
- console.error(
- "Invalid env var: WEBRTC_PORT_RANGE",
- process.env.WEBRTC_PORT_RANGE,
- error,
- );
+ console.error("Invalid env var: WEBRTC_PORT_RANGE", process.env.WEBRTC_PORT_RANGE, error);
process.exit(1);
}
|