Skip to content

this.preferredCodec.split is not a function #48

Description

@CreatoonAuraML

Describe the bug

When attempting to use pixel streaming on Firefox, an error occurs. The issue lies within the metaeditor4-ue package during debugging. Specifically, there is a problem with setting the preferredCodec for the Chrome browser. The relevant code snippet is as follows:

 constructor(
        options: RTCConfiguration,
        config: Config,
        preferredCodec: string
    ) {
        console.log('Trying looking pc: ', preferredCodec)
        this.config = config;
        this.createPeerConnection(options, preferredCodec);
    }

In the above code, the preferredCodec is inferred as a string, which is correct for the Chrome browser. To investigate further, I logged the preferredCodec values for both Chrome and Firefox browsers. Here are the respective console logs:

// chrome
console.log(prefferedCodec); // H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
// firefox
console.log(prefferedCodec); 

// Array [
//     "H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f",
//     "H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f"
// ]```

As observed, the ```preferredCodec``` in Firefox is an Array, whereas it is expected to be a String.

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