Re: CometD
expectingtofly <expectingtofly.akzz5b-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]> Wed, 25 May 2022 20:25:14 +0000
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
Sorry to resurrect an old thread, I've been wrestling with cometD from a
REACT Javascript app I'm building and not having much luck.
I'm handshaking fine, but when I subscribe I get nothing.
I'm using the standard npm package for cometD.
If for example, I use similar code to Craig's code above it sends a
message like this :
Code:
--------------------
[
{
"data": {
"response": "/4954119f/slim/serverstatus",
"request": [
"",
[
"serverstatus",
0,
50,
"subscribe:60"
]
]
},
"id": "3",
"channel": "/meta/subscribe",
"subscription": "/slim/subscribe",
"clientId": "4954119f"
}
]
--------------------
Which, if I look at the documentation for CometD, is correct.
However, if I look at the LMS code, it states this :
Code:
--------------------
# A valid /slim/subscribe message looks like this:
# {
# channel => '/slim/subscribe',
# id => <unique id>,
# data => {
# response => '/slim/serverstatus', # the channel all messages should be sent back on
# request => [ '', [ 'serverstatus', 0, 50, 'subscribe:60' ],
# priority => <value>, # optional priority value, is passed-through with the response
# }
--------------------
Note, it says '/slim/subscribe' should be in the 'channel' key (instead
of 'meta/subscribe' and there should be no 'subscription' key.
Is it simply that LMS is non-standard and I'm going to have to hand
craft my own subscription method?
Stuart McLean
expectingtofly plugins :
'bbc sounds' (https://github.com/expectingtofly/lms_bbc_sounds_plugin),'
global player (uk)'
(https://github.com/expectingtofly/lms_globalplayer_plugin), 'times
radio' (https://github.com/expectingtofly/lms_times_radio_plugin), 'uk
radio player'
(https://github.com/expectingtofly/lms_ukradioplayer_plugin), 'virgin
radio (uk)' (https://github.com/expectingtofly/lms_virgin_radio_plugin)
and the 'radio favourites plugin'
(https://github.com/expectingtofly/lms_radio_favourites_plugin)
for bbc sounds help see the 'bbc sounds wiki'
(https://github.com/expectingtofly/lms_bbc_sounds_plugin/wiki).
------------------------------------------------------------------------
expectingtofly's Profile: http://forums.slimdevices.com/member.php?userid=63263
View this thread: http://forums.slimdevices.com/showthread.php?t=109788