Code refactoring for #1823
This commit is contained in:
@@ -3,8 +3,6 @@ package webrtc
|
|||||||
import (
|
import (
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||||
"github.com/AlexxIT/go2rtc/pkg/webrtc"
|
"github.com/AlexxIT/go2rtc/pkg/webrtc"
|
||||||
)
|
)
|
||||||
@@ -39,10 +37,7 @@ func switchbotClient(rawURL string, query url.Values) (core.Producer, error) {
|
|||||||
v.Resolution = 2
|
v.Resolution = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
playtype, err := strconv.Atoi(query.Get("play_type"))
|
v.PlayType = core.Atoi(query.Get("play_type")) // zero by default
|
||||||
if err == nil {
|
|
||||||
v.PlayType = playtype
|
|
||||||
}
|
|
||||||
|
|
||||||
return v, nil
|
return v, nil
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user