Skip to content

vMix.connected() returns false in connect listener callback #16

Open
@hrueger

Description

@hrueger

Hi @jensstigaard,
Thanks for this library. It makes interfacing with vMix very easy.
I did find a small bug though:

this.vMix = new ConnectionTCP(this.settings?.ip || "localhost", { autoReconnect: true });
this.vMix.on("connect", () => { 
    console.log(this.vMix.connected())
}

prints false. The reason I found this is that I do some initialization stuff once vMix is connected. Everything I send to vMix goes through a custom send function which does some logging, then checks whether it is actually connected to vMix and if yes, sends the data.
However, I need to skip this check when I'm inside the callback because the connected() method returns false there.

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions