Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source state isn't being set properly during stream close / preset invocation #981

Open
SteveMicroNova opened this issue Oct 14, 2024 · 2 comments
Labels
bug Something isn't working webapp Web application development

Comments

@SteveMicroNova
Copy link
Contributor

In #980 and #979 I found that closing a stream doesn't always set that source.input to a valid option, figure out why state isn't being set properly in different cases involving presets and stream closures

@SteveMicroNova SteveMicroNova added bug Something isn't working webapp Web application development labels Oct 14, 2024
@rtertiaer
Copy link
Contributor

I'm not sure there's enough information here for someone other than yourself to solve this issue; can you elaborate on the problem as you've witnessed it and perhaps create a repro case?

@SteveMicroNova
Copy link
Contributor Author

I'm not sure there's enough information here for someone other than yourself to solve this issue; can you elaborate on the problem as you've witnessed it and perhaps create a repro case?

For some reason this solved the issue I was having, and illuminated this one. When streams are closed manually or via an empty preset on streamer, sometimes they get set to an invalid state that allows them to path through the "unknown" path of this function:

export const getSourceInputType = (source) => {
    // can return:
    // none, rca, digital, unknown
    if (!source || !source.input || source.input == undefined) return "unknown";
    const input = source.input.toLowerCase();

    if (input === "none" || input === "" || input === "local") {
        return "none";
    }

    const split = input.split("=");
    if (split.length !== 2) {
        console.log(`WARNING: unknown source input: ${input}`);
        return "unknown";
    }

    if (split[1] < 1000) {
        return "rca";
    } else {
        return "digital";
    }
};

I didn't get very far into it myself, to witness this you'll just have to keep an eye on the state of the various sources while closing stuff on the streamer at minimum, I haven't been able to look at a main unit yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working webapp Web application development
Projects
None yet
Development

No branches or pull requests

2 participants