webrtc: fix media conversion failure

This commit is contained in:
Koushik Dutta
2024-12-25 20:22:53 -08:00
parent c5a703896c
commit 92257e41c1
3 changed files with 4 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/webrtc",
"version": "0.2.56",
"version": "0.2.57",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/webrtc",
"version": "0.2.56",
"version": "0.2.57",
"dependencies": {
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/webrtc",
"version": "0.2.56",
"version": "0.2.57",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
"prescrypted-setup-project": "scrypted-package-json",

View File

@@ -308,7 +308,7 @@ export class WebRTCPlugin extends AutoenableMixinProvider implements DeviceCreat
}
if (fromMimeType === ScryptedMimeTypes.FFmpegInput) {
const ffmpegInput: FFmpegInput = typeof data === 'object' ? data : JSON.parse(data.toString());
const ffmpegInput: FFmpegInput = typeof data === 'object' && !Buffer.isBuffer(data) ? data : JSON.parse(data.toString());
const mo = await mediaManager.createFFmpegMediaObject(ffmpegInput);
class OnDemandSignalingChannel implements RTCSignalingChannel {