reply

package
v0.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 21 Imported by: 0

README


目录释义

目录 说明
./ 接收的数据处理区
ws_msg/ 弹幕服务器传回的Msg类型json的golang struct表述
0Init.go 最初始载入配置
F.go 附加功能
Heartbeat.go 人气数据分派
Msg.go 消息数据分派
Reply.go 分派数据处理
gtk.go gtk弹幕窗模块
tts.go TTS语音模块

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ShowRev_old   float64
	ShowRev_start bool
)

功能区 ShowRev 显示h营收

View Source
var (
	Ass_height = 720  //字幕高度
	Ass_width  = 1280 //字幕宽度
	Ass_font   = 50   //字幕字体大小
	Ass_T      = 7    //单条字幕显示时间
	Ass_loc    = 7    //字幕位置 小键盘对应的位置
)
View Source
var AllF = map[string]bool{
	`ShowRev`: true,
	"Gtk":     false,
	"Saveflv": true,
	"Ass":     true,
	"Obs":     false,

	"Autoban":      false,
	"Jiezou":       true,
	"Danmuji":      true,
	"Danmuji_auto": false,
	"Autoskip":     true,
	"Lessdanmu":    true,
	"Moredanmu":    false,
	"Shortdanmu":   true,
}

功能开关

View Source
var Danmu_mq = mq.New(10)
View Source
var Heart_map = map[string]func(replyF, int){
	"heartbeat": replyF.heartbeat,
}
View Source
var K_v = make(map[string]interface{})

k-v

View Source
var Msg_map = map[string]func(replyF, string){
	`ENTRY_EFFECT_MUST_RECEIVE`:     nil,
	`GIFT_BAG_DOT`:                  nil,
	`LITTLE_MESSAGE_BOX`:            replyF.little_message_box,
	`MESSAGEBOX_USER_MEDAL_CHANGE`:  replyF.messagebox_user_medal_change,
	`HOT_RANK_SETTLEMENT`:           replyF.hot_rank_settlement,
	`HOT_RANK_CHANGED`:              replyF.hot_rank_changed,
	`CARD_MSG`:                      nil,
	`WIDGET_BANNER`:                 nil,
	`ROOM_ADMINS`:                   nil,
	`ONLINE_RANK_TOP3`:              nil,
	`ONLINE_RANK_COUNT`:             nil,
	`ONLINE_RANK_V2`:                nil,
	"TRADING_SCORE":                 nil,
	"MATCH_ROOM_CONF":               nil,
	"HOT_ROOM_NOTIFY":               nil,
	"MATCH_TEAM_GIFT_RANK":          nil,
	"ACTIVITY_MATCH_GIFT":           nil,
	"PK_BATTLE_PRE":                 nil,
	"PK_BATTLE_START":               nil,
	"PK_BATTLE_PROCESS":             nil,
	"PK_BATTLE_END":                 nil,
	"PK_BATTLE_RANK_CHANGE":         nil,
	"PK_BATTLE_SETTLE_USER":         nil,
	"PK_BATTLE_SETTLE_V2":           nil,
	"PK_BATTLE_SETTLE":              nil,
	"SYS_MSG":                       nil,
	"ROOM_SKIN_MSG":                 nil,
	"GUARD_ACHIEVEMENT_ROOM":        nil,
	"ANCHOR_LOT_START":              replyF.anchor_lot_start,
	"ANCHOR_LOT_CHECKSTATUS":        nil,
	"ANCHOR_LOT_END":                nil,
	"ANCHOR_LOT_AWARD":              replyF.anchor_lot_award,
	"COMBO_SEND":                    nil,
	"INTERACT_WORD":                 replyF.interact_word,
	"ACTIVITY_BANNER_UPDATE_V2":     nil,
	"NOTICE_MSG":                    nil,
	"ROOM_BANNER":                   nil,
	"ONLINERANK":                    nil,
	"WELCOME":                       nil,
	"HOUR_RANK_AWARDS":              nil,
	"ROOM_RANK":                     nil,
	"ROOM_SHIELD":                   nil,
	"USER_TOAST_MSG":                replyF.user_toast_msg,
	"WIN_ACTIVITY":                  replyF.win_activity,
	"SPECIAL_GIFT":                  replyF.special_gift,
	"GUARD_BUY":                     nil,
	"WELCOME_GUARD":                 replyF.welcome_guard,
	"DANMU_MSG":                     replyF.danmu,
	"ROOM_CHANGE":                   replyF.room_change,
	"ROOM_SILENT_OFF":               replyF.roomsilent,
	"ROOM_SILENT_ON":                replyF.roomsilent,
	"SEND_GIFT":                     replyF.send_gift,
	"ROOM_BLOCK_MSG":                replyF.room_block_msg,
	"PREPARING":                     replyF.preparing,
	"LIVE":                          replyF.live,
	"SUPER_CHAT_ENTRANCE":           nil,
	"SUPER_CHAT_MESSAGE_DELETE":     nil,
	"SUPER_CHAT_MESSAGE":            nil,
	"SUPER_CHAT_MESSAGE_JPN":        replyF.super_chat_message,
	"PANEL":                         nil,
	"ENTRY_EFFECT":                  nil,
	"ROOM_REAL_TIME_MESSAGE_UPDATE": nil,
}

