EasyVQD/internal/core/host/play.param.go
2026-01-27 10:42:21 +08:00

41 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package host
type PlayInput struct {
ChannelID string `json:"channel_id"`
Stream string `json:"stream"` // 主子码流 MAIN/SUB
Protocol string `json:"protocol"` // hls/webrtc/flv 等播放协议
Network string `json:"network"` // LAN:内网;WAN:公网(rtsp/rtmp 返回的地址)
ActiveSecond int `json:"active_second"` // 流活跃时间
TimeS int `form:"time_s" json:"time_s"` // 秒
IsRecord bool `json:"-"` // 是否由录像拉起
Reason string `json:"-"` // 调用原因
Domain string `json:"-"` // 域名
RequestHost string `json:"-"` // 请求 url 上的 host用于自适应返回播放地址
Host string `json:"-"`
// 在未来的版本中,将废弃
IsHTTPS bool `json:"-"` // 是否是 https 请求
Auth bool `json:"-"` // 是否是 auth 请求
}
type PlayOutput struct {
ChannelID string `json:"channel_id"`
StreamID string `json:"stream_id"`
Address map[string]string `json:"address"`
Routes []Route `json:"routes"` // 多线路
Img []byte `json:"img"`
ImgType string `json:"img_type"`
ImgCreateAt int64 `json:"img_created_at"`
}
type Route struct {
ID int `json:"id"`
Label string `json:"label"`
HTTPFLV string `json:"http_flv"`
WSFLV string `json:"ws_flv"`
HLS string `json:"hls"`
RTMP string `json:"rtmp"`
RTSP string `json:"rtsp"`
WebRTC string `json:"webrtc"`
}