@apocaliss92/nodelink-js 0.2.1 → 0.2.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/README.md +1 -1
- package/dist/{DiagnosticsTools-NUMCYEKQ.js → DiagnosticsTools-FNLGCOVA.js} +2 -2
- package/dist/{chunk-YPU7RAEY.js → chunk-NLTB7GTA.js} +17 -1
- package/dist/{chunk-YPU7RAEY.js.map → chunk-NLTB7GTA.js.map} +1 -1
- package/dist/{chunk-PCPEXOWB.js → chunk-RWYEGEWG.js} +832 -224
- package/dist/chunk-RWYEGEWG.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +829 -221
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +853 -223
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +239 -12
- package/dist/index.d.ts +253 -11
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-PCPEXOWB.js.map +0 -1
- /package/dist/{DiagnosticsTools-NUMCYEKQ.js.map → DiagnosticsTools-FNLGCOVA.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1322,8 +1322,12 @@ export declare class BaichuanRtspServer extends EventEmitter<{
|
|
|
1322
1322
|
private tempStreamGenerator;
|
|
1323
1323
|
private nativeFanout;
|
|
1324
1324
|
private noClientAutoStopTimer;
|
|
1325
|
+
private readonly PREBUFFER_MAX_MS;
|
|
1326
|
+
private prebuffer;
|
|
1325
1327
|
private static isAdtsAacFrame;
|
|
1326
1328
|
private static parseAdtsSamplingInfo;
|
|
1329
|
+
/** Returns true if the raw (packed/Annex B) frame is an IDR (H.264) or IRAP (H.265). */
|
|
1330
|
+
private isRawFrameKeyframe;
|
|
1327
1331
|
private static parseInterleavedChannels;
|
|
1328
1332
|
private static splitAnnexBNals;
|
|
1329
1333
|
private static stripAdtsHeader;
|
|
@@ -1837,6 +1841,10 @@ export declare const BC_CMD_ID_COVER_STANDALONE_461 = 461;
|
|
|
1837
1841
|
|
|
1838
1842
|
export declare const BC_CMD_ID_COVER_STANDALONE_462 = 462;
|
|
1839
1843
|
|
|
1844
|
+
export declare const BC_CMD_ID_DING_DONG_CTRL = 483;
|
|
1845
|
+
|
|
1846
|
+
export declare const BC_CMD_ID_DING_DONG_OPT = 485;
|
|
1847
|
+
|
|
1840
1848
|
export declare const BC_CMD_ID_FILE_INFO_LIST_CLOSE = 16;
|
|
1841
1849
|
|
|
1842
1850
|
export declare const BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO = 8;
|
|
@@ -1883,6 +1891,12 @@ export declare const BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD = 296;
|
|
|
1883
1891
|
|
|
1884
1892
|
export declare const BC_CMD_ID_GET_DAY_RECORDS = 142;
|
|
1885
1893
|
|
|
1894
|
+
export declare const BC_CMD_ID_GET_DING_DONG_CFG = 486;
|
|
1895
|
+
|
|
1896
|
+
export declare const BC_CMD_ID_GET_DING_DONG_LIST = 484;
|
|
1897
|
+
|
|
1898
|
+
export declare const BC_CMD_ID_GET_DING_DONG_SILENT = 609;
|
|
1899
|
+
|
|
1886
1900
|
export declare const BC_CMD_ID_GET_EMAIL_TASK = 217;
|
|
1887
1901
|
|
|
1888
1902
|
export declare const BC_CMD_ID_GET_FTP_TASK = 70;
|
|
@@ -1962,12 +1976,18 @@ export declare const BC_CMD_ID_PUSH_SLEEP_STATUS = 623;
|
|
|
1962
1976
|
|
|
1963
1977
|
export declare const BC_CMD_ID_PUSH_VIDEO_INPUT = 78;
|
|
1964
1978
|
|
|
1979
|
+
export declare const BC_CMD_ID_QUICK_REPLY_PLAY = 349;
|
|
1980
|
+
|
|
1965
1981
|
export declare const BC_CMD_ID_SET_AI_ALARM = 343;
|
|
1966
1982
|
|
|
1967
1983
|
export declare const BC_CMD_ID_SET_AI_CFG = 300;
|
|
1968
1984
|
|
|
1969
1985
|
export declare const BC_CMD_ID_SET_AUDIO_TASK = 231;
|
|
1970
1986
|
|
|
1987
|
+
export declare const BC_CMD_ID_SET_DING_DONG_CFG = 487;
|
|
1988
|
+
|
|
1989
|
+
export declare const BC_CMD_ID_SET_DING_DONG_SILENT = 610;
|
|
1990
|
+
|
|
1971
1991
|
export declare const BC_CMD_ID_SET_MOTION_ALARM = 47;
|
|
1972
1992
|
|
|
1973
1993
|
export declare const BC_CMD_ID_SET_PIR_INFO = 213;
|
|
@@ -2869,6 +2889,39 @@ export declare interface ChannelStreamMetadata {
|
|
|
2869
2889
|
rawXml?: string;
|
|
2870
2890
|
}
|
|
2871
2891
|
|
|
2892
|
+
/** Per-event alarm config entry inside a chime's GetDingDongCfg response. */
|
|
2893
|
+
export declare interface ChimeAlarmCfg {
|
|
2894
|
+
/** Whether this event type triggers the chime: 0 = off, 1 = on */
|
|
2895
|
+
valid: number;
|
|
2896
|
+
/** Ringtone / music ID */
|
|
2897
|
+
musicId: number;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
/** Per-chime config from GetDingDongCfg. */
|
|
2901
|
+
export declare interface ChimeCfg {
|
|
2902
|
+
/** Chime ring ID */
|
|
2903
|
+
id: number;
|
|
2904
|
+
/** Map of event type string → alarm config */
|
|
2905
|
+
type: Record<string, ChimeAlarmCfg>;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
/** A paired wireless chime device as returned by GetDingDongList. */
|
|
2909
|
+
export declare interface ChimeDevice {
|
|
2910
|
+
id: number;
|
|
2911
|
+
name: string;
|
|
2912
|
+
/** 0 = offline, 1 = online */
|
|
2913
|
+
netState: number;
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
/** Wireless chime parameters returned by DingDongOpt (option 2 / getParam). */
|
|
2917
|
+
export declare interface ChimeParams {
|
|
2918
|
+
name?: string;
|
|
2919
|
+
/** Volume level (0-4 typical) */
|
|
2920
|
+
volLevel?: number;
|
|
2921
|
+
/** LED state: 0 = off, 1 = on */
|
|
2922
|
+
ledState?: number;
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2872
2925
|
export declare function collectCgiDiagnostics(params: {
|
|
2873
2926
|
cgi: ReolinkCgiApi;
|
|
2874
2927
|
channel?: number;
|
|
@@ -3424,6 +3477,8 @@ export declare interface DeviceCapabilities {
|
|
|
3424
3477
|
isDoorbell: boolean;
|
|
3425
3478
|
/** True when device supports autotracking (smartTrack in AiCfg). */
|
|
3426
3479
|
hasAutotracking: boolean;
|
|
3480
|
+
/** True when device is a doorbell (can potentially support wireless chime) or has dingDong abilities explicitly detected. */
|
|
3481
|
+
hasWirelessChime: boolean;
|
|
3427
3482
|
}
|
|
3428
3483
|
|
|
3429
3484
|
export declare type DeviceCapabilitiesCacheEntry = {
|
|
@@ -3456,6 +3511,12 @@ export declare interface DeviceCapabilitiesDebugInfo {
|
|
|
3456
3511
|
supportPirSch?: number;
|
|
3457
3512
|
/** Selected SupportItem chnID */
|
|
3458
3513
|
supportItemChnID?: number;
|
|
3514
|
+
/** Wireless chime IDs from GetDingDongList (cmd 484) */
|
|
3515
|
+
dingDongListIds?: number[];
|
|
3516
|
+
/** Wireless chime IDs from GetDingDongCfg (cmd 486) */
|
|
3517
|
+
dingDongCfgIds?: number[];
|
|
3518
|
+
/** Error message if chime discovery failed */
|
|
3519
|
+
wirelessChimeError?: string;
|
|
3459
3520
|
}
|
|
3460
3521
|
|
|
3461
3522
|
export declare interface DeviceCapabilitiesResult {
|
|
@@ -3880,6 +3941,8 @@ export declare interface GetRecordingVideoStats {
|
|
|
3880
3941
|
hasAudio: boolean;
|
|
3881
3942
|
}
|
|
3882
3943
|
|
|
3944
|
+
export declare function getSupportItemForChannel(support: SupportInfo | undefined, channel: number): SupportItem | undefined;
|
|
3945
|
+
|
|
3883
3946
|
/**
|
|
3884
3947
|
* Extract client info from HTTP request headers.
|
|
3885
3948
|
*/
|
|
@@ -3970,6 +4033,16 @@ export declare class H265RtpDepacketizer {
|
|
|
3970
4033
|
push(payload: Buffer): Buffer[];
|
|
3971
4034
|
}
|
|
3972
4035
|
|
|
4036
|
+
/** Hardwired (wired-in) chime state from GetDingDongCtrl / SetDingDongCtrl. */
|
|
4037
|
+
export declare interface HardwiredChimeState {
|
|
4038
|
+
/** Chime type string (e.g. "dingdong", "single", "dual") */
|
|
4039
|
+
type: string;
|
|
4040
|
+
/** Whether the chime is enabled */
|
|
4041
|
+
enabled: boolean;
|
|
4042
|
+
/** Duration / timing value */
|
|
4043
|
+
time: number;
|
|
4044
|
+
}
|
|
4045
|
+
|
|
3973
4046
|
/**
|
|
3974
4047
|
* H.265/HEVC Format Converter
|
|
3975
4048
|
* Converts H.265 data from length-prefixed (HVCC) to Annex-B (start codes).
|
|
@@ -4698,6 +4771,11 @@ export declare class ReolinkBaichuanApi {
|
|
|
4698
4771
|
private readonly host;
|
|
4699
4772
|
private readonly username;
|
|
4700
4773
|
private readonly password;
|
|
4774
|
+
/**
|
|
4775
|
+
* Set to `true` after `close()` is called.
|
|
4776
|
+
* Once closed, the API instance should not be reused.
|
|
4777
|
+
*/
|
|
4778
|
+
private _closed;
|
|
4701
4779
|
/**
|
|
4702
4780
|
* Socket pool with tag-based allocation strategy.
|
|
4703
4781
|
* Tags determine which sockets are shared vs dedicated:
|
|
@@ -4722,6 +4800,46 @@ export declare class ReolinkBaichuanApi {
|
|
|
4722
4800
|
* This getter maintains backward compatibility with existing code that uses `this.client`.
|
|
4723
4801
|
*/
|
|
4724
4802
|
get client(): BaichuanClient;
|
|
4803
|
+
/**
|
|
4804
|
+
* `true` after `close()` has been called. A closed API should not be reused;
|
|
4805
|
+
* the consumer should create a new instance.
|
|
4806
|
+
*/
|
|
4807
|
+
get isClosed(): boolean;
|
|
4808
|
+
/**
|
|
4809
|
+
* `true` when the API is usable: not closed, general socket exists, socket
|
|
4810
|
+
* is connected and the client is logged in.
|
|
4811
|
+
*
|
|
4812
|
+
* This is the recommended way for consumers to check whether the API is
|
|
4813
|
+
* still valid before issuing commands, instead of directly accessing
|
|
4814
|
+
* `api.client.isSocketConnected()` / `api.client.loggedIn` (which throws
|
|
4815
|
+
* if the socket pool was already destroyed).
|
|
4816
|
+
*/
|
|
4817
|
+
get isReady(): boolean;
|
|
4818
|
+
/** Promise tracking an in-flight reconnection from `ensureConnected()`. */
|
|
4819
|
+
private _ensureConnectedPromise;
|
|
4820
|
+
/**
|
|
4821
|
+
* Ensure the "general" socket is connected and logged in.
|
|
4822
|
+
* If the socket is disconnected or the pool entry was destroyed, a new
|
|
4823
|
+
* general socket is created, logged in, and all event/push/guard listeners
|
|
4824
|
+
* are re-attached automatically.
|
|
4825
|
+
*
|
|
4826
|
+
* This is a **no-op** when the API is already {@link isReady}.
|
|
4827
|
+
*
|
|
4828
|
+
* @throws If `close()` was called — the API is permanently closed and a new
|
|
4829
|
+
* instance must be created.
|
|
4830
|
+
*/
|
|
4831
|
+
ensureConnected(): Promise<void>;
|
|
4832
|
+
/**
|
|
4833
|
+
* Internal: destroy the current general socket (if any), create a new one,
|
|
4834
|
+
* login, and re-attach all listeners.
|
|
4835
|
+
*/
|
|
4836
|
+
private reconnectGeneralSocket;
|
|
4837
|
+
/**
|
|
4838
|
+
* Attach event, push, channelInfo, and guard listeners to the current
|
|
4839
|
+
* "general" client. Called from the constructor and from
|
|
4840
|
+
* {@link reconnectGeneralSocket}.
|
|
4841
|
+
*/
|
|
4842
|
+
private setupGeneralClientListeners;
|
|
4725
4843
|
/**
|
|
4726
4844
|
* Cached camera UID. May be initially undefined if not provided in the constructor.
|
|
4727
4845
|
* Will be lazily populated on demand when needed (e.g. for recordings).
|
|
@@ -5360,11 +5478,19 @@ export declare class ReolinkBaichuanApi {
|
|
|
5360
5478
|
* Minimal per-channel inventory for NVR-connected devices.
|
|
5361
5479
|
*
|
|
5362
5480
|
* Intended to be fast: avoids AI/abilities and returns only the common identity + battery hints.
|
|
5481
|
+
*
|
|
5482
|
+
* @param options.source - Data source for the channel list (default: `"cgi"`):
|
|
5483
|
+
* - `"cgi"`: Uses HTTP `GetChannelstatus` — returns the channel list immediately,
|
|
5484
|
+
* no dependency on async push messages. Recommended for first-call discovery.
|
|
5485
|
+
* - `"baichuan"`: Uses the cmd_id 145 push cache populated when the NVR sends channel
|
|
5486
|
+
* info after login + event subscription. This push is *asynchronous*: if it has not
|
|
5487
|
+
* arrived yet, the result will have zero channels. Callers must retry (nvr.ts does this
|
|
5488
|
+
* with a 1-second loop). Note: explicitly requesting cmd_id 145 is not supported.
|
|
5363
5489
|
*/
|
|
5364
5490
|
getNvrChannelsSummary(options?: {
|
|
5365
5491
|
channels?: number[];
|
|
5366
5492
|
timeoutMs?: number;
|
|
5367
|
-
source?: "
|
|
5493
|
+
source?: "cgi" | "baichuan";
|
|
5368
5494
|
}): Promise<NvrChannelsSummaryCacheEntry>;
|
|
5369
5495
|
/**
|
|
5370
5496
|
* Group NVR/HUB channels by physical device (best-effort).
|
|
@@ -6413,16 +6539,6 @@ export declare class ReolinkBaichuanApi {
|
|
|
6413
6539
|
* Clear the device capabilities cache for a specific channel or all channels.
|
|
6414
6540
|
*/
|
|
6415
6541
|
clearCapabilitiesCache(channel?: number): void;
|
|
6416
|
-
/**
|
|
6417
|
-
* Pick the best SupportItem for a channel.
|
|
6418
|
-
* Prefers items without a name (capability items) over named items (googleHome, amazonAlexa).
|
|
6419
|
-
*/
|
|
6420
|
-
private pickBestSupportItem;
|
|
6421
|
-
/**
|
|
6422
|
-
* Parse device capabilities from SupportInfo.
|
|
6423
|
-
* Uses SupportInfo as the single source of truth with AbilityInfo as fallback.
|
|
6424
|
-
*/
|
|
6425
|
-
private parseCapabilitiesFromSupport;
|
|
6426
6542
|
/**
|
|
6427
6543
|
* Parse support features from SupportInfo.
|
|
6428
6544
|
*/
|
|
@@ -7306,6 +7422,119 @@ export declare class ReolinkBaichuanApi {
|
|
|
7306
7422
|
* ```
|
|
7307
7423
|
*/
|
|
7308
7424
|
standaloneGetSnapshot(): Promise<Buffer>;
|
|
7425
|
+
/**
|
|
7426
|
+
* Get the list of paired wireless chime devices.
|
|
7427
|
+
* cmd_id: 484 (GetDingDongList)
|
|
7428
|
+
*
|
|
7429
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7430
|
+
* @returns Array of paired chime devices
|
|
7431
|
+
*/
|
|
7432
|
+
getDingDongList(channel?: number): Promise<ChimeDevice[]>;
|
|
7433
|
+
/**
|
|
7434
|
+
* Get parameters (name, volume, LED state) for a specific wireless chime.
|
|
7435
|
+
* cmd_id: 485 (DingDongOpt, option getParam)
|
|
7436
|
+
*
|
|
7437
|
+
* @param chimeId - The chime device ID
|
|
7438
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7439
|
+
* @returns Chime parameters
|
|
7440
|
+
*/
|
|
7441
|
+
getDingDongParams(chimeId: number, channel?: number): Promise<ChimeParams>;
|
|
7442
|
+
/**
|
|
7443
|
+
* Set parameters (name, volume, LED state) for a specific wireless chime.
|
|
7444
|
+
* cmd_id: 485 (DingDongOpt, option setParam)
|
|
7445
|
+
*
|
|
7446
|
+
* @param chimeId - The chime device ID
|
|
7447
|
+
* @param params - Parameters to set (volLevel, ledState, name)
|
|
7448
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7449
|
+
*/
|
|
7450
|
+
setDingDongParams(chimeId: number, params: {
|
|
7451
|
+
volLevel?: number;
|
|
7452
|
+
ledState?: number;
|
|
7453
|
+
name?: string;
|
|
7454
|
+
}, channel?: number): Promise<void>;
|
|
7455
|
+
/**
|
|
7456
|
+
* Trigger a wireless chime to ring with a specific ringtone.
|
|
7457
|
+
* cmd_id: 485 (DingDongOpt, option ringWithMusic)
|
|
7458
|
+
*
|
|
7459
|
+
* @param chimeId - The chime device ID
|
|
7460
|
+
* @param musicId - The ringtone/music ID to play
|
|
7461
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7462
|
+
*/
|
|
7463
|
+
ringDingDong(chimeId: number, musicId: number, channel?: number): Promise<void>;
|
|
7464
|
+
/**
|
|
7465
|
+
* Get the per-event alarm configuration for paired wireless chimes.
|
|
7466
|
+
* cmd_id: 486 (GetDingDongCfg)
|
|
7467
|
+
*
|
|
7468
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7469
|
+
* @returns Array of chime configurations (one per paired chime)
|
|
7470
|
+
*/
|
|
7471
|
+
getDingDongCfg(channel?: number): Promise<ChimeCfg[]>;
|
|
7472
|
+
/**
|
|
7473
|
+
* Set the per-event alarm configuration for a specific wireless chime.
|
|
7474
|
+
* cmd_id: 487 (SetDingDongCfg)
|
|
7475
|
+
*
|
|
7476
|
+
* @param chimeId - The chime ring/device ID
|
|
7477
|
+
* @param eventType - Event type string (e.g. "doorbell", "package", "people")
|
|
7478
|
+
* @param state - 0 = disabled, 1 = enabled
|
|
7479
|
+
* @param musicId - Ringtone ID to use for this event type
|
|
7480
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7481
|
+
*/
|
|
7482
|
+
setDingDongCfg(chimeId: number, eventType: string, state: 0 | 1, musicId: number, channel?: number): Promise<void>;
|
|
7483
|
+
/** Cache of last known hardwired chime state per channel, used to avoid re-fetching on every set. */
|
|
7484
|
+
private _hardwiredChimeCache;
|
|
7485
|
+
/**
|
|
7486
|
+
* Get the hardwired (wired-in) chime state.
|
|
7487
|
+
* cmd_id: 483 (GetDingDongCtrl)
|
|
7488
|
+
*
|
|
7489
|
+
* Note: calling this may briefly trigger the physical chime to rattle.
|
|
7490
|
+
*
|
|
7491
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7492
|
+
* @returns Hardwired chime state (type, enabled, time)
|
|
7493
|
+
*/
|
|
7494
|
+
getHardwiredChime(channel?: number): Promise<HardwiredChimeState>;
|
|
7495
|
+
/**
|
|
7496
|
+
* Set the hardwired (wired-in) chime state.
|
|
7497
|
+
* cmd_id: 483 (SetDingDongCtrl)
|
|
7498
|
+
*
|
|
7499
|
+
* Uses the cached state from a previous getHardwiredChime call to fill in
|
|
7500
|
+
* missing type/time fields, avoiding a double round-trip on every set.
|
|
7501
|
+
* Falls back to fetching if no cache is available.
|
|
7502
|
+
*
|
|
7503
|
+
* @param params - Chime configuration (type, enabled, time)
|
|
7504
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7505
|
+
*/
|
|
7506
|
+
setHardwiredChime(params: {
|
|
7507
|
+
type?: string | undefined;
|
|
7508
|
+
enabled: boolean;
|
|
7509
|
+
time?: number;
|
|
7510
|
+
}, channel?: number): Promise<HardwiredChimeState>;
|
|
7511
|
+
/**
|
|
7512
|
+
* Play an audio file on the doorbell / chime device.
|
|
7513
|
+
* cmd_id: 349 (QuickReplyPlay)
|
|
7514
|
+
*
|
|
7515
|
+
* @param fileId - The audio file ID to play
|
|
7516
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7517
|
+
*/
|
|
7518
|
+
quickReplyPlay(fileId: number, channel?: number): Promise<void>;
|
|
7519
|
+
/**
|
|
7520
|
+
* Get the silent mode state of a paired wireless chime.
|
|
7521
|
+
* cmd_id: 609 (GetDingDongSilent)
|
|
7522
|
+
*
|
|
7523
|
+
* @param chimeId - The wireless chime device ID (from getDingDongList)
|
|
7524
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7525
|
+
* @returns Wireless chime silent state (time=0 means active/not silenced)
|
|
7526
|
+
*/
|
|
7527
|
+
getDingDongSilent(chimeId: number, channel?: number): Promise<WirelessChimeSilentState>;
|
|
7528
|
+
/**
|
|
7529
|
+
* Set the silent mode of a paired wireless chime.
|
|
7530
|
+
* cmd_id: 610 (SetDingDongSilent)
|
|
7531
|
+
*
|
|
7532
|
+
* @param chimeId - The wireless chime device ID (from getDingDongList)
|
|
7533
|
+
* @param time - Silence duration in seconds. 0 = not silenced (chime active), >0 = silenced for this many seconds.
|
|
7534
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7535
|
+
* @returns Updated wireless chime silent state
|
|
7536
|
+
*/
|
|
7537
|
+
setDingDongSilent(chimeId: number, time: number, channel?: number): Promise<WirelessChimeSilentState>;
|
|
7309
7538
|
}
|
|
7310
7539
|
|
|
7311
7540
|
export declare type ReolinkBaichuanChannelIdentity = {
|
|
@@ -8786,6 +9015,19 @@ export declare interface WhiteLedState {
|
|
|
8786
9015
|
brightness?: number;
|
|
8787
9016
|
}
|
|
8788
9017
|
|
|
9018
|
+
/** Wireless chime silent mode state from GetDingDongSilent / SetDingDongSilent. */
|
|
9019
|
+
export declare interface WirelessChimeSilentState {
|
|
9020
|
+
/** The wireless chime device ID */
|
|
9021
|
+
id: number;
|
|
9022
|
+
/**
|
|
9023
|
+
* Silent mode duration in seconds.
|
|
9024
|
+
* 0 = not silenced (chime active), >0 = silenced for this many seconds.
|
|
9025
|
+
*/
|
|
9026
|
+
time: number;
|
|
9027
|
+
/** Whether the chime is currently active (not silenced). Derived: time === 0 */
|
|
9028
|
+
active: boolean;
|
|
9029
|
+
}
|
|
9030
|
+
|
|
8789
9031
|
export declare function xmlEscape(text: string | undefined | null): string;
|
|
8790
9032
|
|
|
8791
9033
|
declare type XmlJsonObject = {
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
flattenAbilitiesForChannel,
|
|
30
30
|
getConstructedVideoStreamOptions,
|
|
31
31
|
getGlobalLogger,
|
|
32
|
+
getSupportItemForChannel,
|
|
32
33
|
getVideoStream,
|
|
33
34
|
isDualLenseModel,
|
|
34
35
|
isNvrHubModel,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
normalizeUid,
|
|
38
39
|
parseSupportXml,
|
|
39
40
|
setGlobalLogger
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-RWYEGEWG.js";
|
|
41
42
|
import {
|
|
42
43
|
AesStreamDecryptor,
|
|
43
44
|
BC_AES_IV,
|
|
@@ -61,6 +62,8 @@ import {
|
|
|
61
62
|
BC_CMD_ID_COVER_STANDALONE_460,
|
|
62
63
|
BC_CMD_ID_COVER_STANDALONE_461,
|
|
63
64
|
BC_CMD_ID_COVER_STANDALONE_462,
|
|
65
|
+
BC_CMD_ID_DING_DONG_CTRL,
|
|
66
|
+
BC_CMD_ID_DING_DONG_OPT,
|
|
64
67
|
BC_CMD_ID_FILE_INFO_LIST_CLOSE,
|
|
65
68
|
BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO,
|
|
66
69
|
BC_CMD_ID_FILE_INFO_LIST_DOWNLOAD,
|
|
@@ -84,6 +87,9 @@ import {
|
|
|
84
87
|
BC_CMD_ID_GET_BATTERY_INFO_LIST,
|
|
85
88
|
BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD,
|
|
86
89
|
BC_CMD_ID_GET_DAY_RECORDS,
|
|
90
|
+
BC_CMD_ID_GET_DING_DONG_CFG,
|
|
91
|
+
BC_CMD_ID_GET_DING_DONG_LIST,
|
|
92
|
+
BC_CMD_ID_GET_DING_DONG_SILENT,
|
|
87
93
|
BC_CMD_ID_GET_EMAIL_TASK,
|
|
88
94
|
BC_CMD_ID_GET_FTP_TASK,
|
|
89
95
|
BC_CMD_ID_GET_HDD_INFO_LIST,
|
|
@@ -120,9 +126,12 @@ import {
|
|
|
120
126
|
BC_CMD_ID_PUSH_SERIAL,
|
|
121
127
|
BC_CMD_ID_PUSH_SLEEP_STATUS,
|
|
122
128
|
BC_CMD_ID_PUSH_VIDEO_INPUT,
|
|
129
|
+
BC_CMD_ID_QUICK_REPLY_PLAY,
|
|
123
130
|
BC_CMD_ID_SET_AI_ALARM,
|
|
124
131
|
BC_CMD_ID_SET_AI_CFG,
|
|
125
132
|
BC_CMD_ID_SET_AUDIO_TASK,
|
|
133
|
+
BC_CMD_ID_SET_DING_DONG_CFG,
|
|
134
|
+
BC_CMD_ID_SET_DING_DONG_SILENT,
|
|
126
135
|
BC_CMD_ID_SET_MOTION_ALARM,
|
|
127
136
|
BC_CMD_ID_SET_PIR_INFO,
|
|
128
137
|
BC_CMD_ID_SET_WHITE_LED_STATE,
|
|
@@ -206,7 +215,7 @@ import {
|
|
|
206
215
|
testChannelStreams,
|
|
207
216
|
xmlEscape,
|
|
208
217
|
zipDirectory
|
|
209
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-NLTB7GTA.js";
|
|
210
219
|
|
|
211
220
|
// src/reolink/baichuan/HlsSessionManager.ts
|
|
212
221
|
var withTimeout = async (p, ms, label) => {
|
|
@@ -558,8 +567,12 @@ function detectIosClient(userAgent) {
|
|
|
558
567
|
return {
|
|
559
568
|
isIos,
|
|
560
569
|
isIosInstalledApp,
|
|
561
|
-
// iOS
|
|
562
|
-
|
|
570
|
+
// ALL iOS clients need HLS for reliable video clip playback.
|
|
571
|
+
// iOS AVFoundation requires Content-Length + Range support for regular MP4,
|
|
572
|
+
// but generating the full MP4 upfront takes too long (camera download + transcode).
|
|
573
|
+
// HLS delivers segments progressively (~3-5s to first frame vs 25+ seconds).
|
|
574
|
+
// Safari, AVPlayer, and InstalledApp all support HLS natively.
|
|
575
|
+
needsHls: isIos
|
|
563
576
|
};
|
|
564
577
|
}
|
|
565
578
|
function buildHlsRedirectUrl(originalUrl) {
|
|
@@ -7075,6 +7088,8 @@ export {
|
|
|
7075
7088
|
BC_CMD_ID_COVER_STANDALONE_460,
|
|
7076
7089
|
BC_CMD_ID_COVER_STANDALONE_461,
|
|
7077
7090
|
BC_CMD_ID_COVER_STANDALONE_462,
|
|
7091
|
+
BC_CMD_ID_DING_DONG_CTRL,
|
|
7092
|
+
BC_CMD_ID_DING_DONG_OPT,
|
|
7078
7093
|
BC_CMD_ID_FILE_INFO_LIST_CLOSE,
|
|
7079
7094
|
BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO,
|
|
7080
7095
|
BC_CMD_ID_FILE_INFO_LIST_DOWNLOAD,
|
|
@@ -7098,6 +7113,9 @@ export {
|
|
|
7098
7113
|
BC_CMD_ID_GET_BATTERY_INFO_LIST,
|
|
7099
7114
|
BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD,
|
|
7100
7115
|
BC_CMD_ID_GET_DAY_RECORDS,
|
|
7116
|
+
BC_CMD_ID_GET_DING_DONG_CFG,
|
|
7117
|
+
BC_CMD_ID_GET_DING_DONG_LIST,
|
|
7118
|
+
BC_CMD_ID_GET_DING_DONG_SILENT,
|
|
7101
7119
|
BC_CMD_ID_GET_EMAIL_TASK,
|
|
7102
7120
|
BC_CMD_ID_GET_FTP_TASK,
|
|
7103
7121
|
BC_CMD_ID_GET_HDD_INFO_LIST,
|
|
@@ -7134,9 +7152,12 @@ export {
|
|
|
7134
7152
|
BC_CMD_ID_PUSH_SERIAL,
|
|
7135
7153
|
BC_CMD_ID_PUSH_SLEEP_STATUS,
|
|
7136
7154
|
BC_CMD_ID_PUSH_VIDEO_INPUT,
|
|
7155
|
+
BC_CMD_ID_QUICK_REPLY_PLAY,
|
|
7137
7156
|
BC_CMD_ID_SET_AI_ALARM,
|
|
7138
7157
|
BC_CMD_ID_SET_AI_CFG,
|
|
7139
7158
|
BC_CMD_ID_SET_AUDIO_TASK,
|
|
7159
|
+
BC_CMD_ID_SET_DING_DONG_CFG,
|
|
7160
|
+
BC_CMD_ID_SET_DING_DONG_SILENT,
|
|
7140
7161
|
BC_CMD_ID_SET_MOTION_ALARM,
|
|
7141
7162
|
BC_CMD_ID_SET_PIR_INFO,
|
|
7142
7163
|
BC_CMD_ID_SET_WHITE_LED_STATE,
|
|
@@ -7253,6 +7274,7 @@ export {
|
|
|
7253
7274
|
getGlobalLogger,
|
|
7254
7275
|
getH265NalType,
|
|
7255
7276
|
getMjpegContentType,
|
|
7277
|
+
getSupportItemForChannel,
|
|
7256
7278
|
getVideoStream,
|
|
7257
7279
|
getVideoclipClientInfo,
|
|
7258
7280
|
getXmlText,
|