cast info

This commit is contained in:
2026-01-15 07:07:00 +01:00
parent 0541b0b776
commit dac2b0e8dc
6 changed files with 104 additions and 6 deletions

View File

@@ -140,7 +140,8 @@ function play(ip, url, metadata) {
function launchPlayer(url, metadata, didStopFirst) {
if (!activeClient) return;
activeClient.launch(DefaultMediaReceiver, (err, player) => {
const launchApp = (metadata && metadata.appId) ? metadata.appId : DefaultMediaReceiver;
activeClient.launch(launchApp, (err, player) => {
if (err) {
const details = `Launch error: ${err && err.message ? err.message : String(err)}${err && err.code ? ` (code: ${err.code})` : ''}`;
// If launch fails with NOT_ALLOWED, the device may be busy with another app/session.