Skip to content

Commit

Permalink
mapic: Grab SendAudio from config directly (#573)
Browse files Browse the repository at this point in the history
Haven't checked if there are other configs we're
ignoring, but doing this in a rush so this already
fixes the known problem.
  • Loading branch information
victorges authored Apr 4, 2023
1 parent 003961c commit bec3ebe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mapic/mistapiconnector_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ type (
createStreamLock sync.Mutex
mistHot string
checkBandwidth bool
sendAudio string
baseStreamName string
streamInfo map[string]*streamInfo // public key to info
producer event.AMQPProducer
Expand Down Expand Up @@ -731,9 +730,9 @@ func (mc *mac) baseNameForStream(stream *api.Stream) string {

func (mc *mac) shouldEnableAudio(stream *api.Stream) bool {
audio := false
if mc.sendAudio == audioAlways {
if mc.config.MistSendAudio == audioAlways {
audio = true
} else if mc.sendAudio == audioRecord {
} else if mc.config.MistSendAudio == audioRecord {
audio = stream.Record
}
return audio
Expand Down

0 comments on commit bec3ebe

Please sign in to comment.