Solved Player.SetAudioStream next not working
#1
Hi guy

I send the this RPC call
Code:
{
    "jsonrpc": "2.0",
    "method": "Player.SetAudioStream",
    "params": {
        "playerid": 0,
        "stream":"next"
    },
    "id":"xy"
}

and get this response
Code:
{
    "error": {
        "code": -32100,
        "message": "Failed to execute method."
    },
    "id":"xy",
    "jsonrpc":"2.0"
}

But why?

http://kodi.wiki/view/JSON-RPC_API/v6#Pl...udioStream

Code:
{
  "params": [
    {
      "$ref": "Player.Id",
      "name": "playerid",
      "required": true
    },
    {
      "name": "stream",
      "required": true,
      "type": [
        {
          "enums": [
            "previous",
            "next"
          ],
          "type": "string"
        },
        {
          "minimum": 0,
          "description": "Index of the audio stream to play",
          "type": "integer"
        }
      ]
    }
  ],
  "description": "Set the audio stream played by the player",
  "returns": {
    "type": "string"
  }
}

Isnt it the correct RPC call?

Im connected via Websockets.

Code: https://github.com/breadlesscode/KodiApi.js
Reply
#2
You need to send to correct player Smile

Playerid 0 is audio player so will never have multiple streams.
Reply
#3
How can I skip a song or play a previous song?

I thought stream = file, so that next stream skip a song.

Is Player.GoTo the correct way?
Reply
#4
Ok I tried Player.GoTo and it works =)

Player.SetStream is only for movies/series ?

PS: Thanks for your great remote Wink
Reply
#5
SetStream is to set the audio stream of a video file for example if in a mkv you have both VO and VF.
Reply
#6
Ok thanks =)
Reply

Logout Mark Read Team Forum Stats Members Help
Player.SetAudioStream next not working0