@apocaliss92/nodelink-js 0.2.1 → 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 +1 -1
- package/dist/{DiagnosticsTools-NUMCYEKQ.js → DiagnosticsTools-FNLGCOVA.js} +2 -2
- package/dist/{chunk-PCPEXOWB.js → chunk-MN7GUZT7.js} +750 -213
- 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 +747 -210
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +771 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +235 -12
- package/dist/index.d.ts +249 -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
|
@@ -1837,6 +1837,10 @@ export declare const BC_CMD_ID_COVER_STANDALONE_461 = 461;
|
|
|
1837
1837
|
|
|
1838
1838
|
export declare const BC_CMD_ID_COVER_STANDALONE_462 = 462;
|
|
1839
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
|
+
|
|
1840
1844
|
export declare const BC_CMD_ID_FILE_INFO_LIST_CLOSE = 16;
|
|
1841
1845
|
|
|
1842
1846
|
export declare const BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO = 8;
|
|
@@ -1883,6 +1887,12 @@ export declare const BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD = 296;
|
|
|
1883
1887
|
|
|
1884
1888
|
export declare const BC_CMD_ID_GET_DAY_RECORDS = 142;
|
|
1885
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
|
+
|
|
1886
1896
|
export declare const BC_CMD_ID_GET_EMAIL_TASK = 217;
|
|
1887
1897
|
|
|
1888
1898
|
export declare const BC_CMD_ID_GET_FTP_TASK = 70;
|
|
@@ -1962,12 +1972,18 @@ export declare const BC_CMD_ID_PUSH_SLEEP_STATUS = 623;
|
|
|
1962
1972
|
|
|
1963
1973
|
export declare const BC_CMD_ID_PUSH_VIDEO_INPUT = 78;
|
|
1964
1974
|
|
|
1975
|
+
export declare const BC_CMD_ID_QUICK_REPLY_PLAY = 349;
|
|
1976
|
+
|
|
1965
1977
|
export declare const BC_CMD_ID_SET_AI_ALARM = 343;
|
|
1966
1978
|
|
|
1967
1979
|
export declare const BC_CMD_ID_SET_AI_CFG = 300;
|
|
1968
1980
|
|
|
1969
1981
|
export declare const BC_CMD_ID_SET_AUDIO_TASK = 231;
|
|
1970
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
|
+
|
|
1971
1987
|
export declare const BC_CMD_ID_SET_MOTION_ALARM = 47;
|
|
1972
1988
|
|
|
1973
1989
|
export declare const BC_CMD_ID_SET_PIR_INFO = 213;
|
|
@@ -2869,6 +2885,39 @@ export declare interface ChannelStreamMetadata {
|
|
|
2869
2885
|
rawXml?: string;
|
|
2870
2886
|
}
|
|
2871
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
|
+
|
|
2872
2921
|
export declare function collectCgiDiagnostics(params: {
|
|
2873
2922
|
cgi: ReolinkCgiApi;
|
|
2874
2923
|
channel?: number;
|
|
@@ -3424,6 +3473,8 @@ export declare interface DeviceCapabilities {
|
|
|
3424
3473
|
isDoorbell: boolean;
|
|
3425
3474
|
/** True when device supports autotracking (smartTrack in AiCfg). */
|
|
3426
3475
|
hasAutotracking: boolean;
|
|
3476
|
+
/** True when device is a doorbell (can potentially support wireless chime) or has dingDong abilities explicitly detected. */
|
|
3477
|
+
hasWirelessChime: boolean;
|
|
3427
3478
|
}
|
|
3428
3479
|
|
|
3429
3480
|
export declare type DeviceCapabilitiesCacheEntry = {
|
|
@@ -3456,6 +3507,12 @@ export declare interface DeviceCapabilitiesDebugInfo {
|
|
|
3456
3507
|
supportPirSch?: number;
|
|
3457
3508
|
/** Selected SupportItem chnID */
|
|
3458
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;
|
|
3459
3516
|
}
|
|
3460
3517
|
|
|
3461
3518
|
export declare interface DeviceCapabilitiesResult {
|
|
@@ -3880,6 +3937,8 @@ export declare interface GetRecordingVideoStats {
|
|
|
3880
3937
|
hasAudio: boolean;
|
|
3881
3938
|
}
|
|
3882
3939
|
|
|
3940
|
+
export declare function getSupportItemForChannel(support: SupportInfo | undefined, channel: number): SupportItem | undefined;
|
|
3941
|
+
|
|
3883
3942
|
/**
|
|
3884
3943
|
* Extract client info from HTTP request headers.
|
|
3885
3944
|
*/
|
|
@@ -3970,6 +4029,16 @@ export declare class H265RtpDepacketizer {
|
|
|
3970
4029
|
push(payload: Buffer): Buffer[];
|
|
3971
4030
|
}
|
|
3972
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
|
+
|
|
3973
4042
|
/**
|
|
3974
4043
|
* H.265/HEVC Format Converter
|
|
3975
4044
|
* Converts H.265 data from length-prefixed (HVCC) to Annex-B (start codes).
|
|
@@ -4698,6 +4767,11 @@ export declare class ReolinkBaichuanApi {
|
|
|
4698
4767
|
private readonly host;
|
|
4699
4768
|
private readonly username;
|
|
4700
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;
|
|
4701
4775
|
/**
|
|
4702
4776
|
* Socket pool with tag-based allocation strategy.
|
|
4703
4777
|
* Tags determine which sockets are shared vs dedicated:
|
|
@@ -4722,6 +4796,46 @@ export declare class ReolinkBaichuanApi {
|
|
|
4722
4796
|
* This getter maintains backward compatibility with existing code that uses `this.client`.
|
|
4723
4797
|
*/
|
|
4724
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;
|
|
4725
4839
|
/**
|
|
4726
4840
|
* Cached camera UID. May be initially undefined if not provided in the constructor.
|
|
4727
4841
|
* Will be lazily populated on demand when needed (e.g. for recordings).
|
|
@@ -5360,11 +5474,19 @@ export declare class ReolinkBaichuanApi {
|
|
|
5360
5474
|
* Minimal per-channel inventory for NVR-connected devices.
|
|
5361
5475
|
*
|
|
5362
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.
|
|
5363
5485
|
*/
|
|
5364
5486
|
getNvrChannelsSummary(options?: {
|
|
5365
5487
|
channels?: number[];
|
|
5366
5488
|
timeoutMs?: number;
|
|
5367
|
-
source?: "
|
|
5489
|
+
source?: "cgi" | "baichuan";
|
|
5368
5490
|
}): Promise<NvrChannelsSummaryCacheEntry>;
|
|
5369
5491
|
/**
|
|
5370
5492
|
* Group NVR/HUB channels by physical device (best-effort).
|
|
@@ -6413,16 +6535,6 @@ export declare class ReolinkBaichuanApi {
|
|
|
6413
6535
|
* Clear the device capabilities cache for a specific channel or all channels.
|
|
6414
6536
|
*/
|
|
6415
6537
|
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
6538
|
/**
|
|
6427
6539
|
* Parse support features from SupportInfo.
|
|
6428
6540
|
*/
|
|
@@ -7306,6 +7418,119 @@ export declare class ReolinkBaichuanApi {
|
|
|
7306
7418
|
* ```
|
|
7307
7419
|
*/
|
|
7308
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>;
|
|
7309
7534
|
}
|
|
7310
7535
|
|
|
7311
7536
|
export declare type ReolinkBaichuanChannelIdentity = {
|
|
@@ -8786,6 +9011,19 @@ export declare interface WhiteLedState {
|
|
|
8786
9011
|
brightness?: number;
|
|
8787
9012
|
}
|
|
8788
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
|
+
|
|
8789
9027
|
export declare function xmlEscape(text: string | undefined | null): string;
|
|
8790
9028
|
|
|
8791
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,
|