2021-04-19 18:48:43 +03:00
|
|
|
package pushurl
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/url"
|
|
|
|
|
"strings"
|
|
|
|
|
)
|
|
|
|
|
|
2021-05-13 12:01:20 +03:00
|
|
|
const (
|
2021-05-27 02:55:42 -07:00
|
|
|
frameFormatParam = "gf_live_frame_format"
|
2021-05-13 12:01:20 +03:00
|
|
|
)
|
|
|
|
|
|
2021-04-26 20:46:26 +03:00
|
|
|
// FrameFormatFromValues extracts frame format tip from url values.
|
2021-04-19 18:48:43 +03:00
|
|
|
func FrameFormatFromValues(values url.Values) string {
|
2021-05-13 12:01:20 +03:00
|
|
|
frameFormat := strings.ToLower(values.Get(frameFormatParam))
|
2021-04-19 18:48:43 +03:00
|
|
|
if frameFormat == "" {
|
2021-05-13 12:01:20 +03:00
|
|
|
frameFormat = "labels_column"
|
2021-04-19 18:48:43 +03:00
|
|
|
}
|
|
|
|
|
return frameFormat
|
|
|
|
|
}
|