2012-04-29, 16:19
Hm Player.GetProperties should work for videos as well. I just tested your example request (replaced the "playerid" though) and both "currentaudiostream" as well as "audiostreams" (which is not part of your request) work perfectly fine for me:
Player.GetItem does not have any streamdetails for music because XBMC doesn't store those at all. See the details you can retrieve for songs using AudioLibrary.GetSongs. There's no "streamdetails" property or anything remotely similar.
Concerning "currentvideostream" and "videostreams": I'm not really fond of this idea because probably 99% (in my case 100%) of the videos only have a single video stream. You need to use Player.GetItem anyway to retrieve things properties like "title" etc so you can also retrieve the videostream from the "streamdetails" property. The only reason for "currentaudiostream", "audiostreams", "currentsubtitle" and "subtitles" is because the player allows to change them using Player.SetAudioStream and Player.SetSubtitle.
Code:
{
"id" : 1,
"jsonrpc" : "2.0",
"result" : {
"audiostreams" : [(2) {
"index" : 0,
"language" : "ger",
"name" : "German - AC3 5.1"
}, {
"index" : 1,
"language" : "eng",
"name" : "English - AC3 5.1"
}
],
"currentaudiostream" : {
"bitrate" : 645050,
"channels" : 6,
"codec" : "ac3",
"index" : 0,
"language" : "ger",
"name" : "German - AC3 5.1"
},
"position" : 0,
"repeat" : "off",
"shuffled" : false,
"speed" : 1,
"subtitleenabled" : true,
"time" : {
"hours" : 0,
"milliseconds" : 588,
"minutes" : 9,
"seconds" : 6
},
"totaltime" : {
"hours" : 1,
"milliseconds" : 0,
"minutes" : 41,
"seconds" : 55
}
}
}
Player.GetItem does not have any streamdetails for music because XBMC doesn't store those at all. See the details you can retrieve for songs using AudioLibrary.GetSongs. There's no "streamdetails" property or anything remotely similar.
Concerning "currentvideostream" and "videostreams": I'm not really fond of this idea because probably 99% (in my case 100%) of the videos only have a single video stream. You need to use Player.GetItem anyway to retrieve things properties like "title" etc so you can also retrieve the videostream from the "streamdetails" property. The only reason for "currentaudiostream", "audiostreams", "currentsubtitle" and "subtitles" is because the player allows to change them using Player.SetAudioStream and Player.SetSubtitle.