Msg类型数据处理方法map

Functions

func Ass_f

func Ass_f(file string, st time.Time)

设定字幕文件名,为""时停止输出

func Assf

func Assf(s string)

传入要显示的单条字幕

func Autobanf

func Autobanf(s string) bool

func Autoskipf

func Autoskipf(s string) uint

func Danmuji_auto

func Danmuji_auto(sleep int)

func Danmujif

func Danmujif(s string)

func Gui_show

func Gui_show(m ...string)

func Heart

func Heart(b []byte)

HeartBeat类型,将人气4位byte转为字符串,并送到上述map指定的方法

func IsOn

func IsOn(s string) bool

功能开关选取函数

func Itos

func Itos(i []interface{}) string

func Jiezouf

func Jiezouf(s []string) bool

func Lessdanmuf

func Lessdanmuf(s string, bufsize int) float32

func Msg

func Msg(b []byte)

Msg类型数据处理方法挑选 识别cmd字段类型,查找上述map中设置的方法,并将json转为字符串型传入

func Msg_senddanmu

func Msg_senddanmu(msg string)

弹幕发送 传入字符串即可发送 需要cookie

func Msg_showdanmu

func Msg_showdanmu(auth interface{}, m ...string)

弹幕显示 由于额外功能有些需要显示,为了统一管理,使用此方法进行处理

func Obs_R

func Obs_R(on bool)

func Obsf

func Obsf(on bool)

func Reply

func Reply(b []byte)

返回数据分派 传入接受到的ws数据 判断进行解压,并对每个json对象进行分派

func Saveflv_wait

func Saveflv_wait()

已func形式调用,将会停止保存直播流

func Saveflvf

func Saveflvf()

已go func形式调用,将会获取直播流

func Shortdanmuf

func Shortdanmuf(s string) string

func ShowRevf

func ShowRevf()

func TTS added in v0.5.6

func TTS(uid, msg string)

Types

type Ass

type Ass struct {
	// contains filtered or unexported fields
}

Ass 弹幕转字幕

type Autoban

type Autoban struct {
	Banbuf []string
	// contains filtered or unexported fields
}

type Autoskip

type Autoskip struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type Autoskip_item added in v0.5.6

type Autoskip_item struct {
	Exprie uint
	Num    uint
}

type Danmu_mq_t

type Danmu_mq_t struct {
	// contains filtered or unexported fields
}

type Danmuji

type Danmuji struct {
	Buf        map[string]string
	Inuse_auto bool
	// contains filtered or unexported fields
}

type Jiezou

type Jiezou struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type Lessdanmu

type Lessdanmu struct {
	// contains filtered or unexported fields
}

type Obs

type Obs struct {
	Prog string //程序路径
	// contains filtered or unexported fields
}

type Saveflv

type Saveflv struct {
	// contains filtered or unexported fields
}

直播流保存

type Shortdanmu

type Shortdanmu struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL