start transcoding audio

This commit is contained in:
Leandro Moreira
2024-02-26 08:43:45 -03:00
parent 8dfe08f238
commit 9abfd1adc9
7 changed files with 387 additions and 72 deletions

View File

@@ -74,8 +74,8 @@ func (c *WebRTCController) CreatePeerConnection(cancel context.CancelFunc) (*web
return peerConnection, nil
}
func (c *WebRTCController) CreateTrack(peer *webrtc.PeerConnection, track entities.Stream, id string, streamId string) (*webrtc.TrackLocalStaticSample, error) {
codecCapability := c.m.FromTrackToRTPCodecCapability(track)
func (c *WebRTCController) CreateTrack(peer *webrtc.PeerConnection, codec entities.Codec, id string, streamId string) (*webrtc.TrackLocalStaticSample, error) {
codecCapability := c.m.FromTrackToRTPCodecCapability(codec)
webRTCtrack, err := webrtc.NewTrackLocalStaticSample(codecCapability, id, streamId)
if err != nil {
return nil, err