From a3df934a8829beba80524203080094496072b51e Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 25 Mar 2024 12:44:25 -0700 Subject: [PATCH] chromecast: fix audio playback --- plugins/chromecast/package-lock.json | 4 ++-- plugins/chromecast/package.json | 2 +- plugins/chromecast/src/main.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/chromecast/package-lock.json b/plugins/chromecast/package-lock.json index 025866d7b0..945d353273 100644 --- a/plugins/chromecast/package-lock.json +++ b/plugins/chromecast/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/chromecast", - "version": "0.1.57", + "version": "0.1.58", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/chromecast", - "version": "0.1.57", + "version": "0.1.58", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/chromecast/package.json b/plugins/chromecast/package.json index 5f23fa458b..7201e19b6c 100644 --- a/plugins/chromecast/package.json +++ b/plugins/chromecast/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/chromecast", - "version": "0.1.57", + "version": "0.1.58", "description": "Send video, audio, and text to speech notifications to Chromecast and Google Home devices", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/chromecast/src/main.ts b/plugins/chromecast/src/main.ts index 48c4eb3588..9171c3bcb7 100644 --- a/plugins/chromecast/src/main.ts +++ b/plugins/chromecast/src/main.ts @@ -183,7 +183,7 @@ class CastDevice extends ScryptedDeviceBase implements MediaPlayer, Refresh, Eng media = await mediaManager.createMediaObjectFromUrl(media); } } - else if (options?.mimeType?.startsWith('image/')) { + else if (options?.mimeType?.startsWith('image/') || options?.mimeType?.startsWith('audio/')) { url = await mediaManager.convertMediaObjectToInsecureLocalUrl(media, options?.mimeType); }