Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[新增/更新请求] 直播间信息流cmd "ANCHOR_ECOLOGY_LIVING_DIALOG"、"CUT_OFF_V2"等,共4个 #1139

Open
1 task done
pskdje opened this issue Nov 14, 2024 · 4 comments
Labels
新增/Add 添加或修改新的内容 直播/Live 接口:直播

Comments

@pskdje
Copy link

pskdje commented Nov 14, 2024

提交前请确认

  • 我已检索仓库中文档,不包含所提及内容,或所提及内容在本仓库中存在错误,且 Issues、Pull Requests 中无相关提交

API 来源

Web 端(含 h5)

API 类型

长连接数据帧(含 ws、TCP)

API 地址

https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/live/message_stream.md

详情描述

直播间收到警告的时候获得了该数据包。

cmd "ANCHOR_ECOLOGY_LIVING_DIALOG"

处罚提示video

数据包正文
{
	
	"cmd": "ANCHOR_ECOLOGY_LIVING_DIALOG",
	"data": {
		"dialog_scene": 1,
		"timestamp": 1731504845,
		"valid_timestamp": 0,
		"dialog_top_vertical_img": "https://i0.hdslb.com/bfs/live/ee359d3e89bb044914f72a557a4ac2d3b5ba4004.png",
		"dialog_top_landscape_img": "https://i0.hdslb.com/bfs/live/ee359d3e89bb044914f72a557a4ac2d3b5ba4004.png",
		"dialog_title": "直播间违规",
		"dialog_message_list": [
			{
				"type": 1,
				"label": "处罚结果",
				"content": "警告"
			},
			{
				"type": 1,
				"label": "违规原因",
				"content": "您本场直播存在挂机、录播等消极直播行为,请及时整改"
			},
			{
				"type": 1,
				"label": "处罚时间",
				"content": "2024年11月13日21时34分"
			}
		],
		"dialog_tip_list": [
			{
				"show_platform": [
					1,
					2
				],
				"message_list": [
					{
						"type": 1,
						"content": "请在",
						"link_url": ""
					},
					{
						"type": 2,
						"content": "【处罚中心】",
						"link_url": "https://live.bilibili.com/p/html/live-anchor-galaxy/violation_records/mobile.html?is_live_half_webview=1u0026hybrid_rotate_d=1u0026is_cling_player=1u0026hybrid_half_ui=1,3,100p,70p,0,1,30,100;2,2,375,100p,0,1,30,100;3,3,100p,70p,0,1,30,100;4,2,375,100p,0,1,30,100;5,3,100p,70p,0,1,30,100;6,3,100p,70p,0,1,30,100;7,3,100p,70p,0,1,30,100;8,3,100p,70p,0,1,30,100#/"
					},
					{
						"type": 1,
						"content": "查看你的违规记录",
						"link_url": ""
					}
				]
			},
			{
				"show_platform": [
					3,
					4
				],
				"message_list": [
					{
						"type": 1,
						"content": "请在",
						"link_url": ""
					},
					{
						"type": 2,
						"content": "【处罚中心】",
						"link_url": "https://link.bilibili.com/#/my-room/violation-records?jump_type=browser&app_common=open"
					},
					{
						"type": 1,
						"content": "查看你的违规记录",
						"link_url": ""
					}
				]
			}
		],
		"dialog_button_list": [
			{
				"show_platform": [
					1,
					2,
					3,
					4
				],
				"button_text": "我知道了",
				"button_action": 1,
				"button_link_url": ""
			}
		]
	}
}

部分字段推测

data
名称 类型 推测
timestamp int 秒时间戳
dialog_title str 对话框标题
dialog_message_list array 对话框内容列表
dialog_tip_list array 对话框提示列表
dialog_button_list array 对话框按钮列表
data.dialog_message_list中的内部对象
名称 类型 推测
type num 展示类型
1:标签内容对
label str 标签
content str 内容
data.dialog_tip_list中的内部对象

show_platform 似乎为要显示设备的指代,一个数字数组,34有一个是指代网页直播姬(也可能是全部)。

message_list 提示信息列表,网页直播姬是统一合成一行。(下面列表为该对象的)

名称 类型 推测
type int 显示类型
1:纯文本
2:链接
content str 文本或链接的内容
link_url str 链接,type===1时为空字符串
data.dialog_button_list中的内部对象
名称 类型 推测
show_platform array[num] 同上
button_text str 按钮文本
button_action num 推测: 按钮操作
button_link_url str 推测: 按钮链接
附注 原文件手贱变成锟斤拷了,现在这些中文文本都是通过回放复原的。

其它cmd索引

CUT_OFF_V2
room_admin_entranceROOM_ADMIN_REVOKE

@pskdje
Copy link
Author

pskdje commented Nov 14, 2024

