update readme

This commit is contained in:
xugo
2025-11-23 20:36:29 +08:00
parent 53e4c00663
commit 0bc60bdca5
4 changed files with 15 additions and 3 deletions
+4 -2
View File
@@ -20,8 +20,8 @@ go wvp 是 Go 语言实现的开源 GB28181 解决方案,基于 GB28181-2022
|![](./docs/phone/login.webp)|![](./docs/phone/desktop.webp)|![](./docs/phone/gb28181.webp)|
|-|-|-|
|![](./docs/phone/login.webp)|![](./docs/phone/desktop.webp)|![](./docs/phone/gb28181.webp)|![](./docs/phone/discover.webp)|
|-|-|-|-|
@@ -256,6 +256,8 @@ services:
- [x] 音频支持 g711a/g711u/aac
- [x] 快照
- [x] 支持跨域
- [x] 支持中文和 English
- [x] 支持 onvif
- [ ] 设备云台控制
- [ ] 录像回放
- [ ] 报警事件订阅
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

+1 -1
View File
@@ -16,7 +16,7 @@ func (a *Adapter) OnStreamChanged(ctx context.Context, stream string) error {
if err := a.adapter.Store().Channel().Get(ctx, &ch, orm.Where("id=?", stream)); err != nil {
return err
}
if err := a.adapter.EditPlaying(ctx, ch.DeviceID, ch.ChannelID, false); err != nil {
if err := a.adapter.EditPlayingByID(ctx, ch.ID, false); err != nil {
slog.ErrorContext(ctx, "编辑播放状态失败", "err", err)
}
return nil
+10
View File
@@ -81,6 +81,16 @@ func (g Adapter) Edit(deviceID string, changeFn func(*Device)) error {
return nil
}
func (g Adapter) EditPlayingByID(ctx context.Context, id string, playing bool) error {
var ch Channel
if err := g.store.Channel().Edit(ctx, &ch, func(c *Channel) {
c.IsPlaying = playing
}, orm.Where("id=?", id)); err != nil {
return err
}
return nil
}
func (g Adapter) EditPlaying(ctx context.Context, deviceID, channelID string, playing bool) error {
var ch Channel
if err := g.store.Channel().Edit(ctx, &ch, func(c *Channel) {