Ionic, socket.io-stream and ngx-socket-io

53 views Asked by At

I sound like to push streaming from ou ionic app down to the node js server. On ionic, I imported ngx-socket.io library and am able to emit the stream down to the server, using This.socket.emit("stream", data)

On the node.js side, I recieve the stream, but my socket.io-stream is not able to trigger. If I run: io.socket.on("stream", data => { console.log("stream has started"}); I can see the log coming in good sequence. But if I run either: const ss = require("socket.io-stream"); ss(socket).on("stream",data=>{ Console.log("streaming is coming"); }); Or const ss = require("socket.io-stream"); socket.on("stream",data=>{ ss(socket).on("stream",data=>{ Console.log("streaming is coming"); }); }); I don't see any log being displayed. It seems that socket.io-stream listener is not triggered by ngx-socket.io emission.

How could I manage to trigger this, please?

Thank you.

Regards, Etienne.

0

There are 0 answers