chromecast: fixup mimetype detection

This commit is contained in:
Koushik Dutta
2021-10-06 22:36:57 -07:00
parent b5383fd9d9
commit 36bd4cbee2

View File

@@ -163,7 +163,7 @@ class CastDevice extends ScryptedDeviceBase implements MediaPlayer, Refresh, Eng
this.sendMediaToClient(options && (options as any).title,
url,
// prefer the provided mime type hint, otherwise infer from url.
options.mimeType || mime.getType(url));
options.mimeType || mime.getType(new URL(url).pathname));
return;
}