Toggle Hand with signal doesn't work

Hi all,

I’m using the version 3.5.0 of OV and I have some issues with the “Toggle hand” feature.

In particular I updated my code from use “getLocalParticipant“ to “localParticipantSignal()“, but it doesn’t work.

I set up the ParticipantAppModel as you suggested in the website guide line:

export class ParticipantAppModel extends ParticipantModel {
    // Indicates whether the participant has raised their hand.
    hasHandRaised: boolean;

    //  Creates a new instance of ParticipantAppModel.
    constructor(props: ParticipantProperties) {
        super(props);
        this.hasHandRaised = false;
    }

    // Toggles the participant's hand raised status.
    toggleHandRaised() {
        this.hasHandRaised = !this.hasHandRaised;
    }
}

Then, I set up the code to set the value of hasHandRaised:

const participant = <ParticipantAppModel>this.participantService.localParticipantSignal();

console.log('participant', participant)
console.log('participant', participant.hasHandRaised)

if(participant)
{
    participant.toggleHandRaised();

    console.log('participant 2', participant.hasHandRaised)
}

However the method “toggleHandRaised()“ goes on error and throws this: ERROR TypeError: e.toggleHandRaised is not a function

Is there something I’m missing?

Greetings, Matteo.

Hi @Developer3010

I will investigate this issue and fix it so that I can release a new version of openvidu-components-angular.

Hi Matteo,

Again, thank you for reporting this issue.

This should be resolved in the upcoming release. You can try it using:

npm i openvidu-components-angular@next

Greetings.
Carlos