Skip to content

EchoBot: cannot instantiate new AudioVideoFramePlayer with null videoSocket param #831

@mad-aust

Description

@mad-aust

Describe the issue
The sample code constructs a new AudioVideoFramePlayer but passes null for the videoSocket (second) param. This always causes a null reference exception to be thrown by the AudioVideoFramePlayer constructor as it doesn't allow nulls.

Code Snippet

                this.audioVideoFramePlayerSettings =
                    new AudioVideoFramePlayerSettings(new AudioSettings(20), new VideoSettings(), 1000);
                this.audioVideoFramePlayer = new AudioVideoFramePlayer(
                    (AudioSocket)_audioSocket,
                    null,
                    this.audioVideoFramePlayerSettings);

Expected behavior
Should create a new AudioVideoFramePlayer

Additional context
This is in EchoBot project, BotMediaStream.cs class

https://github.com/microsoftgraph/microsoft-graph-comms-samples/blob/3a4ed77ab35eb29038f9f01d92378c9c175b150f/Samples/PublicSamples/EchoBot/src/EchoBot/Bot/BotMediaStream.cs#L160C1-L166C1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions