Skip to content

Commit

Permalink
Update client.go
Browse files Browse the repository at this point in the history
Add  "AudioFormat":{"EncodeType":"G711_ALAW"} to suppoet new firmware
  • Loading branch information
isegals authored May 18, 2024
1 parent b2399f3 commit 7a13182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/dvrip/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (c *Client) Play() error {
}

func (c *Client) Talk() error {
format := `{"Name":"OPTalk","SessionID":"0x%08X","OPTalk":{"Action":"%s"}}` + "\x0A\x00"
format := `{"Name":"OPTalk","SessionID":"0x%08X","OPTalk":{"Action":"%s","AudioFormat":{"EncodeType":"G711_ALAW"}}}` + "\x0A\x00"

data := fmt.Sprintf(format, c.session, "Claim")
if _, err := c.WriteCmd(OPTalkClaim, []byte(data)); err != nil {
Expand Down

0 comments on commit 7a13182

Please sign in to comment.