41 lines
1.5 KiB
Go
41 lines
1.5 KiB
Go
|
|
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"`
|
|||
|
|
}
|