microsoft-graph-comms-samples icon indicating copy to clipboard operation
microsoft-graph-comms-samples copied to clipboard

EchoBot: cannot instantiate new AudioVideoFramePlayer with null videoSocket param

Open mad-aust opened this issue 5 months ago • 0 comments

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

mad-aust avatar Jul 10 '25 00:07 mad-aust