Re: Plugin specific cometd channel?

cpd73 <cpd73.a6iz7z-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
OK, so this turned out to be not that hard todo.

In case anyone in future cares, these are the steps I used:

1. Register cometd subscription client side - Javascript in my case:

Code:
--------------------
    
  this.cometd.subscribe('/slim/subscribe',
  function(res) { },
  {data:{response:'/'+this.cometd.getClientId()+'/slim/material-skin', request:['material-skin', ['notification']]}});
  
--------------------
									
									

2. In Perl plugin, register notification type:

Code:
--------------------
    
  Slim::Control::Request::addDispatch(['material-skin', 'notification', '_type', '_msg'], [0, 0, 0, undef]);
  
--------------------


3. Again in Perl plugin, create notification.

Code:
--------------------
    
  Slim::Control::Request::notifyFromArray(undef, ['material-skin', 'notification', 'info', 'Test']);
  
--------------------



*Material debug:* 1. Launch via http: //SERVER:9000/material/?debug=json
(Use http: //SERVER:9000/material/?debug=json,cometd to also see update
messages, e.g. play queue) 2. Open browser's developer tools 3. Open
console tab in developer tools 4. REQ/RESP messages sent to/from LMS
will be logged here.
------------------------------------------------------------------------
cpd73's Profile: http://forums.slimdevices.com/member.php?userid=66686
View this thread: http://forums.slimdevices.com/showthread.php?t=114969
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.