WebSocket : Not all working

Hi,

I try to use websocket in my node project,

Connect is ok, return TRUE

Listen pushState is ok, return lot of information
Emit mute, unmute is ok,

Liston play, stop, do nothing, console.log return nothing.

See my test code :
+++++++++++
const io = require(“socket.io-client”);
const socket = io.connect(“http://volumio.local:3000”);

socket.on(“connect”, () => {
console.log(socket.connected); // true
});

socket.on(‘pushState’, function (data) {
console.log(data);
});

socket.on(‘play’, function () {
console.log(‘play’);
});
++++++++

Volumio version : 3.251

I try different version of socket.io-client ( 1.x, 2.x ) for compatibility, nothing append better.

Any Idea ?

Thanks,

Have a Nive Day,

Fabrice

Have a look at:

for the events that Volumio emits (which you can capture on the client side) and listens for (which you emit on the client side).

Volumio does not emit ‘play’ events, so you won’t capture any. Status changes are encapsulated in ‘pushState’ events.

Ok, that’s a shame,

I will program with “pushState” then.

Thank you,