func SendStreamWs(item Danmu_item) {
var msg string
- if item.auth != nil {
+ if item.auth != nil && !item.hideAuth {
msg += fmt.Sprint(item.auth) + `: `
}
msg += item.msg
// Msg-弹幕处理
type Danmu_item struct {
- msg string
- color string
- border bool
- mode int
- auth any
- uid string
- roomid int //to avoid danmu show when room has changed
+ msg string
+ color string
+ border bool
+ mode int
+ auth any
+ hideAuth bool
+ uid string
+ roomid int //to avoid danmu show when room has changed
}
func (t replyF) danmu(s string) {
infob := j.Info
item := Danmu_item{}
+ if v, ok := t.Common.K_v.LoadV(`弹幕回放_隐藏发送人`).(bool); ok && v {
+ item.hideAuth = true
+ }
{
//解析
if len(infob) > 0 {
//直播流服务弹幕
SendStreamWs(item)
- if item.auth != nil {
+ if item.auth != nil && !item.hideAuth {
Gui_show(fmt.Sprint(item.auth)+`: `+item.msg, item.uid)
} else {
Gui_show(item.msg, item.uid)
"直播Web可以发送弹幕":true,
"弹幕回放-help": "仅保存当前直播间流为true时才有效",
"弹幕回放": true,
+ "弹幕回放_隐藏发送人-help": "回放弹幕文件类型记录(ass,xml,csv...)不记录发送人,但不影响`保存弹幕至db`等日志类型记录,默认为false",
+ "弹幕回放_隐藏发送人": false,
"直播流回放速率-help": "速率为每秒速率 例最小值(1 MB)",
"直播流回放速率": "2 MB",
"直播流回放连接检查-help": "默认-1,小于1禁用。指最多支持n连接流,有效数时,会对回放连接进行定时检查。原因,对于经过代理回放,有可能浏览器标签页已经关闭,但代理不关闭连接,导致连接不能释放",