@bililive-tools/douyin-recorder 1.17.1 → 1.17.3
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 +6 -0
- package/lib/stream.js +5 -5
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -45,6 +45,12 @@ function createRecorder(opts) {
|
|
|
45
45
|
quality: this.quality,
|
|
46
46
|
streamPriorities: this.streamPriorities,
|
|
47
47
|
sourcePriorities: this.sourcePriorities,
|
|
48
|
+
strictQuality: false,
|
|
49
|
+
auth: this.auth,
|
|
50
|
+
formatPriorities: this.formatPriorities,
|
|
51
|
+
doubleScreen: this.doubleScreen,
|
|
52
|
+
api: this.api,
|
|
53
|
+
uid: this.uid,
|
|
48
54
|
});
|
|
49
55
|
return res.currentStream;
|
|
50
56
|
},
|
package/lib/stream.js
CHANGED
|
@@ -39,11 +39,11 @@ export async function getStream(opts) {
|
|
|
39
39
|
api = selectRandomAPI(["userHTML", "webHTML"]);
|
|
40
40
|
}
|
|
41
41
|
if (opts.isLiveRadio) {
|
|
42
|
-
// 直播电台可能需要特殊处理,优先使用 userHTML
|
|
43
|
-
api = "
|
|
44
|
-
// 如果用户指定了
|
|
45
|
-
if (opts.api === "
|
|
46
|
-
api = "
|
|
42
|
+
// 直播电台可能需要特殊处理,优先使用 mobile 接口,某些直播间userHTML不会有数据,mobile可能更加合适
|
|
43
|
+
api = "mobile";
|
|
44
|
+
// 如果用户指定了userHTML接口,那么优先使用userHTML接口获取流信息
|
|
45
|
+
if (opts.api === "userHTML") {
|
|
46
|
+
api = "userHTML";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
const info = await getRoomInfo(opts.channelId, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bililive-tools/douyin-recorder",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.3",
|
|
4
4
|
"description": "@bililive-tools douyin recorder implemention",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lodash-es": "^4.17.21",
|
|
39
39
|
"mitt": "^3.0.1",
|
|
40
40
|
"sm-crypto": "^0.3.13",
|
|
41
|
-
"@bililive-tools/manager": "^1.17.
|
|
41
|
+
"@bililive-tools/manager": "^1.17.1",
|
|
42
42
|
"douyin-danma-listener": "0.4.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|