mirror of
https://github.com/koush/scrypted.git
synced 2026-09-17 09:10:38 +01:00
webrtc: fix opus crash
This commit is contained in:
4
plugins/webrtc/package-lock.json
generated
4
plugins/webrtc/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/webrtc",
|
||||
"version": "0.2.54",
|
||||
"version": "0.2.55",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/webrtc",
|
||||
"version": "0.2.54",
|
||||
"version": "0.2.55",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
"@scrypted/sdk": "file:../../sdk",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/webrtc",
|
||||
"version": "0.2.54",
|
||||
"version": "0.2.55",
|
||||
"scripts": {
|
||||
"scrypted-setup-project": "scrypted-setup-project",
|
||||
"prescrypted-setup-project": "scrypted-package-json",
|
||||
|
||||
@@ -347,6 +347,7 @@ export class WebRTCPlugin extends AutoenableMixinProvider implements DeviceCreat
|
||||
try {
|
||||
const { createConnection } = await result.result;
|
||||
connection = await createConnection({}, undefined, session,
|
||||
this.storageSettings.values.requireOpus,
|
||||
maximumCompatibilityMode,
|
||||
clientOptions,
|
||||
{
|
||||
@@ -624,6 +625,7 @@ export async function fork() {
|
||||
async createConnection(message: any,
|
||||
port: number,
|
||||
clientSession: RTCSignalingSession,
|
||||
requireOpus,
|
||||
maximumCompatibilityMode: boolean,
|
||||
clientOptions: RTCSignalingOptions,
|
||||
options: {
|
||||
@@ -668,7 +670,7 @@ export async function fork() {
|
||||
const cleanup = new Deferred<string>();
|
||||
cleanup.promise.catch(e => this.console.log('cleaning up rtc connection:', e.message));
|
||||
|
||||
const connection = new WebRTCConnectionManagement(console, clientSession, this.storageSettings.values.requireOpus, maximumCompatibilityMode, clientOptions, options);
|
||||
const connection = new WebRTCConnectionManagement(console, clientSession, requireOpus, maximumCompatibilityMode, clientOptions, options);
|
||||
cleanup.promise.finally(() => connection.close().catch(() => { }));
|
||||
const { pc } = connection;
|
||||
waitClosed(pc).then(() => cleanup.resolve('peer connection closed'));
|
||||
|
||||
Reference in New Issue
Block a user