@camera.ui/browser 0.0.67 → 0.0.69
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/.eslintrc.cjs +44 -0
- package/dist/bundle.js +1 -1
- package/dist/types/packages/client/browser/src/client.d.ts +2 -2
- package/dist/types/packages/client/browser/src/index.d.ts +2 -2
- package/dist/types/packages/client/browser/src/proxy/cameraDevice.d.ts +3 -3
- package/dist/types/packages/client/browser/src/proxy/deviceManager.d.ts +3 -3
- package/dist/types/packages/client/browser/src/proxy/index.d.ts +4 -4
- package/dist/types/packages/client/browser/src/proxy/pluginsManager.d.ts +2 -2
- package/dist/types/packages/client/browser/src/proxy/systemManager.d.ts +2 -2
- package/dist/types/packages/client/browser/src/socket.d.ts +1 -1
- package/dist/types/packages/client/browser/src/types.d.ts +3 -3
- package/dist/types/server/src/api/database/types.d.ts +1 -1
- package/dist/types/server/src/api/schemas/backup.schema.d.ts +2 -2
- package/dist/types/server/src/api/schemas/cameras.schema.d.ts +1 -1
- package/dist/types/server/src/api/schemas/config.schema.d.ts +1 -1
- package/dist/types/server/src/api/schemas/go2rtc.schema.d.ts +1 -1
- package/dist/types/server/src/api/schemas/users.schema.d.ts +2 -2
- package/dist/types/server/src/api/types/index.d.ts +12 -12
- package/dist/types/server/src/api/ws/types.d.ts +2 -2
- package/dist/types/server/src/camera/base/cameraDevice.d.ts +5 -5
- package/dist/types/server/src/camera/base/cameraDeviceBrowser.d.ts +2 -2
- package/dist/types/server/src/camera/base/index.d.ts +3 -3
- package/dist/types/server/src/camera/streaming/browser/browser-peer-connection.d.ts +4 -4
- package/dist/types/server/src/camera/streaming/browser/browser-streaming-session.d.ts +4 -4
- package/dist/types/server/src/camera/streaming/browser/webrtc-browser-connection.d.ts +5 -5
- package/dist/types/server/src/camera/streaming/peer-connection.d.ts +4 -4
- package/dist/types/server/src/camera/streaming/streaming-session.d.ts +4 -4
- package/dist/types/server/src/camera/streaming/webrtc-connection.d.ts +5 -5
- package/dist/types/server/src/camera/types.d.ts +2 -2
- package/dist/types/server/src/decoder/types.d.ts +3 -3
- package/dist/types/server/src/nats/types.d.ts +7 -7
- package/dist/types/server/src/plugins/types.d.ts +1 -1
- package/dist/types/shared/types/index.d.ts +12 -12
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DeviceManager, PluginsManager, SystemManager } from './proxy';
|
|
2
|
-
import type { CameraUiClientConfig } from './types';
|
|
1
|
+
import { DeviceManager, PluginsManager, SystemManager } from './proxy/index.js';
|
|
2
|
+
import type { CameraUiClientConfig } from './types.js';
|
|
3
3
|
export interface API {
|
|
4
4
|
deviceManager: DeviceManager;
|
|
5
5
|
pluginsManager: PluginsManager;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './client';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './client.js';
|
|
2
|
+
export * from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BrowserCameraDevice } from '../../../../../server/src/camera/base/cameraDeviceBrowser';
|
|
2
|
-
import type { BaseLogger, Camera, CameraSource, IceServer, OnSetEvent, StateValues } from '../../../../../shared/types';
|
|
3
|
-
import type { SocketService } from '../socket';
|
|
1
|
+
import { BrowserCameraDevice } from '../../../../../server/src/camera/base/cameraDeviceBrowser.js';
|
|
2
|
+
import type { BaseLogger, Camera, CameraSource, IceServer, OnSetEvent, StateValues } from '../../../../../shared/types/index.js';
|
|
3
|
+
import type { SocketService } from '../socket.js';
|
|
4
4
|
export declare class CameraDeviceProxy extends BrowserCameraDevice {
|
|
5
5
|
private socketService;
|
|
6
6
|
get sources(): CameraSource[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BrowserCameraDevice } from '../../../../../server/src/camera/base/cameraDeviceBrowser';
|
|
2
|
-
import type { BaseLogger, DeviceManagerBrowserProxyMethods } from '../../../../../shared/types';
|
|
3
|
-
import type { SocketService } from '../socket';
|
|
1
|
+
import { BrowserCameraDevice } from '../../../../../server/src/camera/base/cameraDeviceBrowser.js';
|
|
2
|
+
import type { BaseLogger, DeviceManagerBrowserProxyMethods } from '../../../../../shared/types/index.js';
|
|
3
|
+
import type { SocketService } from '../socket.js';
|
|
4
4
|
export declare class DeviceManager implements DeviceManagerBrowserProxyMethods {
|
|
5
5
|
private socketService;
|
|
6
6
|
private devices;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './cameraDevice';
|
|
2
|
-
export * from './deviceManager';
|
|
3
|
-
export * from './pluginsManager';
|
|
4
|
-
export * from './systemManager';
|
|
1
|
+
export * from './cameraDevice.js';
|
|
2
|
+
export * from './deviceManager.js';
|
|
3
|
+
export * from './pluginsManager.js';
|
|
4
|
+
export * from './systemManager.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BaseLogger, PluginsManagerBrowserProxyMethods } from '../../../../../shared/types';
|
|
2
|
-
import type { SocketService } from '../socket';
|
|
1
|
+
import type { BaseLogger, PluginsManagerBrowserProxyMethods } from '../../../../../shared/types/index.js';
|
|
2
|
+
import type { SocketService } from '../socket.js';
|
|
3
3
|
export declare class PluginsManager implements PluginsManagerBrowserProxyMethods {
|
|
4
4
|
private socketService;
|
|
5
5
|
private logger;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BaseLogger, SystemManagerBrowserProxyMethods } from '../../../../../shared/types';
|
|
2
|
-
import type { SocketService } from '../socket';
|
|
1
|
+
import type { BaseLogger, SystemManagerBrowserProxyMethods } from '../../../../../shared/types/index.js';
|
|
2
|
+
import type { SocketService } from '../socket.js';
|
|
3
3
|
export declare class SystemManager implements SystemManagerBrowserProxyMethods {
|
|
4
4
|
private socketService;
|
|
5
5
|
private logger;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Manager, type Socket } from 'socket.io-client';
|
|
2
|
-
import type { ManagerNames, WebsocketClientRequest } from '../../../../shared/types';
|
|
2
|
+
import type { ManagerNames, WebsocketClientRequest } from '../../../../shared/types/index.js';
|
|
3
3
|
export declare class SocketService {
|
|
4
4
|
manager: Manager;
|
|
5
5
|
private token;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BaseLogger } from '../../../../shared/types';
|
|
2
|
-
export type { AudioState, BaseLogger, BasicBrowserPeerConnection, BrowserCameraDevice, Camera, CameraConfig, CameraInput, DoorbellState, FfmpegOptions, Go2RtcAnswerMessage, Go2RtcIceCandidateMessage, Go2RtcIncomingMessage, Go2RtcOfferMessage, Go2RtcOutgoingMessage, LightState, MotionState, ObjectState, SirenState, } from '../../../../shared/types';
|
|
3
|
-
export { BrowserStreamingSession } from '../../../../shared/types';
|
|
1
|
+
import type { BaseLogger } from '../../../../shared/types/index.js';
|
|
2
|
+
export type { AudioState, BaseLogger, BasicBrowserPeerConnection, BrowserCameraDevice, Camera, CameraConfig, CameraInput, DoorbellState, FfmpegOptions, Go2RtcAnswerMessage, Go2RtcIceCandidateMessage, Go2RtcIncomingMessage, Go2RtcOfferMessage, Go2RtcOutgoingMessage, LightState, MotionState, ObjectState, SirenState, } from '../../../../shared/types/index.js';
|
|
3
|
+
export { BrowserStreamingSession } from '../../../../shared/types/index.js';
|
|
4
4
|
export type CameraUiClientConfig = WithCredentials | WithToken;
|
|
5
5
|
interface BaseConfig {
|
|
6
6
|
endpoint: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { MultipartFile } from '../types';
|
|
1
|
+
import zod from 'zod';
|
|
2
|
+
import type { MultipartFile } from '../types/index.js';
|
|
3
3
|
export declare const ACCEPTED_BACKUP_TYPES: string[];
|
|
4
4
|
export declare const MAX_BACKUP_FILE_SIZE = 50000000;
|
|
5
5
|
export declare const downloadBackupSchema: zod.ZodObject<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import zod from 'zod';
|
|
2
2
|
export declare const logLevelSchema: zod.ZodUnion<[zod.ZodLiteral<"info">, zod.ZodLiteral<"debug">, zod.ZodLiteral<"warn">, zod.ZodLiteral<"error">, zod.ZodLiteral<"trace">]>;
|
|
3
3
|
export declare const loggerSchema: zod.ZodObject<{
|
|
4
4
|
level: zod.ZodDefault<zod.ZodOptional<zod.ZodUnion<[zod.ZodLiteral<"info">, zod.ZodLiteral<"debug">, zod.ZodLiteral<"warn">, zod.ZodLiteral<"error">, zod.ZodLiteral<"trace">]>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import zod from 'zod';
|
|
2
2
|
export declare const logLevelGo2rtcSchema: zod.ZodUnion<[zod.ZodLiteral<"info">, zod.ZodLiteral<"debug">, zod.ZodLiteral<"trace">, zod.ZodLiteral<"warn">, zod.ZodLiteral<"error">, zod.ZodLiteral<"fatal">]>;
|
|
3
3
|
export declare const logSchema: zod.ZodObject<{
|
|
4
4
|
format: zod.ZodDefault<zod.ZodString>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { MultipartFile } from '../types';
|
|
1
|
+
import zod from 'zod';
|
|
2
|
+
import type { MultipartFile } from '../types/index.js';
|
|
3
3
|
export declare const ACCEPTED_IMAGE_TYPES: string[];
|
|
4
4
|
export declare const MAX_IMAGE_FILE_SIZE = 5000000;
|
|
5
5
|
export declare const userPreferencesCamviewGridsLayoutCameras: zod.ZodObject<{
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { Readable } from 'stream';
|
|
4
|
-
import type { CameraExtension, PluginContract, PluginRootSchema } from '../../plugins/types';
|
|
5
|
-
import type { LoggingLevel } from '../../services/config/types';
|
|
6
|
-
import type { CameraExtensions, CameraZone, DBCamera, DBCamviewLayout, DBRoles, DBUser } from '../database/types';
|
|
7
|
-
import type { ApplicationResponse } from '../go2rtc/types';
|
|
8
|
-
import type { RestoreBackupInput } from '../schemas/backup.schema';
|
|
9
|
-
import type { CreateCameraInput, PatchCameraInput, PreviewCameraInput } from '../schemas/cameras.schema';
|
|
10
|
-
import type { PatchConfigInput } from '../schemas/config.schema';
|
|
11
|
-
import type { PatchGo2RtcConfigInput } from '../schemas/go2rtc.schema';
|
|
12
|
-
import type { CreateUserInput, LoginUserInput, PatchUserInput } from '../schemas/users.schema';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { Readable } from 'node:stream';
|
|
4
|
+
import type { CameraExtension, PluginContract, PluginRootSchema } from '../../plugins/types.js';
|
|
5
|
+
import type { LoggingLevel } from '../../services/config/types.js';
|
|
6
|
+
import type { CameraExtensions, CameraZone, DBCamera, DBCamviewLayout, DBRoles, DBUser } from '../database/types.js';
|
|
7
|
+
import type { ApplicationResponse } from '../go2rtc/types.js';
|
|
8
|
+
import type { RestoreBackupInput } from '../schemas/backup.schema.js';
|
|
9
|
+
import type { CreateCameraInput, PatchCameraInput, PreviewCameraInput } from '../schemas/cameras.schema.js';
|
|
10
|
+
import type { PatchConfigInput } from '../schemas/config.schema.js';
|
|
11
|
+
import type { PatchGo2RtcConfigInput } from '../schemas/go2rtc.schema.js';
|
|
12
|
+
import type { CreateUserInput, LoginUserInput, PatchUserInput } from '../schemas/users.schema.js';
|
|
13
13
|
export interface BusboyFileStream extends Readable {
|
|
14
14
|
truncated: boolean;
|
|
15
15
|
bytesRead: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PLUGIN_STATUS } from '../../plugins/types';
|
|
1
|
+
import { PLUGIN_STATUS } from '../../plugins/types.js';
|
|
2
2
|
import type { Namespace } from 'socket.io';
|
|
3
3
|
import type { WebSocket } from 'ws';
|
|
4
|
-
import type { VideoStreamingMode } from '../database/types';
|
|
4
|
+
import type { VideoStreamingMode } from '../database/types.js';
|
|
5
5
|
export type SocketNsp = '/camera.ui' | '/metrics' | '/logs' | '/status' | '/notifications' | '/streams' | '/plugins' | '/proxy';
|
|
6
6
|
export interface SocketNspMap {
|
|
7
7
|
nsp: Namespace;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import type { Frame } from '../../decoder/types';
|
|
5
|
-
import type { CameraDelegate, CameraPrebufferDelegate, FfmpegOptions } from '../types';
|
|
1
|
+
import { StreamingConnectionOptions } from '../streaming/peer-connection.js';
|
|
2
|
+
import { StreamingSession } from '../streaming/streaming-session.js';
|
|
3
|
+
import { BaseCameraDevice } from './index.js';
|
|
4
|
+
import type { Frame } from '../../decoder/types.js';
|
|
5
|
+
import type { CameraDelegate, CameraPrebufferDelegate, FfmpegOptions } from '../types.js';
|
|
6
6
|
export declare abstract class CameraDevice extends BaseCameraDevice {
|
|
7
7
|
private _delegate?;
|
|
8
8
|
private _prebufferDelegate?;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BrowserStreamingSession } from '../streaming/browser/browser-streaming-session.js';
|
|
2
|
+
import { BaseCameraDevice } from './index.js';
|
|
3
3
|
export declare abstract class BrowserCameraDevice extends BaseCameraDevice {
|
|
4
4
|
createSession(sourceName: string, videoElement: HTMLVideoElement): Promise<BrowserStreamingSession>;
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
|
2
|
-
import type { Camera, CameraInformation, CameraPublicProperties, CameraType, CameraZone } from '../../api/database/types';
|
|
3
|
-
import type { IceServer } from '../../services/config/types';
|
|
4
|
-
import type { AudioState, BaseLogger, BatteryState, CameraSource, DoorbellState, LightState, MotionState, ObjectState, OnSetEvent, SirenState, StateValues } from '../types';
|
|
2
|
+
import type { Camera, CameraInformation, CameraPublicProperties, CameraType, CameraZone } from '../../api/database/types.js';
|
|
3
|
+
import type { IceServer } from '../../services/config/types.js';
|
|
4
|
+
import type { AudioState, BaseLogger, BatteryState, CameraSource, DoorbellState, LightState, MotionState, ObjectState, OnSetEvent, SirenState, StateValues } from '../types.js';
|
|
5
5
|
declare class Subscribed {
|
|
6
6
|
private readonly subscriptions;
|
|
7
7
|
private readonly additionalSubscriptions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReplaySubject, Subject } from 'rxjs';
|
|
2
|
-
import { Subscribed } from '../../utils/subscribed';
|
|
3
|
-
import type { IceServer } from '../../../services/config/types';
|
|
4
|
-
import type { BrowserCameraDevice as CameraDevice } from '../../base/cameraDeviceBrowser';
|
|
5
|
-
import type { BaseLogger, BasicBrowserPeerConnection } from '../../types';
|
|
2
|
+
import { Subscribed } from '../../utils/subscribed.js';
|
|
3
|
+
import type { IceServer } from '../../../services/config/types.js';
|
|
4
|
+
import type { BrowserCameraDevice as CameraDevice } from '../../base/cameraDeviceBrowser.js';
|
|
5
|
+
import type { BaseLogger, BasicBrowserPeerConnection } from '../../types.js';
|
|
6
6
|
export declare class BrowserPeerConnection extends Subscribed implements BasicBrowserPeerConnection {
|
|
7
7
|
onIceCandidate: Subject<RTCIceCandidate>;
|
|
8
8
|
onConnectionState: ReplaySubject<RTCPeerConnectionState>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
2
|
-
import { Subscribed } from '../../utils/subscribed';
|
|
3
|
-
import type { BrowserCameraDevice as CameraDevice } from '../../base/cameraDeviceBrowser';
|
|
4
|
-
import type { BaseLogger } from '../../types';
|
|
5
|
-
import type { WebrtcBrowserConnection } from './webrtc-browser-connection';
|
|
2
|
+
import { Subscribed } from '../../utils/subscribed.js';
|
|
3
|
+
import type { BrowserCameraDevice as CameraDevice } from '../../base/cameraDeviceBrowser.js';
|
|
4
|
+
import type { BaseLogger } from '../../types.js';
|
|
5
|
+
import type { WebrtcBrowserConnection } from './webrtc-browser-connection.js';
|
|
6
6
|
export declare class BrowserStreamingSession extends Subscribed {
|
|
7
7
|
readonly onCallAnswered: ReplaySubject<void>;
|
|
8
8
|
readonly onCallEnded: ReplaySubject<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReplaySubject, type Observable } from 'rxjs';
|
|
2
|
-
import { Subscribed } from '../../utils/subscribed';
|
|
3
|
-
import { BrowserPeerConnection } from './browser-peer-connection';
|
|
4
|
-
import type { IceServer } from '../../../services/config/types';
|
|
5
|
-
import type { BrowserCameraDevice as CameraDevice } from '../../base/cameraDeviceBrowser';
|
|
6
|
-
import type { BaseLogger } from '../../types';
|
|
2
|
+
import { Subscribed } from '../../utils/subscribed.js';
|
|
3
|
+
import { BrowserPeerConnection } from './browser-peer-connection.js';
|
|
4
|
+
import type { IceServer } from '../../../services/config/types.js';
|
|
5
|
+
import type { BrowserCameraDevice as CameraDevice } from '../../base/cameraDeviceBrowser.js';
|
|
6
|
+
import type { BaseLogger } from '../../types.js';
|
|
7
7
|
export declare class WebrtcBrowserConnection extends Subscribed {
|
|
8
8
|
readonly onCallAnswered: ReplaySubject<string>;
|
|
9
9
|
readonly onCallEnded: ReplaySubject<void>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Observable, ReplaySubject, Subject } from 'rxjs';
|
|
2
2
|
import { MediaStreamTrack, RTCSessionDescription, RTCIceCandidate as WeriftRTCICECandidate } from 'werift';
|
|
3
|
-
import { Subscribed } from '../utils/subscribed';
|
|
3
|
+
import { Subscribed } from '../utils/subscribed.js';
|
|
4
4
|
import type { ConnectionState, RTCIceCandidate, RtcpPacket, RtpPacket } from 'werift';
|
|
5
|
-
import type { IceServer } from '../../services/config/types';
|
|
6
|
-
import type { CameraDevice } from '../base/cameraDevice';
|
|
7
|
-
import type { BaseLogger } from '../types';
|
|
5
|
+
import type { IceServer } from '../../services/config/types.js';
|
|
6
|
+
import type { CameraDevice } from '../base/cameraDevice.js';
|
|
7
|
+
import type { BaseLogger } from '../types.js';
|
|
8
8
|
export interface BasicPeerConnection {
|
|
9
9
|
createOffer(): Promise<RTCSessionDescription>;
|
|
10
10
|
acceptAnswer(answer: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReplaySubject, Subject } from 'rxjs';
|
|
2
2
|
import { RtpPacket } from 'werift';
|
|
3
|
-
import { Subscribed } from '../utils/subscribed';
|
|
4
|
-
import type { CameraDevice } from '../base/cameraDevice';
|
|
5
|
-
import type { BaseLogger, FfmpegOptions, SpawnInput } from '../types';
|
|
6
|
-
import type { WebrtcConnection } from './webrtc-connection';
|
|
3
|
+
import { Subscribed } from '../utils/subscribed.js';
|
|
4
|
+
import type { CameraDevice } from '../base/cameraDevice.js';
|
|
5
|
+
import type { BaseLogger, FfmpegOptions, SpawnInput } from '../types.js';
|
|
6
|
+
import type { WebrtcConnection } from './webrtc-connection.js';
|
|
7
7
|
export declare class StreamingSession extends Subscribed {
|
|
8
8
|
readonly onCallEnded: ReplaySubject<void>;
|
|
9
9
|
readonly onVideoRtp: Subject<RtpPacket>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReplaySubject, Subject, type Observable } from 'rxjs';
|
|
2
|
-
import { Subscribed } from '../utils/subscribed';
|
|
2
|
+
import { Subscribed } from '../utils/subscribed.js';
|
|
3
3
|
import type { RtpPacket } from 'werift';
|
|
4
|
-
import type { IceServer } from '../../services/config/types';
|
|
5
|
-
import type { CameraDevice } from '../base/cameraDevice';
|
|
6
|
-
import type { BaseLogger } from '../types';
|
|
7
|
-
import type { StreamingConnectionOptions } from './peer-connection';
|
|
4
|
+
import type { IceServer } from '../../services/config/types.js';
|
|
5
|
+
import type { CameraDevice } from '../base/cameraDevice.js';
|
|
6
|
+
import type { BaseLogger } from '../types.js';
|
|
7
|
+
import type { StreamingConnectionOptions } from './peer-connection.js';
|
|
8
8
|
export declare class WebrtcConnection extends Subscribed {
|
|
9
9
|
readonly onCameraConnected: ReplaySubject<void>;
|
|
10
10
|
readonly onCallAnswered: ReplaySubject<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type { Observable, Subject } from 'rxjs';
|
|
3
|
-
import type { CameraInformation, CameraInput, CameraInputSettings } from '../api/database/types';
|
|
3
|
+
import type { CameraInformation, CameraInput, CameraInputSettings } from '../api/database/types.js';
|
|
4
4
|
export type SpawnInput = string | number;
|
|
5
5
|
export type PrebufferType = 'recording' | 'stream';
|
|
6
6
|
export interface CameraSource extends CameraInput {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { ChildProcess } from 'child_process';
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { ChildProcess } from 'node:child_process';
|
|
4
4
|
export interface FrameMetadata {
|
|
5
5
|
format: string;
|
|
6
6
|
frameSize: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Camera } from '../api/database/types';
|
|
2
|
-
import type { CameraDevice } from '../camera/base/cameraDevice';
|
|
3
|
-
import type { BrowserCameraDevice } from '../camera/base/cameraDeviceBrowser';
|
|
4
|
-
import type { CameraConfig, FfmpegOptions, OnSetEvent, PrebufferType, StateValues, StreamInfo } from '../camera/types';
|
|
5
|
-
import type { FrameMetadata } from '../decoder/types';
|
|
6
|
-
import type { CameraExtension } from '../plugins/types';
|
|
7
|
-
import type { IceServer } from '../services/config/types';
|
|
1
|
+
import type { Camera } from '../api/database/types.js';
|
|
2
|
+
import type { CameraDevice } from '../camera/base/cameraDevice.js';
|
|
3
|
+
import type { BrowserCameraDevice } from '../camera/base/cameraDeviceBrowser.js';
|
|
4
|
+
import type { CameraConfig, FfmpegOptions, OnSetEvent, PrebufferType, StateValues, StreamInfo } from '../camera/types.js';
|
|
5
|
+
import type { FrameMetadata } from '../decoder/types.js';
|
|
6
|
+
import type { CameraExtension } from '../plugins/types.js';
|
|
7
|
+
import type { IceServer } from '../services/config/types.js';
|
|
8
8
|
export type MethodKeys<T> = {
|
|
9
9
|
[K in keyof T]: T[K] extends Function ? K : never;
|
|
10
10
|
}[keyof T];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export type * from '../../server/src/api/database/types';
|
|
2
|
-
export type * from '../../server/src/api/types';
|
|
3
|
-
export type * from '../../server/src/api/ws/types';
|
|
4
|
-
export * from '../../server/src/camera/base/cameraDeviceBrowser';
|
|
5
|
-
export * from '../../server/src/camera/streaming/browser/browser-streaming-session';
|
|
6
|
-
export * from '../../server/src/camera/streaming/browser/webrtc-browser-connection';
|
|
7
|
-
export type * from '../../server/src/camera/types';
|
|
8
|
-
export type * from '../../server/src/decoder/types';
|
|
9
|
-
export * from '../../server/src/go2rtc/types';
|
|
10
|
-
export type * from '../../server/src/nats/types';
|
|
11
|
-
export * from '../../server/src/plugins/types';
|
|
12
|
-
export * from '../../server/src/services/config/types';
|
|
1
|
+
export type * from '../../server/src/api/database/types.js';
|
|
2
|
+
export type * from '../../server/src/api/types/index.js';
|
|
3
|
+
export type * from '../../server/src/api/ws/types.js';
|
|
4
|
+
export * from '../../server/src/camera/base/cameraDeviceBrowser.js';
|
|
5
|
+
export * from '../../server/src/camera/streaming/browser/browser-streaming-session.js';
|
|
6
|
+
export * from '../../server/src/camera/streaming/browser/webrtc-browser-connection.js';
|
|
7
|
+
export type * from '../../server/src/camera/types.js';
|
|
8
|
+
export type * from '../../server/src/decoder/types.js';
|
|
9
|
+
export * from '../../server/src/go2rtc/types.js';
|
|
10
|
+
export type * from '../../server/src/nats/types.js';
|
|
11
|
+
export * from '../../server/src/plugins/types.js';
|
|
12
|
+
export * from '../../server/src/services/config/types.js';
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camera.ui/browser",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"description": "camera.ui browser client",
|
|
5
5
|
"author": "seydx (https://github.com/seydx/camera.ui)",
|
|
6
6
|
"module": "./dist/bundle.js",
|
|
7
7
|
"types": "./dist/types/packages/client/browser/src/index.d.ts",
|
|
8
|
-
"type": "commonjs",
|
|
9
8
|
"exports": {
|
|
10
9
|
".": {
|
|
11
10
|
"import": "./dist/bundle.js",
|
|
12
11
|
"types": "./dist/types/packages/client/browser/src/index.d.ts"
|
|
13
12
|
}
|
|
14
13
|
},
|
|
14
|
+
"type": "module",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build:js": "webpack --mode production",
|
|
17
17
|
"build:types": "tsc --project tsconfig.json",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"@rushstack/eslint-patch": "^1.10.2",
|
|
34
34
|
"@swc/register": "^0.1.10",
|
|
35
35
|
"@types/webrtc": "^0.0.43",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
37
|
-
"@typescript-eslint/parser": "^7.
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^7.9.0",
|
|
37
|
+
"@typescript-eslint/parser": "^7.9.0",
|
|
38
38
|
"bufferutil": "^4.0.8",
|
|
39
39
|
"eslint": "^8.57.0",
|
|
40
40
|
"eslint-config-prettier": "^9.1.0",
|
|
41
41
|
"eslint-plugin-prettier": "^5.1.3",
|
|
42
42
|
"prettier": "^3.2.5",
|
|
43
|
-
"rimraf": "^5.0.
|
|
43
|
+
"rimraf": "^5.0.7",
|
|
44
44
|
"ts-loader": "^9.5.1",
|
|
45
45
|
"typescript": "^5.4.5",
|
|
46
46
|
"updates": "^16.0.1",
|