From 89737dd4ce2132dfd3970cad5c98f8c10a01984e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 29 Jan 2023 18:21:34 +0100 Subject: [PATCH] codec is video & audio. --- server/internal/types/codec/codecs.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/internal/types/codec/codecs.go b/server/internal/types/codec/codecs.go index 8fe0691d..621655e0 100644 --- a/server/internal/types/codec/codecs.go +++ b/server/internal/types/codec/codecs.go @@ -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 {