@apocaliss92/nodelink-js 0.1.20 → 0.2.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/README.md +20 -1
- package/dist/{DiagnosticsTools-NUMCYEKQ.js → DiagnosticsTools-FNLGCOVA.js} +2 -2
- package/dist/{chunk-EHWVA3SG.js → chunk-MN7GUZT7.js} +981 -250
- package/dist/chunk-MN7GUZT7.js.map +1 -0
- package/dist/{chunk-YPU7RAEY.js → chunk-NLTB7GTA.js} +17 -1
- package/dist/{chunk-YPU7RAEY.js.map → chunk-NLTB7GTA.js.map} +1 -1
- package/dist/cli/rtsp-server.cjs +978 -247
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +1002 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +246 -16
- package/dist/index.d.ts +260 -15
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-EHWVA3SG.js.map +0 -1
- /package/dist/{DiagnosticsTools-NUMCYEKQ.js.map → DiagnosticsTools-FNLGCOVA.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -454,6 +454,13 @@ export declare class BaichuanClient extends EventEmitter<{
|
|
|
454
454
|
* and may leave device-side sessions in a bad state.
|
|
455
455
|
*/
|
|
456
456
|
private static readonly coverPreviewQueueTail;
|
|
457
|
+
/**
|
|
458
|
+
* Global CoverPreview backoff – increases on 400 rejection, resets on success.
|
|
459
|
+
* Prevents flooding the camera when it's overwhelmed.
|
|
460
|
+
*/
|
|
461
|
+
private static readonly coverPreviewBackoffMs;
|
|
462
|
+
private static readonly COVER_PREVIEW_INITIAL_BACKOFF_MS;
|
|
463
|
+
private static readonly COVER_PREVIEW_MAX_BACKOFF_MS;
|
|
457
464
|
private readonly opts;
|
|
458
465
|
private readonly debugCfg;
|
|
459
466
|
private readonly logger;
|
|
@@ -804,6 +811,10 @@ export declare class BaichuanClient extends EventEmitter<{
|
|
|
804
811
|
* Send CoverPreview command (cmd_id=298) to get an I-frame from a past recording.
|
|
805
812
|
* Similar to sendBinarySnapshot109 but handles the stream header + frame format
|
|
806
813
|
* instead of JPEG.
|
|
814
|
+
*
|
|
815
|
+
* Retry is minimal (2 attempts) – the global backoff in `withSerializedCoverPreview`
|
|
816
|
+
* throttles subsequent requests when the camera is overwhelmed.
|
|
817
|
+
* PCAP analysis shows the camera routinely rejects the first request with 400.
|
|
807
818
|
*/
|
|
808
819
|
sendBinaryCoverPreview(params: {
|
|
809
820
|
cmdId: number;
|
|
@@ -818,10 +829,6 @@ export declare class BaichuanClient extends EventEmitter<{
|
|
|
818
829
|
streamType?: number;
|
|
819
830
|
encryption?: EncryptionProtocol;
|
|
820
831
|
timeoutMs?: number;
|
|
821
|
-
/** Maximum retry attempts on 400 rejection (default: 5). PCAP analysis shows camera often rejects first few requests. */
|
|
822
|
-
maxRetries?: number;
|
|
823
|
-
/** Delay between retries in ms (default: 1000). */
|
|
824
|
-
retryDelayMs?: number;
|
|
825
832
|
}): Promise<Buffer>;
|
|
826
833
|
/**
|
|
827
834
|
* Internal: single attempt for sendBinaryCoverPreview
|
|
@@ -1830,6 +1837,10 @@ export declare const BC_CMD_ID_COVER_STANDALONE_461 = 461;
|
|
|
1830
1837
|
|
|
1831
1838
|
export declare const BC_CMD_ID_COVER_STANDALONE_462 = 462;
|
|
1832
1839
|
|
|
1840
|
+
export declare const BC_CMD_ID_DING_DONG_CTRL = 483;
|
|
1841
|
+
|
|
1842
|
+
export declare const BC_CMD_ID_DING_DONG_OPT = 485;
|
|
1843
|
+
|
|
1833
1844
|
export declare const BC_CMD_ID_FILE_INFO_LIST_CLOSE = 16;
|
|
1834
1845
|
|
|
1835
1846
|
export declare const BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO = 8;
|
|
@@ -1876,6 +1887,12 @@ export declare const BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD = 296;
|
|
|
1876
1887
|
|
|
1877
1888
|
export declare const BC_CMD_ID_GET_DAY_RECORDS = 142;
|
|
1878
1889
|
|
|
1890
|
+
export declare const BC_CMD_ID_GET_DING_DONG_CFG = 486;
|
|
1891
|
+
|
|
1892
|
+
export declare const BC_CMD_ID_GET_DING_DONG_LIST = 484;
|
|
1893
|
+
|
|
1894
|
+
export declare const BC_CMD_ID_GET_DING_DONG_SILENT = 609;
|
|
1895
|
+
|
|
1879
1896
|
export declare const BC_CMD_ID_GET_EMAIL_TASK = 217;
|
|
1880
1897
|
|
|
1881
1898
|
export declare const BC_CMD_ID_GET_FTP_TASK = 70;
|
|
@@ -1955,12 +1972,18 @@ export declare const BC_CMD_ID_PUSH_SLEEP_STATUS = 623;
|
|
|
1955
1972
|
|
|
1956
1973
|
export declare const BC_CMD_ID_PUSH_VIDEO_INPUT = 78;
|
|
1957
1974
|
|
|
1975
|
+
export declare const BC_CMD_ID_QUICK_REPLY_PLAY = 349;
|
|
1976
|
+
|
|
1958
1977
|
export declare const BC_CMD_ID_SET_AI_ALARM = 343;
|
|
1959
1978
|
|
|
1960
1979
|
export declare const BC_CMD_ID_SET_AI_CFG = 300;
|
|
1961
1980
|
|
|
1962
1981
|
export declare const BC_CMD_ID_SET_AUDIO_TASK = 231;
|
|
1963
1982
|
|
|
1983
|
+
export declare const BC_CMD_ID_SET_DING_DONG_CFG = 487;
|
|
1984
|
+
|
|
1985
|
+
export declare const BC_CMD_ID_SET_DING_DONG_SILENT = 610;
|
|
1986
|
+
|
|
1964
1987
|
export declare const BC_CMD_ID_SET_MOTION_ALARM = 47;
|
|
1965
1988
|
|
|
1966
1989
|
export declare const BC_CMD_ID_SET_PIR_INFO = 213;
|
|
@@ -2862,6 +2885,39 @@ export declare interface ChannelStreamMetadata {
|
|
|
2862
2885
|
rawXml?: string;
|
|
2863
2886
|
}
|
|
2864
2887
|
|
|
2888
|
+
/** Per-event alarm config entry inside a chime's GetDingDongCfg response. */
|
|
2889
|
+
export declare interface ChimeAlarmCfg {
|
|
2890
|
+
/** Whether this event type triggers the chime: 0 = off, 1 = on */
|
|
2891
|
+
valid: number;
|
|
2892
|
+
/** Ringtone / music ID */
|
|
2893
|
+
musicId: number;
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
/** Per-chime config from GetDingDongCfg. */
|
|
2897
|
+
export declare interface ChimeCfg {
|
|
2898
|
+
/** Chime ring ID */
|
|
2899
|
+
id: number;
|
|
2900
|
+
/** Map of event type string → alarm config */
|
|
2901
|
+
type: Record<string, ChimeAlarmCfg>;
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
/** A paired wireless chime device as returned by GetDingDongList. */
|
|
2905
|
+
export declare interface ChimeDevice {
|
|
2906
|
+
id: number;
|
|
2907
|
+
name: string;
|
|
2908
|
+
/** 0 = offline, 1 = online */
|
|
2909
|
+
netState: number;
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
/** Wireless chime parameters returned by DingDongOpt (option 2 / getParam). */
|
|
2913
|
+
export declare interface ChimeParams {
|
|
2914
|
+
name?: string;
|
|
2915
|
+
/** Volume level (0-4 typical) */
|
|
2916
|
+
volLevel?: number;
|
|
2917
|
+
/** LED state: 0 = off, 1 = on */
|
|
2918
|
+
ledState?: number;
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2865
2921
|
export declare function collectCgiDiagnostics(params: {
|
|
2866
2922
|
cgi: ReolinkCgiApi;
|
|
2867
2923
|
channel?: number;
|
|
@@ -3417,6 +3473,8 @@ export declare interface DeviceCapabilities {
|
|
|
3417
3473
|
isDoorbell: boolean;
|
|
3418
3474
|
/** True when device supports autotracking (smartTrack in AiCfg). */
|
|
3419
3475
|
hasAutotracking: boolean;
|
|
3476
|
+
/** True when device is a doorbell (can potentially support wireless chime) or has dingDong abilities explicitly detected. */
|
|
3477
|
+
hasWirelessChime: boolean;
|
|
3420
3478
|
}
|
|
3421
3479
|
|
|
3422
3480
|
export declare type DeviceCapabilitiesCacheEntry = {
|
|
@@ -3449,6 +3507,12 @@ export declare interface DeviceCapabilitiesDebugInfo {
|
|
|
3449
3507
|
supportPirSch?: number;
|
|
3450
3508
|
/** Selected SupportItem chnID */
|
|
3451
3509
|
supportItemChnID?: number;
|
|
3510
|
+
/** Wireless chime IDs from GetDingDongList (cmd 484) */
|
|
3511
|
+
dingDongListIds?: number[];
|
|
3512
|
+
/** Wireless chime IDs from GetDingDongCfg (cmd 486) */
|
|
3513
|
+
dingDongCfgIds?: number[];
|
|
3514
|
+
/** Error message if chime discovery failed */
|
|
3515
|
+
wirelessChimeError?: string;
|
|
3452
3516
|
}
|
|
3453
3517
|
|
|
3454
3518
|
export declare interface DeviceCapabilitiesResult {
|
|
@@ -3873,6 +3937,8 @@ export declare interface GetRecordingVideoStats {
|
|
|
3873
3937
|
hasAudio: boolean;
|
|
3874
3938
|
}
|
|
3875
3939
|
|
|
3940
|
+
export declare function getSupportItemForChannel(support: SupportInfo | undefined, channel: number): SupportItem | undefined;
|
|
3941
|
+
|
|
3876
3942
|
/**
|
|
3877
3943
|
* Extract client info from HTTP request headers.
|
|
3878
3944
|
*/
|
|
@@ -3963,6 +4029,16 @@ export declare class H265RtpDepacketizer {
|
|
|
3963
4029
|
push(payload: Buffer): Buffer[];
|
|
3964
4030
|
}
|
|
3965
4031
|
|
|
4032
|
+
/** Hardwired (wired-in) chime state from GetDingDongCtrl / SetDingDongCtrl. */
|
|
4033
|
+
export declare interface HardwiredChimeState {
|
|
4034
|
+
/** Chime type string (e.g. "dingdong", "single", "dual") */
|
|
4035
|
+
type: string;
|
|
4036
|
+
/** Whether the chime is enabled */
|
|
4037
|
+
enabled: boolean;
|
|
4038
|
+
/** Duration / timing value */
|
|
4039
|
+
time: number;
|
|
4040
|
+
}
|
|
4041
|
+
|
|
3966
4042
|
/**
|
|
3967
4043
|
* H.265/HEVC Format Converter
|
|
3968
4044
|
* Converts H.265 data from length-prefixed (HVCC) to Annex-B (start codes).
|
|
@@ -4691,6 +4767,11 @@ export declare class ReolinkBaichuanApi {
|
|
|
4691
4767
|
private readonly host;
|
|
4692
4768
|
private readonly username;
|
|
4693
4769
|
private readonly password;
|
|
4770
|
+
/**
|
|
4771
|
+
* Set to `true` after `close()` is called.
|
|
4772
|
+
* Once closed, the API instance should not be reused.
|
|
4773
|
+
*/
|
|
4774
|
+
private _closed;
|
|
4694
4775
|
/**
|
|
4695
4776
|
* Socket pool with tag-based allocation strategy.
|
|
4696
4777
|
* Tags determine which sockets are shared vs dedicated:
|
|
@@ -4715,6 +4796,46 @@ export declare class ReolinkBaichuanApi {
|
|
|
4715
4796
|
* This getter maintains backward compatibility with existing code that uses `this.client`.
|
|
4716
4797
|
*/
|
|
4717
4798
|
get client(): BaichuanClient;
|
|
4799
|
+
/**
|
|
4800
|
+
* `true` after `close()` has been called. A closed API should not be reused;
|
|
4801
|
+
* the consumer should create a new instance.
|
|
4802
|
+
*/
|
|
4803
|
+
get isClosed(): boolean;
|
|
4804
|
+
/**
|
|
4805
|
+
* `true` when the API is usable: not closed, general socket exists, socket
|
|
4806
|
+
* is connected and the client is logged in.
|
|
4807
|
+
*
|
|
4808
|
+
* This is the recommended way for consumers to check whether the API is
|
|
4809
|
+
* still valid before issuing commands, instead of directly accessing
|
|
4810
|
+
* `api.client.isSocketConnected()` / `api.client.loggedIn` (which throws
|
|
4811
|
+
* if the socket pool was already destroyed).
|
|
4812
|
+
*/
|
|
4813
|
+
get isReady(): boolean;
|
|
4814
|
+
/** Promise tracking an in-flight reconnection from `ensureConnected()`. */
|
|
4815
|
+
private _ensureConnectedPromise;
|
|
4816
|
+
/**
|
|
4817
|
+
* Ensure the "general" socket is connected and logged in.
|
|
4818
|
+
* If the socket is disconnected or the pool entry was destroyed, a new
|
|
4819
|
+
* general socket is created, logged in, and all event/push/guard listeners
|
|
4820
|
+
* are re-attached automatically.
|
|
4821
|
+
*
|
|
4822
|
+
* This is a **no-op** when the API is already {@link isReady}.
|
|
4823
|
+
*
|
|
4824
|
+
* @throws If `close()` was called — the API is permanently closed and a new
|
|
4825
|
+
* instance must be created.
|
|
4826
|
+
*/
|
|
4827
|
+
ensureConnected(): Promise<void>;
|
|
4828
|
+
/**
|
|
4829
|
+
* Internal: destroy the current general socket (if any), create a new one,
|
|
4830
|
+
* login, and re-attach all listeners.
|
|
4831
|
+
*/
|
|
4832
|
+
private reconnectGeneralSocket;
|
|
4833
|
+
/**
|
|
4834
|
+
* Attach event, push, channelInfo, and guard listeners to the current
|
|
4835
|
+
* "general" client. Called from the constructor and from
|
|
4836
|
+
* {@link reconnectGeneralSocket}.
|
|
4837
|
+
*/
|
|
4838
|
+
private setupGeneralClientListeners;
|
|
4718
4839
|
/**
|
|
4719
4840
|
* Cached camera UID. May be initially undefined if not provided in the constructor.
|
|
4720
4841
|
* Will be lazily populated on demand when needed (e.g. for recordings).
|
|
@@ -5353,11 +5474,19 @@ export declare class ReolinkBaichuanApi {
|
|
|
5353
5474
|
* Minimal per-channel inventory for NVR-connected devices.
|
|
5354
5475
|
*
|
|
5355
5476
|
* Intended to be fast: avoids AI/abilities and returns only the common identity + battery hints.
|
|
5477
|
+
*
|
|
5478
|
+
* @param options.source - Data source for the channel list (default: `"cgi"`):
|
|
5479
|
+
* - `"cgi"`: Uses HTTP `GetChannelstatus` — returns the channel list immediately,
|
|
5480
|
+
* no dependency on async push messages. Recommended for first-call discovery.
|
|
5481
|
+
* - `"baichuan"`: Uses the cmd_id 145 push cache populated when the NVR sends channel
|
|
5482
|
+
* info after login + event subscription. This push is *asynchronous*: if it has not
|
|
5483
|
+
* arrived yet, the result will have zero channels. Callers must retry (nvr.ts does this
|
|
5484
|
+
* with a 1-second loop). Note: explicitly requesting cmd_id 145 is not supported.
|
|
5356
5485
|
*/
|
|
5357
5486
|
getNvrChannelsSummary(options?: {
|
|
5358
5487
|
channels?: number[];
|
|
5359
5488
|
timeoutMs?: number;
|
|
5360
|
-
source?: "
|
|
5489
|
+
source?: "cgi" | "baichuan";
|
|
5361
5490
|
}): Promise<NvrChannelsSummaryCacheEntry>;
|
|
5362
5491
|
/**
|
|
5363
5492
|
* Group NVR/HUB channels by physical device (best-effort).
|
|
@@ -6406,16 +6535,6 @@ export declare class ReolinkBaichuanApi {
|
|
|
6406
6535
|
* Clear the device capabilities cache for a specific channel or all channels.
|
|
6407
6536
|
*/
|
|
6408
6537
|
clearCapabilitiesCache(channel?: number): void;
|
|
6409
|
-
/**
|
|
6410
|
-
* Pick the best SupportItem for a channel.
|
|
6411
|
-
* Prefers items without a name (capability items) over named items (googleHome, amazonAlexa).
|
|
6412
|
-
*/
|
|
6413
|
-
private pickBestSupportItem;
|
|
6414
|
-
/**
|
|
6415
|
-
* Parse device capabilities from SupportInfo.
|
|
6416
|
-
* Uses SupportInfo as the single source of truth with AbilityInfo as fallback.
|
|
6417
|
-
*/
|
|
6418
|
-
private parseCapabilitiesFromSupport;
|
|
6419
6538
|
/**
|
|
6420
6539
|
* Parse support features from SupportInfo.
|
|
6421
6540
|
*/
|
|
@@ -7299,6 +7418,119 @@ export declare class ReolinkBaichuanApi {
|
|
|
7299
7418
|
* ```
|
|
7300
7419
|
*/
|
|
7301
7420
|
standaloneGetSnapshot(): Promise<Buffer>;
|
|
7421
|
+
/**
|
|
7422
|
+
* Get the list of paired wireless chime devices.
|
|
7423
|
+
* cmd_id: 484 (GetDingDongList)
|
|
7424
|
+
*
|
|
7425
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7426
|
+
* @returns Array of paired chime devices
|
|
7427
|
+
*/
|
|
7428
|
+
getDingDongList(channel?: number): Promise<ChimeDevice[]>;
|
|
7429
|
+
/**
|
|
7430
|
+
* Get parameters (name, volume, LED state) for a specific wireless chime.
|
|
7431
|
+
* cmd_id: 485 (DingDongOpt, option getParam)
|
|
7432
|
+
*
|
|
7433
|
+
* @param chimeId - The chime device ID
|
|
7434
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7435
|
+
* @returns Chime parameters
|
|
7436
|
+
*/
|
|
7437
|
+
getDingDongParams(chimeId: number, channel?: number): Promise<ChimeParams>;
|
|
7438
|
+
/**
|
|
7439
|
+
* Set parameters (name, volume, LED state) for a specific wireless chime.
|
|
7440
|
+
* cmd_id: 485 (DingDongOpt, option setParam)
|
|
7441
|
+
*
|
|
7442
|
+
* @param chimeId - The chime device ID
|
|
7443
|
+
* @param params - Parameters to set (volLevel, ledState, name)
|
|
7444
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7445
|
+
*/
|
|
7446
|
+
setDingDongParams(chimeId: number, params: {
|
|
7447
|
+
volLevel?: number;
|
|
7448
|
+
ledState?: number;
|
|
7449
|
+
name?: string;
|
|
7450
|
+
}, channel?: number): Promise<void>;
|
|
7451
|
+
/**
|
|
7452
|
+
* Trigger a wireless chime to ring with a specific ringtone.
|
|
7453
|
+
* cmd_id: 485 (DingDongOpt, option ringWithMusic)
|
|
7454
|
+
*
|
|
7455
|
+
* @param chimeId - The chime device ID
|
|
7456
|
+
* @param musicId - The ringtone/music ID to play
|
|
7457
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7458
|
+
*/
|
|
7459
|
+
ringDingDong(chimeId: number, musicId: number, channel?: number): Promise<void>;
|
|
7460
|
+
/**
|
|
7461
|
+
* Get the per-event alarm configuration for paired wireless chimes.
|
|
7462
|
+
* cmd_id: 486 (GetDingDongCfg)
|
|
7463
|
+
*
|
|
7464
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7465
|
+
* @returns Array of chime configurations (one per paired chime)
|
|
7466
|
+
*/
|
|
7467
|
+
getDingDongCfg(channel?: number): Promise<ChimeCfg[]>;
|
|
7468
|
+
/**
|
|
7469
|
+
* Set the per-event alarm configuration for a specific wireless chime.
|
|
7470
|
+
* cmd_id: 487 (SetDingDongCfg)
|
|
7471
|
+
*
|
|
7472
|
+
* @param chimeId - The chime ring/device ID
|
|
7473
|
+
* @param eventType - Event type string (e.g. "doorbell", "package", "people")
|
|
7474
|
+
* @param state - 0 = disabled, 1 = enabled
|
|
7475
|
+
* @param musicId - Ringtone ID to use for this event type
|
|
7476
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7477
|
+
*/
|
|
7478
|
+
setDingDongCfg(chimeId: number, eventType: string, state: 0 | 1, musicId: number, channel?: number): Promise<void>;
|
|
7479
|
+
/** Cache of last known hardwired chime state per channel, used to avoid re-fetching on every set. */
|
|
7480
|
+
private _hardwiredChimeCache;
|
|
7481
|
+
/**
|
|
7482
|
+
* Get the hardwired (wired-in) chime state.
|
|
7483
|
+
* cmd_id: 483 (GetDingDongCtrl)
|
|
7484
|
+
*
|
|
7485
|
+
* Note: calling this may briefly trigger the physical chime to rattle.
|
|
7486
|
+
*
|
|
7487
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7488
|
+
* @returns Hardwired chime state (type, enabled, time)
|
|
7489
|
+
*/
|
|
7490
|
+
getHardwiredChime(channel?: number): Promise<HardwiredChimeState>;
|
|
7491
|
+
/**
|
|
7492
|
+
* Set the hardwired (wired-in) chime state.
|
|
7493
|
+
* cmd_id: 483 (SetDingDongCtrl)
|
|
7494
|
+
*
|
|
7495
|
+
* Uses the cached state from a previous getHardwiredChime call to fill in
|
|
7496
|
+
* missing type/time fields, avoiding a double round-trip on every set.
|
|
7497
|
+
* Falls back to fetching if no cache is available.
|
|
7498
|
+
*
|
|
7499
|
+
* @param params - Chime configuration (type, enabled, time)
|
|
7500
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7501
|
+
*/
|
|
7502
|
+
setHardwiredChime(params: {
|
|
7503
|
+
type?: string | undefined;
|
|
7504
|
+
enabled: boolean;
|
|
7505
|
+
time?: number;
|
|
7506
|
+
}, channel?: number): Promise<HardwiredChimeState>;
|
|
7507
|
+
/**
|
|
7508
|
+
* Play an audio file on the doorbell / chime device.
|
|
7509
|
+
* cmd_id: 349 (QuickReplyPlay)
|
|
7510
|
+
*
|
|
7511
|
+
* @param fileId - The audio file ID to play
|
|
7512
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7513
|
+
*/
|
|
7514
|
+
quickReplyPlay(fileId: number, channel?: number): Promise<void>;
|
|
7515
|
+
/**
|
|
7516
|
+
* Get the silent mode state of a paired wireless chime.
|
|
7517
|
+
* cmd_id: 609 (GetDingDongSilent)
|
|
7518
|
+
*
|
|
7519
|
+
* @param chimeId - The wireless chime device ID (from getDingDongList)
|
|
7520
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7521
|
+
* @returns Wireless chime silent state (time=0 means active/not silenced)
|
|
7522
|
+
*/
|
|
7523
|
+
getDingDongSilent(chimeId: number, channel?: number): Promise<WirelessChimeSilentState>;
|
|
7524
|
+
/**
|
|
7525
|
+
* Set the silent mode of a paired wireless chime.
|
|
7526
|
+
* cmd_id: 610 (SetDingDongSilent)
|
|
7527
|
+
*
|
|
7528
|
+
* @param chimeId - The wireless chime device ID (from getDingDongList)
|
|
7529
|
+
* @param time - Silence duration in seconds. 0 = not silenced (chime active), >0 = silenced for this many seconds.
|
|
7530
|
+
* @param channel - Channel number (0-based, default 0)
|
|
7531
|
+
* @returns Updated wireless chime silent state
|
|
7532
|
+
*/
|
|
7533
|
+
setDingDongSilent(chimeId: number, time: number, channel?: number): Promise<WirelessChimeSilentState>;
|
|
7302
7534
|
}
|
|
7303
7535
|
|
|
7304
7536
|
export declare type ReolinkBaichuanChannelIdentity = {
|
|
@@ -8779,6 +9011,19 @@ export declare interface WhiteLedState {
|
|
|
8779
9011
|
brightness?: number;
|
|
8780
9012
|
}
|
|
8781
9013
|
|
|
9014
|
+
/** Wireless chime silent mode state from GetDingDongSilent / SetDingDongSilent. */
|
|
9015
|
+
export declare interface WirelessChimeSilentState {
|
|
9016
|
+
/** The wireless chime device ID */
|
|
9017
|
+
id: number;
|
|
9018
|
+
/**
|
|
9019
|
+
* Silent mode duration in seconds.
|
|
9020
|
+
* 0 = not silenced (chime active), >0 = silenced for this many seconds.
|
|
9021
|
+
*/
|
|
9022
|
+
time: number;
|
|
9023
|
+
/** Whether the chime is currently active (not silenced). Derived: time === 0 */
|
|
9024
|
+
active: boolean;
|
|
9025
|
+
}
|
|
9026
|
+
|
|
8782
9027
|
export declare function xmlEscape(text: string | undefined | null): string;
|
|
8783
9028
|
|
|
8784
9029
|
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-MN7GUZT7.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,
|