mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-26 09:40:58 +08:00
Add Support for SwitchBot VideoDoorbell
This commit is contained in:
@@ -3,6 +3,8 @@ package webrtc
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
"strconv"
|
||||
|
||||
"github.com/AlexxIT/go2rtc/pkg/core"
|
||||
"github.com/AlexxIT/go2rtc/pkg/webrtc"
|
||||
)
|
||||
@@ -33,6 +35,13 @@ func switchbotClient(rawURL string, query url.Values) (core.Producer, error) {
|
||||
v.Resolution = 0
|
||||
case "sd":
|
||||
v.Resolution = 1
|
||||
case "auto":
|
||||
v.Resolution = 2
|
||||
}
|
||||
|
||||
playtype, err := strconv.Atoi(query.Get("play_type"))
|
||||
if err == nil {
|
||||
v.PlayType = playtype
|
||||
}
|
||||
|
||||
return v, nil
|
||||
|
||||
Reference in New Issue
Block a user