live-streamer/utils/is_supported_video.go
nite07 dfdb6003ea feat: log level config
feat: ffmpeg args placeholder
2024-10-29 03:35:21 +08:00

14 lines
277 B
Go
Executable File

package utils
import (
"live-streamer/constant"
"path/filepath"
"slices"
"strings"
)
func IsSupportedVideo(filename string) bool {
ext := strings.ToLower(filepath.Ext(filename))
return slices.Contains(constant.SupportedStreamingFormats, strings.TrimPrefix(ext, "."))
}