@bililive-tools/manager 1.17.1 → 1.17.2
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 +1 -0
- package/lib/recorder.d.ts +3 -1
- package/lib/utils.d.ts +6 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
package/lib/recorder.d.ts
CHANGED
|
@@ -52,6 +52,8 @@ export interface RecorderCreateOpts<E extends AnyObject = UnknownObject> {
|
|
|
52
52
|
* 2. 正则表达式:'/pattern/flags'(如:'/回放|录播/i')
|
|
53
53
|
*/
|
|
54
54
|
titleKeywords?: string;
|
|
55
|
+
/** B站直播间标题变更时分段 */
|
|
56
|
+
segmentOnTitleChange?: boolean;
|
|
55
57
|
/** 用于指定录制文件格式,auto时,分段使用ts,不分段使用mp4 */
|
|
56
58
|
videoFormat?: "auto" | "ts" | "mkv" | "flv";
|
|
57
59
|
/** 录制类型 */
|
|
@@ -70,7 +72,7 @@ export interface RecorderCreateOpts<E extends AnyObject = UnknownObject> {
|
|
|
70
72
|
/** 调试等级 */
|
|
71
73
|
debugLevel?: "none" | "basic" | "verbose";
|
|
72
74
|
}
|
|
73
|
-
export type SerializedRecorder<E extends AnyObject> = PickRequired<RecorderCreateOpts<E>, "id"> & Pick<Recorder<E>, "id" | "channelId" | "remarks" | "disableAutoCheck" | "quality" | "streamPriorities" | "sourcePriorities" | "extra" | "segment" | "saveSCDanma" | "saveCover" | "convert2Mp4" | "saveGiftDanma" | "disableProvideCommentsWhenRecording" | "liveInfo" | "uid" | "titleKeywords">;
|
|
75
|
+
export type SerializedRecorder<E extends AnyObject> = PickRequired<RecorderCreateOpts<E>, "id"> & Pick<Recorder<E>, "id" | "channelId" | "remarks" | "disableAutoCheck" | "quality" | "streamPriorities" | "sourcePriorities" | "extra" | "segment" | "saveSCDanma" | "saveCover" | "convert2Mp4" | "saveGiftDanma" | "disableProvideCommentsWhenRecording" | "liveInfo" | "uid" | "titleKeywords" | "segmentOnTitleChange">;
|
|
74
76
|
/** 录制状态,idle: 空闲中,recording: 录制中,stopping-record: 停止录制中,check-error: 检查错误,title-blocked: 标题黑名单,charge-skipped: 充电直播(DRM加密)已跳过 */
|
|
75
77
|
export type RecorderState = "idle" | "recording" | "stopping-record" | "check-error" | "title-blocked" | "charge-skipped";
|
|
76
78
|
export type Progress = {
|
package/lib/utils.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export declare function createTimeoutChecker(onTimeout: () => void, time: number
|
|
|
61
61
|
start: () => void;
|
|
62
62
|
};
|
|
63
63
|
export declare function downloadImage(imageUrl: string, savePath: string): Promise<void>;
|
|
64
|
+
declare const md5: (str: string) => string;
|
|
65
|
+
declare const uuid: () => `${string}-${string}-${string}-${string}-${string}`;
|
|
64
66
|
/**
|
|
65
67
|
* 根据指定的顺序对对象数组进行排序
|
|
66
68
|
* @param objects 要排序的对象数组
|
|
@@ -133,15 +135,15 @@ declare const _default: {
|
|
|
133
135
|
createFFmpegInvalidStreamChecker: typeof createFFmpegInvalidStreamChecker;
|
|
134
136
|
createTimeoutChecker: typeof createTimeoutChecker;
|
|
135
137
|
downloadImage: typeof downloadImage;
|
|
136
|
-
md5:
|
|
137
|
-
uuid:
|
|
138
|
+
md5: typeof md5;
|
|
139
|
+
uuid: typeof uuid;
|
|
138
140
|
sortByKeyOrder: typeof sortByKeyOrder;
|
|
139
141
|
retry: typeof retry;
|
|
140
|
-
isBetweenTimeRange:
|
|
142
|
+
isBetweenTimeRange: typeof isBetweenTimeRange;
|
|
141
143
|
hasBlockedTitleKeywords: typeof hasBlockedTitleKeywords;
|
|
142
144
|
shouldCheckTitleKeywords: typeof shouldCheckTitleKeywords;
|
|
143
145
|
shouldUseStrictQuality: typeof shouldUseStrictQuality;
|
|
144
|
-
sleep:
|
|
146
|
+
sleep: typeof sleep;
|
|
145
147
|
checkTitleKeywordsWhileRecording: typeof checkTitleKeywordsWhileRecording;
|
|
146
148
|
checkTitleKeywordsBeforeRecord: typeof checkTitleKeywordsBeforeRecord;
|
|
147
149
|
};
|