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

A small cleanup in AudioVideoPlaybackBot #306

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

Identifier
Copy link
Contributor

In this pull request I've moved the OnVideoMediaReceived function from CallHandler to BotMediaStream since BotMediaStream handles all other media related events. I also added a callback for OnAudioMediaReceived to the same class to make it easy for people to see where both Audio and Video can be handled.

Copy link
Contributor

@pcdeadeasy pcdeadeasy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also move the code below to BotMediaStream.cs
this.Call.GetLocalMediaSession().AudioSocket.DominantSpeakerChanged += this.OnDominantSpeakerChanged;

@Identifier
Copy link
Contributor Author

Could you also move the code below to BotMediaStream.cs
this.Call.GetLocalMediaSession().AudioSocket.DominantSpeakerChanged += this.OnDominantSpeakerChanged;

Hmm we should ask @zihzhan what he thinks about that, since the OnDominantSpeakerChanged handler does things related to the CallHandler (e.g. it might end up unsubscribing from one person's video and subscribing to the dominant speaker's video instead). It seems appropriately scoped to the CallHandler class. If we were to move it to BotMediaStream then all it would do is raise an event that CallHandler would end up listening to & handling anyway.

@Identifier Identifier self-assigned this Aug 13, 2020
@Identifier Identifier added the review requested Use for external PRs that need to be reviewed by content author. label Aug 13, 2020
Copy link
Contributor

@pcdeadeasy pcdeadeasy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Kael, I took a closer look and you are right we cannot the move the Dominant Speaker Changed event handler. All the changes look good to me.

@Identifier Identifier merged commit 31e4911 into master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review requested Use for external PRs that need to be reviewed by content author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants