Thanks for the fast response.
I did try other methods. They all give the same parse error.
Is there any way I can provide more information to make the debugging easier? I'm not sure how to debug websockets.
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
sjroesink
Junior Member Posts: 4 Joined: May 2012 Reputation: 0 |
2012-05-06 10:26
Post: #1901
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-05-06 11:15
Post: #1902
Neither am I. I just ran latest XBMC (from master not a nightly build, but shouldn't make a difference) and used the websocket demo on websocket.org, opened a websocket to XBMC and ran JSONRPC.Ping, JSONRPC.Version and VideoLibrary.GetMovies without a problem.
EDIT: What browser are you using and are you using any framework for websockets? Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]()
(This post was last modified: 2012-05-06 11:15 by Montellese.)
|
| find quote |
sjroesink
Junior Member Posts: 4 Joined: May 2012 Reputation: 0 |
2012-05-06 11:34
Post: #1903
When using Firefox, I can't get the websocket.org demo to connect to the websocket. In Chrome I can.
Via the demo I found out I had to send the JSON encoded string instead of the actual object (I tried this before using the Introspect method, but this gave me the error "Received unexpected continuation frame."): Code: var xbmcSocket = new WebSocket('ws://localhost:9090/jsonrpc');This does work! BTW: The error "Received unexpected continuation frame." also occurs when I start playing a movie. |
| find quote |
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-05-06 11:44
Post: #1904
That's funny. I was just about to post I was having problems. I've been trying on and off for a few days, I'm doing basically the same thing but I don't get a connection. It tries to open and then after a while I get a closed message and error "Firefox can't establish a connection to the server at ws://10.0.0.101:9090/jsonrpc". Here is the simple code:
Code: wsListener: function() {EDIT: Just thought I'd try the websocket.org demo. Works in Chrome but not in FF. Error in log: Code: 10:39:44 T:2874841968 INFO: WebSocket [RFC6455]: invalid "connection" receivedEDIT, EDIT: Okay and now Chrome is working fine. Maybe because I just allowed UPnP access? I'll leave all this here for any searchers it might help.
(This post was last modified: 2012-05-06 11:45 by Mizaki.)
|
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-05-06 11:59
Post: #1905
Ah right I thought the websocket send method would take care of the stringification of the JSON object. Yes a websocket is just an extended TCP socket so you'll need to pass in everything as a string.
Back when I implemented this there was no browser who supported the final RFC6455 implementation yet so I could only test against the latest draft. Maybe there's a bug in there. The only thing you should have to enable in the settings is "Allow programs on this system to control XBMC" (and "Allow programs on other systems to control XBMC" if that's what you want)). Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-05-06 13:04
Post: #1906
I've figured out where I went wrong. When turning on the remote control option you have to exit XBMC and restart for it to take effect. Switching off works without a restart. This is for "other systems", I don't know about local.
|
| find quote |
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-05-06 13:28
Post: #1907
To confirm all Player.OnPlay give the error:
Code: Received unexpected continuation frame. |
| find quote |
Mizaki
Fan Joined: Apr 2011 Reputation: 12 |
2012-05-06 18:11
Post: #1908
Question Sunday: Is there a reason why I can't request the "file" property for albums?
I do it with TV Shows to get the logo's and I'm thinking of seeing what I can do with the cdart files in case you want to know why. |
| find quote |
Montellese
Team-XBMC Developer Joined: Jan 2009 Reputation: 20 Location: Switzerland |
2012-05-06 23:10
Post: #1909
I'll have to look into both the "Received unexpected continuation frame" and the "other systems" setting not being available immediately after changing it. Could you please create bug tickets for these and CC me so I don't forget. Thanks.
IIRC the initial reasoning behind "file" not being available for albums (and artists) is because an album may be scattered over multiple directories so there's no "unique" path to the album. But the same reasoning could apply to tvshows. I guess a feature request can't hurt
Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2012-05-06 23:26
Post: #1910
@Montellese: The same argument does apply to tvshows (which the db handles really badly - multiple ids for a show rather than multiple paths and a single id).
@Mizaki: I think the main problem here is you shouldn't need to assume anything about where images may or may not lie, and furthermore you shouldn't assume you have access to said potential images on the filesystem. You may, however, assume that filesystem access can and will be shutdown come Frodo. Hopefully by then you won't need it for what you're doing ![]() Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
![[Image: watched-clearlogo.jpg]](http://trakt.tv/user/jinxy/widget/watched-clearlogo.jpg)

Search
Help