适配engine修改

This commit is contained in:
langhuihui
2021-03-06 17:21:32 +08:00
parent c2f692a03a
commit 2d05a6ef56
3 changed files with 12 additions and 4 deletions

View File

@@ -162,13 +162,13 @@ func (rtc *WebRTC) Publish(streamPath string) bool {
case MimeTypePCMA:
at := engine.NewAudioTrack()
at.SoundFormat = 7
at.SoundType = byte(codec.Channels) - 1
at.Channels = byte(codec.Channels)
rtc.SetOriginAT(at)
etrack = at
case MimeTypePCMU:
at := engine.NewAudioTrack()
at.SoundFormat = 8
at.SoundType = byte(codec.Channels) - 1
at.Channels = byte(codec.Channels)
rtc.SetOriginAT(at)
etrack = at
default: