Skip to content

Commit

Permalink
Revert "simulcast: Disable simulcast as it seems to be crashing the s…
Browse files Browse the repository at this point in the history
…erver"

This reverts commit 86bed80.

Fixed per: livekit/livekit#102
  • Loading branch information
bekriebel committed Aug 31, 2021
1 parent 02fd0d6 commit b0a13cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/LiveKitAVClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ export default class LiveKitAVClient extends AVClient {
// Set the livekit connection options
const livekitConnectionOptions: ConnectOptions = {
tracks: localTracks,
simulcast: false,
// TODO: re-enable after simulcast doesn't crash the server
// simulcast: getGame().settings.get(MODULE_NAME, "simulcast") === true,
simulcast: getGame().settings.get(MODULE_NAME, "simulcast") === true,
};

if (
Expand Down
8 changes: 3 additions & 5 deletions src/LiveKitClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
TrackEvent,
VideoTrack,
} from "livekit-client";
import { LANG_NAME } from "./utils/constants";
import { LANG_NAME, MODULE_NAME } from "./utils/constants";
import * as log from "./utils/logging";
import { getGame } from "./utils/helpers";
import LiveKitAVClient from "./LiveKitAVClient";
Expand Down Expand Up @@ -262,10 +262,8 @@ export default class LiveKitClient {
await this.liveKitRoom?.localParticipant.publishTrack(
this.videoTrack,
{
simulcast: false,
// TODO: re-enable after simulcast doesn't crash the server
// simulcast:
// getGame().settings.get(MODULE_NAME, "simulcast") === true,
simulcast:
getGame().settings.get(MODULE_NAME, "simulcast") === true,
}
);
const userVideoElement = ui.webrtc?.getUserVideoElement(
Expand Down
6 changes: 2 additions & 4 deletions src/utils/registerModuleSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ export default function registerModuleSettings(): void {
registerModuleSetting({
name: "simulcast",
scope: "world",
// TODO: re-enable after simulcast doesn't crash the server
config: false,
// TODO: re-enable after simulcast doesn't crash the server
default: false,
config: true,
default: true,
type: Boolean,
onChange: () => getGame().webrtc?.connect(),
});
Expand Down

0 comments on commit b0a13cd

Please sign in to comment.