抓到了新的警告数据包,要不要也放在这个issue里…

@wuziqian211
Copy link
Contributor

抓到了新的警告数据包,要不要也放在这个issue里…

可以的

pskdje referenced this issue in pskdje/bili-tol-gs Nov 15, 2024
pararg增加位置参数args,用于调试和测试模块驱接
等完全确定了再更新默认的colir_cmd_handle吧
(但愿不要忘了)
@pskdje pskdje changed the title [新增/更新请求] 直播间信息流cmd "ANCHOR_ECOLOGY_LIVING_DIALOG" [新增/更新请求] 直播间信息流cmd "ANCHOR_ECOLOGY_LIVING_DIALOG" "CUT_OFF_V2" Nov 15, 2024
@pskdje
Copy link
Author

pskdje commented Nov 15, 2024

cmd CUT_OFF_V2

当直播间被切断时会下发该数据包。

消息结构与"ANCHOR_ECOLOGY_LIVING_DIALOG"有相似之处。

{
	"cmd": "CUT_OFF_V2",
	"data": {
		"cut_off_scene": 1,
		"timestamp": 1731590280,
		"cut_off_version": 1,
		"cut_off_data": {
			"cut_off_title": "违规提示",
			"cut_off_message_list": [
				{
					"type": 1,
					"label": "处罚结果",
					"content": "切断本场直播"
				},
				{
					"type": 1,
					"label": "违规原因",
					"content": "您本场直播存在挂机、录播等消极直播行为,因此直播被切断,请您及时整改"
				},
				{
					"type": 1,
					"label": "处罚时间",
					"content": "2024年11月14日21时17分"
				}
			],
			"cut_off_tip_list": [
				{
					"show_platform": [
						3,
						4
					],
					"message_list": [
						{
							"type": 1,
							"content": "请在",
							"link_url": ""
						},
						{
							"type": 2,
							"content": "【处罚中心】",
							"link_url": "https://link.bilibili.com/p/center/index?my-room/violation-records#/my-room/violation-records"
						},
						{
							"type": 1,
							"content": "查看你的违规记录",
							"link_url": ""
						}
					]
				}
			],
			"cut_off_button_list": [
				{
					"show_platform": [
						1,
						2
					],
					"button_text": "了解详情",
					"button_action": 2,
					"button_link_url": "https://live.bilibili.com/p/html/live-anchor-galaxy/violation_records/mobile.html?-Abrowser=live&is_live_webview=1"
				},
				{
					"show_platform": [
						3,
						4
					],
					"button_text": "我知道了",
					"button_action": 1,
					"button_link_url": ""
				}
			]
		}
	}
}

部分字段推测

data

名称 类型 推测
timestamp int 秒时间戳
cut_off_version num 推测: 版本
cut_off_data object 弹窗内容

data.cut_off_data

名称 类型 推测
cut_off_title str 窗口标题
cut_off_message_list array 窗口内容列表
cut_off_tip_list array 窗口提示列表
cut_off_button_list array 窗口按钮列表

data.cut_off_data.cut_off_message_list

ANCHOR_ECOLOGY_LIVING_DIALOGdata.dialog_message_list相同。

data.cut_off_data.cut_off_tip_list

ANCHOR_ECOLOGY_LIVING_DIALOGdata.dialog_tip_list相同。

data.cut_off_data.cut_off_button_list

ANCHOR_ECOLOGY_LIVING_DIALOGdata.dialog_button_list相同。

@z0z0r4 z0z0r4 added 新增/Add 添加或修改新的内容 直播/Live 接口:直播 labels Nov 23, 2024
@pskdje
Copy link
Author

pskdje commented Nov 25, 2024

cmd room_admin_entrance (注意:这个是小写)

当任命某位用户为房管下发此包。

任命bishi为房管:

{
	"cmd": "room_admin_entrance",
	"dmscore": 60,
	"level": 1,
	"msg": "系统提示:你已被主播设为房管",
	"uid": 1
}
名称 类型 推测
msg str 被封为房管的那位用户显示的提示
uid int 用户uid

cmd ROOM_ADMIN_REVOKE

当撤销某位用户的房管权限时下发此包。

撤销bishi房管:

{
	"cmd": "ROOM_ADMIN_REVOKE",
	"msg": "撤销房管",
	"uid": 1
}
名称 类型 推测
uid int 用户uid

@pskdje pskdje changed the title [新增/更新请求] 直播间信息流cmd "ANCHOR_ECOLOGY_LIVING_DIALOG" "CUT_OFF_V2" [新增/更新请求] 直播间信息流cmd "ANCHOR_ECOLOGY_LIVING_DIALOG"、"CUT_OFF_V2"等,共4个 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
新增/Add 添加或修改新的内容 直播/Live 接口:直播
Projects
None yet
Development

No branches or pull requests

3 participants