![]() |
|
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version +- XBMC Community Forum (http://forum.xbmc.org) +-- Forum: Development (/forumdisplay.php?fid=32) +--- Forum: Development (/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (/forumdisplay.php?fid=174) +---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263) Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
- Bram77 - 2010-04-14 12:46 that would be a nice test case
- Bram77 - 2010-04-14 14:33 Is there a logic behind the order in which the GetActivePlayers method returns the values? I mean, can I assume the last value is the player most recently used or started? I'm merging the VideoPlayer, AudioPlayer and PicturePlayer namespaces into one namespace because of the overlap. This makes it less work to maintain the code. So I use the GetActivePlayer method to determine the default player if no specific player has been specified. I'd like to know which player I should assume to be the one most recently addressed. - topfs2 - 2010-04-14 14:37 Bram77 Wrote:Is there a logic behind the order in which the GetActivePlayers method returns the values? I mean, can I assume the last value is the player most recently used or started? The logic of the order is that we first check if we are playing video or music, if so we add audio / video player. Then we check if we are playing pictures and thus add it. I'm open for better suggestions here since the first item actually can be any then, its only if there are 2 items we know first must be video / audio and second is picture. - Bram77 - 2010-04-14 16:48 To keep it simple, maybe you could add a method that returns the most recently addressed player? ActivePlayer or so...? - Bram77 - 2010-04-14 17:03 The SeekTime seems to use seconds, not in MS as described in introspect. - Bram77 - 2010-04-14 17:08 I'll just keep posting unexpected behavior ![]() This... Code: {"jsonrpc": "2.0", "method": "PicturePlayer.Zoom", "params": 150, "id": 1}...returns an error.... Code: "code" : -32602, "message" : "Invalid params."...no matter what integer value I pass. The introspect describes the method expects a integer value. Am I missing something? - Bram77 - 2010-04-14 17:14 There is no option to choose between right or left rotation in the XBMC PicturePlayer (not as much in the JSON api), is there? - topfs2 - 2010-04-14 18:07 Bram77 Wrote:To keep it simple, maybe you could add a method that returns the most recently addressed player? ActivePlayer or so...? IMO, more confusing for multiple clients. Perhaps return { "audioplayer": true, "videoplayer": false, "pictureplayer": true } is easier to use. Bram77 Wrote:The SeekTime seems to use seconds, not in MS as described in introspect. Hmm, might be, cooked it up rather fast ![]() Bram77 Wrote:I'll just keep posting unexpected behavior integer needs to be between 1 and 9, but this isn't self explaining, a float would be more appropriate for this perhaps. Bram77 Wrote:There is no option to choose between right or left rotation in the XBMC PicturePlayer (not as much in the JSON api), is there? Nope, not sure it exist in core either, although I like the idea. Please a ticket for it (not jsonrpc related). - Bram77 - 2010-04-14 23:05 The boolean responses for active/inactive players does seem more efficient as checking for the states does takes less code and they can only have two states. The video- and music player can't ever be playing at the same time and the picture player will always be the most recently addressed if music or video is playing. Is that correct? If so, there is no need for a function that returns the most recently addressed player. Some more questions.... - System.GetInfo returns a valid JSON response with the value 'null'. This method hasn't been completed yet in the api, or is it a bug? - Files.GetSources seems to expect a parameter but I can't figure out what it should be. - Bram77 - 2010-04-15 00:23 ... and some suggestions for additional methods ... - VideoPlayer.TogglePartyMode - AudioPlayer.TogglePartyMode - Status.GetRepeatMode - Status.IsPartyModeEnabled - Status.IsPlaying - Status.IsMuteEnabled - Status.IsVideoShuffleEnabled - Status.IsAudioShuffleEnabled - Status.IsLastFmEnabled - Status.GetNowPlaying - Status.GetNowPlayingTime - Status.GetNowPlayingTimeMS - Status.GetNowPlayingPercentage - Status.GetNowPlayingAudio - Status.GetNowPlayingVideo - Status.GetVolume - AudioPlayer.LastFmLove - AudioPlayer.LastFmHate - Controls.ToggleMute (move from the XBMC namespace) - Controls.Stop (regardless of what type of media is playing) - Controls.PlayPause (play/pause the currently playing media; regardless of the type of media) - Controls.Play (start playing the current playlist; regardless of the type of media) - Controls.SkipNext (next in playlist; regardless of the type of media) - Controls.SkipPrevious (previous in playlist; regardless of the type of media) - Controls.Forward (regardless of the type of media) - Controls.Rewind (regardless of the type of media) - Controls.SmallSkipBackward (regardless of the type of media) - Controls.SmallSkipForward (regardless of the type of media) - Controls.BigSkipBackward (regardless of the type of media) - Controls.BigSkipForward (regardless of the type of media) - Controls.SendKey (could make life a lot easier for anyone using a HTPC/Xbox without a keyboard attached) ... most of the controls overlap with the existing controls. But they could make using the api a bit easier. I've already got it covered in the JS api. Making it easier to use will hopefully move more people to developing remotes ![]() The status requests were a real b*tch in the HTTP api. They rendered a lot of overhead since I could only get the total sum of now playing. Having to obtain all the data to get the current playing percentage and filename (which are refreshed every second by default in XbmControl i.e.) made it hardly impossible to not get timeouts and lockups. So allowing to access this data individually could greatly improve speed and ease of use. Essentially 4 values are required every few seconds/second in most cases.... - Current volume - Current playing time/timeMS/percentage - Some way to detect if new media is playing so all the other data can be updated (now playing info; artwork; highlighted playlist item; I use the file path for this in XbmControl since it's unique) - Is anything playing at all? (slow down the request interval to reduce network load if not; the previous value could potentially be used for this) ... Ideally these values could be requested with ONE post. Maybe the "XBMC.StartSildeshow" method should be in the PicturePlayer namespace? Great to be able to post suggestions, even though I'm not expecting them to be implemented all...or any of them I'm just suggesting.
|