@laplace.live/internal 1.1.100 → 1.1.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +33 -8
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -978,22 +978,22 @@ export declare namespace BilibiliInternal {
978
978
  * @link https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo?id=${room_id}&type=0
979
979
  */
980
980
  export interface GetDanmuInfo {
981
+ /**
982
+ * - 0: 正常
983
+ * - -352: 封控
984
+ */
981
985
  code: number
982
986
  message: string
983
987
  ttl: number
984
- data: {
988
+ /** 封控或错误时此字段不存在 */
989
+ data?: {
985
990
  group: string
986
991
  business_id: number
987
992
  refresh_row_factor: number
988
993
  refresh_rate: number
989
994
  max_delay: number
990
995
  token: string
991
- host_list: {
992
- host: string
993
- port: number
994
- wss_port: number
995
- ws_port: number
996
- }[]
996
+ host_list: DanmuWebSocketHost[]
997
997
  /**
998
998
  * 由 buvid 请求获取,目前已改名为 ack,用于混淆请求发,防止被滥用
999
999
  */
@@ -1025,6 +1025,16 @@ export declare namespace BilibiliInternal {
1025
1025
  }
1026
1026
  }
1027
1027
 
1028
+ /**
1029
+ * Danmaku WebSocket host info
1030
+ */
1031
+ export interface DanmuWebSocketHost {
1032
+ host: string
1033
+ port: number
1034
+ wss_port: number
1035
+ ws_port: number
1036
+ }
1037
+
1028
1038
  /**
1029
1039
  * 从直播间 DOM 中提取的直播间聚合基本信息,存在于 DOM 中,目前通过正则提取,代替之前的 `GetInfoByRoom`
1030
1040
  *
@@ -1156,9 +1166,15 @@ export declare namespace BilibiliInternal {
1156
1166
  * 获取直播间基本信息,可用于获取直播间号对应的 UID
1157
1167
  *
1158
1168
  * @example https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom?room_id=21622811&web_location=444.8&w_rid=da46145ca70fbf60e794a2ac3cdfa845&wts=1743236901
1169
+ *
1159
1170
  * @link https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom?room_id=
1171
+ * @link https://live.bilibili.com/21696950 - aza 直播间还在用
1172
+ *
1160
1173
  * @since 2024-05-24
1174
+ *
1161
1175
  * @deprecated 目前b站 **可能** 不再使用该 API,有停用风险,只有个别活动直播间(特殊背景样式,例如德云色)还会继续用
1176
+ * 通过 /blanc/21696950 可暂时强制恢复该请求调用
1177
+ *
1162
1178
  */
1163
1179
  export interface GetInfoByRoom {
1164
1180
  /**
@@ -3093,7 +3109,14 @@ export declare namespace BilibiliInternal {
3093
3109
  /**
3094
3110
  * GetRoomPlayInfo
3095
3111
  * 获取直播视频流信息,也可用于根据直播间房间号获取 UID
3112
+ *
3113
+ * May 30, 2025, 1:24:24 AM PDT 发现该接口也需要 web_location 封控
3114
+ *
3115
+ * @deprecated May 30, 2025, 1:31:07 AM PDT 该请求与 getInfoByRoom 一样,在普通直播间也已经不再使用,会直接嵌入 DOM
3116
+ * 通过 /blanc/21696950 可暂时强制恢复该请求调用
3117
+ *
3096
3118
  * @link https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id=1182221&protocol=0&format=0,1,2&codec=0&qn=10000&platform=web&ptype=8&dolby=5&panorama=1
3119
+ * @link https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id=31361500&protocol=0%2C1&format=0%2C1%2C2&codec=0%2C1%2C2&qn=10000&platform=web&ptype=8&dolby=5&panorama=1&hdr_type=0%2C1&req_reason=1&web_location=444.8&w_rid=55da3f4eb943b742d067dcc3d3616567&wts=1748589841
3097
3120
  */
3098
3121
  export interface GetRoomPlayInfo {
3099
3122
  code: number
@@ -5246,7 +5269,9 @@ export declare namespace BilibiliInternal {
5246
5269
  *
5247
5270
  * 已知无:
5248
5271
  *
5249
- * -
5272
+ * - `DANMU_MSG`
5273
+ * - `SEND_GIFT`
5274
+ * - `SUPER_CHAT_MESSAGE`
5250
5275
  */
5251
5276
  uhead_frame: {
5252
5277
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laplace.live/internal",
3
- "version": "1.1.100",
3
+ "version": "1.1.102",
4
4
  "module": "index.d.ts",
5
5
  "devDependencies": {
6
6
  "@types/bun": "latest"