@bililive-tools/huya-recorder 1.6.0 → 1.7.1
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.
- package/lib/index.js +13 -6
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -77,10 +77,17 @@ const ffmpegInputOptions = [
|
|
|
77
77
|
const checkLiveStatusAndRecord = async function ({ getSavePath, banLiveId, isManualStart, }) {
|
|
78
78
|
if (this.recordHandle != null)
|
|
79
79
|
return this.recordHandle;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
try {
|
|
81
|
+
const liveInfo = await getInfo(this.channelId);
|
|
82
|
+
this.liveInfo = liveInfo;
|
|
83
|
+
this.state = "idle";
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
this.state = "check-error";
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
const { living, owner, title } = this.liveInfo;
|
|
90
|
+
if (this.liveInfo.liveId === banLiveId) {
|
|
84
91
|
this.tempStopIntervalCheck = true;
|
|
85
92
|
}
|
|
86
93
|
else {
|
|
@@ -116,7 +123,7 @@ const checkLiveStatusAndRecord = async function ({ getSavePath, banLiveId, isMan
|
|
|
116
123
|
catch (err) {
|
|
117
124
|
if (this.qualityRetry > 0)
|
|
118
125
|
this.qualityRetry -= 1;
|
|
119
|
-
this.state = "
|
|
126
|
+
this.state = "check-error";
|
|
120
127
|
throw err;
|
|
121
128
|
}
|
|
122
129
|
this.state = "recording";
|
|
@@ -178,7 +185,7 @@ const checkLiveStatusAndRecord = async function ({ getSavePath, banLiveId, isMan
|
|
|
178
185
|
extraDataController?.setMeta({
|
|
179
186
|
room_id: this.channelId,
|
|
180
187
|
platform: provider?.id,
|
|
181
|
-
liveStartTimestamp: liveInfo
|
|
188
|
+
liveStartTimestamp: this?.liveInfo?.startTime?.getTime(),
|
|
182
189
|
// recordStopTimestamp: Date.now(),
|
|
183
190
|
title: title,
|
|
184
191
|
user_name: owner,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bililive-tools/huya-recorder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "bililive-tools huya recorder implemention",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"mitt": "^3.0.1",
|
|
38
38
|
"lodash-es": "^4.17.21",
|
|
39
39
|
"axios": "^1.7.8",
|
|
40
|
-
"@bililive-tools/manager": "^1.6.
|
|
40
|
+
"@bililive-tools/manager": "^1.6.1",
|
|
41
41
|
"huya-danma-listener": "0.1.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {},
|