diff options
Diffstat (limited to 'web/poc_jsonrpc/nowplaying.html')
-rw-r--r-- | web/poc_jsonrpc/nowplaying.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/poc_jsonrpc/nowplaying.html b/web/poc_jsonrpc/nowplaying.html index 2eb9eb50a6..9c3931306c 100644 --- a/web/poc_jsonrpc/nowplaying.html +++ b/web/poc_jsonrpc/nowplaying.html @@ -44,8 +44,10 @@ http_request.open( "POST", "jsonrpc", false ); http_request.send('{"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}'); var players = JSON.parse(http_request.responseText)["result"]; -if (players.length > 0) { - var player = players[0]; +if (players["video"] || players["audio"]) { + var player = "Video"; + if (players["audio"]) + player = "Audio"; http_request = new XMLHttpRequest(); http_request.open( "POST", "jsonrpc", false ); |