Subscription to signal created by server

Hello,

I have created a new signal type to one specific connectionId using /api/signal endpoint in OpenVidu REST API. I have received the new signal in the desired connectionId (user) but the subscription is not working. Neither my function is triggered nor the console.log inside is printing.My code in video-room component (my app is based in OpenVidu Call) to subscribe to this signal is:

private permissionCam(): void {
this.session.on(‘signal:permissionCam’, (signal: SignalEvent) => {
console.log(signal.data);
this.toggleCam();
});
}

This is my usual way to subscribe new signals when I am creating them from the front-end part (they are working correctly). Is there something different in the way to subscribe these signals from server. I know that they are with from parameter (not important for my usecase).

I would really appreciate some indications.

Many thanks in advance,
Beka

Hi @beka.iglesias,

Try to send a “hello world” signal to check if you are able to received it from the server.
Make sure youre invoke permissionCam method before to send the signal .

You can see the Signal docs here

Hi!

I will retake this in the final part of the week (now in another project). Apparently I am doing things as it’s supposed in docs but I will review carefully and give feedback. Thanks for the answers

So, I am retaking this feature. The back-end request to /api/signal works fine (I can see new signal with the rigth data and type in the right user-connectionId-console browser …so OV Server is sending right and logger.info in ov-browser is doing rigth).
But my subscription to that signal to activate the rigth function, desired behavior triggered by the signal is not working. So, I think that I am doing something wrong related to the subscription. I am following these docs:


I am invoking my subscription just after OV.initSession() and before connectToSession() as I am doing with the rest of my signals.

this.subscribedPermissionTalk();

private subscribedPermissionTalk() : void {
this.session.on(‘signal:permissionTalk’, (event: SignalEvent): void => {
console.log(event.data);
console.log(‘jolis’);
});
}

I am getting stuck. Any idea to subscribe in the rigth way Signal Event using openvidu-browser in Angular?

I am using openvidu-browser 2.15.0 and openvidu-server 2.15.0.

Thanks in advance,

Hi @beka.iglesias,

It’s clear you’re doing something wrong in your client side.

Make sure you’re doing the signal rigth and sending it the signal to all participants.

You can read more infor about signals in our docs: https://docs.openvidu.io/en/2.15.0/cheatsheet/send-messages/#send-text-messages-between-users

Moreover, you can see an openvidu-call example to check how we use it.

Regards

I will check how you receive signal from server in openvidu-call-2.15.0 (if there is that example). I am receiving correctly in my app different and specific signals from the client (private-chat, requestPermission etcetc). I need to see what is different in managing this new signal (the only one that I have from the server).