Skip to content

Commit

Permalink
更新信息流文档,合并数据
Browse files Browse the repository at this point in the history
合并了 SocialSisterYi#1139 (comment)
添加 PLAY_TAG
  • Loading branch information
pskdje authored Feb 23, 2025
1 parent c6fc3a9 commit 42e612d
Showing 1 changed file with 104 additions and 0 deletions.
104 changes: 104 additions & 0 deletions docs/live/message_stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -4603,6 +4603,49 @@ type===106

</details>

#### 直播进度条节点标签 (PLAY_TAG)

注: 在特定直播间的特定情况下发。

例如: 在[直播间6](https://live.bilibili.com/6)内,有人打出了某种操作。

**JSON消息:**

根对象:

| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| cmd | str | `PLAY_TAG` | |
| data | obj | 信息本体 | |

`data` 对象:

| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| tag\_id | num | 标签 ID | |
| pic | str | 标签图标 | 通常显示于进度条之上 |
| timestamp | num | UNIX 秒时间戳 | |
| type | str | 操作类型 | `ADD`:添加 |

**示例:**

<details>
<summary>查看消息示例:</summary>

```json
{
"cmd": "PLAY_TAG",
"data": {
"tag_id": 367751,
"pic": "https://i0.hdslb.com/bfs/live/0e04525fee9ea6ea6973e8bd1116d9f1f6501d37.png",
"timestamp": 1740319807,
"type": "ADD"
}
}
```

</details>

#### ??? (RECALL_DANMU_MSG)

**JSON消息:**
Expand Down Expand Up @@ -4637,3 +4680,64 @@ type===106
```

</details>

#### 直播剪辑 (OTHER_SLICE_LOADING_RESULT)

注: 点击剪辑按钮后的几秒内下发,目前只有网页端有这个按钮,且部分直播间可用(2025-02-20记录)。

**JSON消息:**

根对象:

| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| cmd | str | `OTHER_SLICE_LOADING_RESULT` | |
| data | obj | 信息本体 | |

`data` 对象:

| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| data | array | 剪辑片段数据 | |
| live_key | str | 标记直播场次的key | 未验证真实性 |

`data.data` 数组:

| 索引 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| 0 | obj | 单个片段数据 | |

`data.data[i]` 对象:

| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| start\_time | num | 片段开始时间时间戳 | UNIX 秒时间戳 |
| end\_time | num | 片段结束时间时间戳 | UNIX 秒时间戳 |
| stream | str | 从开始时间到结束时间内的直播视频片段 | 需要使用浏览器用户代理字符串,特别是m3u文件内的视频链接 |
| type | num | 类型? | |
| ban\_ec | bool | ? | |

**示例:**

<details>
<summary>查看消息示例:</summary>

```json
{
"cmd": "OTHER_SLICE_LOADING_RESULT",
"data": {
"data": [
{
"start_time": 1740037738,
"end_time": 1740038916,
"stream": "https://jssz-boss.hdslb.com/live2arc_anchor_video/vod_579433011406177273.m3u?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=y4zI4XTQzlOkmSKg%2F20250220%2Fjssz%2Fs3%2Faws4_request&X-Amz-Date=20250220T080858Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=52be315e8e7def8e11f86d3c6d4952362725c3c087a433780926bc0e8c88c2e1",
"type": 0,
"ban_ec": false
}
],
"live_key": "579433011406177273"
}
}
```

</details>

0 comments on commit 42e612d

Please sign in to comment.