Skip to content

Commit

Permalink
codec is video & audio.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Jan 29, 2023
1 parent 2649594 commit 89737dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/internal/types/codec/codecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ func ParseStr(codecName string) (codec RTPCodec, ok bool) {
return
}

func IsVideo(codecType webrtc.RTPCodecType) (ok bool) {
ok = codecType == webrtc.RTPCodecTypeVideo
func IsVideo(codecType webrtc.RTPCodecType) bool {
return codecType == webrtc.RTPCodecTypeVideo
}

return
func IsAudio(codecType webrtc.RTPCodecType) bool {
return codecType == webrtc.RTPCodecTypeAudio
}

type RTPCodec struct {
Expand Down

0 comments on commit 89737dd

Please sign in to comment.