Skip to content

Commit 2f9d138

Browse files
committed
Fix zero channel for xiaomi source #2047
1 parent 366cbd2 commit 2f9d138

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/xiaomi/miss/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ func (c *Client) StartMedia(channel, quality, audio string) error {
184184
}
185185

186186
data := binary.BigEndian.AppendUint32(nil, cmdVideoStart)
187-
if channel == "" {
187+
switch channel {
188+
case "", "0":
188189
data = fmt.Appendf(data, `{"videoquality":%s,"enableaudio":%s}`, quality, audio)
189-
} else {
190+
default:
190191
data = fmt.Appendf(data, `{"videoquality":-1,"videoquality2":%s,"enableaudio":%s}`, quality, audio)
191192
}
192193
return c.WriteCommand(data)

0 commit comments

Comments
 (0)