@eyepop.ai/eyepop 0.22.0 → 1.0.0

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 CHANGED
@@ -253,9 +253,13 @@ By default, `EyePop.workerEndpoint().connect()` will cancel all currently runnin
253
253
  It is assumed that the caller _takes full control_ of that worker. To disable this behavior create an endpoint with
254
254
  `EyePop.endpoint({stopJobs: false})`.
255
255
 
256
- ## Data endpoint (experimental)
256
+ ## Data endpoint (PREVIEW)
257
257
  To support managing your own datasets and control model optimization v0.21.0 introduces `EyePop.dataEndpoint()`,
258
- an experimental pre-release which is subject to change. An officially supported version will be released with v1.0.0
258
+ an experimental pre-release which is subject to change. An officially supported version will be released with v2.0.0
259
+
260
+ ## Composable Pops (PREVIEW)
261
+ See [Composable Pops](composable-pops.md) for a preview of client side composability of pops, introduced in v1.0.0.
262
+
259
263
 
260
264
 
261
265
 
@@ -314,11 +314,91 @@ declare enum ModelPrecisionType {
314
314
  }
315
315
  interface ModelInstanceDef {
316
316
  id?: string;
317
- model_id: string;
318
- dataset: string;
319
- version: string | undefined;
320
- format: ModelFormat;
321
- type: ModelPrecisionType;
317
+ model_folder_url?: string;
318
+ model_id?: string;
319
+ dataset?: string;
320
+ version?: string;
321
+ format?: ModelFormat;
322
+ type?: ModelPrecisionType;
323
+ }
324
+ declare enum PopComponentType {
325
+ FORWARD = "forward",
326
+ INFERENCE = "inference",
327
+ TRACING = "tracing",
328
+ CONTOUR_FINDER = "contour_finder",
329
+ COMPONENT_FINDER = "component_finder"
330
+ }
331
+ declare enum ForwardOperatorType {
332
+ FULL = "full",
333
+ CROP = "crop",
334
+ CROP_WITH_FULL_FALLBACK = "crop_with_full_fallback"
335
+ }
336
+ interface PopCrop {
337
+ maxItems?: number;
338
+ boxPadding?: number;
339
+ orientationTargetAngle?: number;
340
+ }
341
+ interface PopForwardOperator {
342
+ type: ForwardOperatorType;
343
+ includeClasses?: string[];
344
+ crop?: PopCrop;
345
+ }
346
+ interface PopForward {
347
+ operator?: PopForwardOperator;
348
+ targets: PopComponent[];
349
+ }
350
+ interface BaseComponent {
351
+ type: PopComponentType;
352
+ forward?: PopForward;
353
+ }
354
+ interface ForwardComponent extends BaseComponent {
355
+ }
356
+ declare enum InferenceType {
357
+ IMAGE_CLASSIFICATION = "image_classification",
358
+ OBJECT_DETECTION = "object_detection",
359
+ KEY_POINTS = "key_points",
360
+ OCR = "ocr",
361
+ MESH = "mesh",
362
+ FEATURE_VECTOR = "feature_vector",
363
+ SEMANTIC_SEGMENTATION = "semantic_segmentation",
364
+ SEGMENTATION = "segmentation"
365
+ }
366
+ interface InferenceComponent extends BaseComponent {
367
+ inferenceTypes: InferenceType[];
368
+ hidden?: boolean;
369
+ modelUuid: string;
370
+ categoryName?: string;
371
+ confidenceThreshold?: number;
372
+ targetFps?: string;
373
+ }
374
+ interface TracingComponent extends BaseComponent {
375
+ reidModelUuid?: string;
376
+ maxAgeSeconds?: number;
377
+ iouThreshold?: number;
378
+ simThreshold?: number;
379
+ }
380
+ declare enum ContourType {
381
+ ALL_PIXELS = "all_pixels",
382
+ POLYGON = "polygon",
383
+ CONVEX_HULL = "convex_hull",
384
+ HOUGH_CIRCLES = "hough_circles",
385
+ CIRCLE = "circle",
386
+ TRIANGLE = "triangle",
387
+ RECTANGLE = "rectangle"
388
+ }
389
+ interface ContourFinderComponent extends BaseComponent {
390
+ contourType: ContourType;
391
+ }
392
+ interface ComponentFinderComponent extends BaseComponent {
393
+ dilate?: number;
394
+ erode?: number;
395
+ keepSource?: boolean;
396
+ componentClassLabel?: string;
397
+ }
398
+ type PopComponent = ForwardComponent | InferenceComponent | TracingComponent | ContourFinderComponent | ComponentFinderComponent;
399
+ interface Pop {
400
+ components: PopComponent[];
401
+ postTransform?: string;
322
402
  }
323
403
 
324
404
  declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
@@ -335,10 +415,8 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
335
415
  protected statusHandler404(statusCode: number): void;
336
416
  session(): Promise<WorkerSession>;
337
417
  popName(): string | null;
338
- popComp(): string | null;
339
- postTransform(): string | null;
340
- changePopComp(popComp: string): Promise<void>;
341
- changePostTransform(postTransform: string | null): Promise<void>;
418
+ pop(): Pop | null;
419
+ changePop(pop: Pop): Promise<void>;
342
420
  popId(): string | null;
343
421
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
344
422
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
@@ -353,7 +431,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
353
431
  private jobDone;
354
432
  private jobStatus;
355
433
  protected reconnect(): Promise<WorkerEndpoint>;
356
- private startPopLessPipeline;
434
+ private startTransientPipeline;
357
435
  manifest(): Promise<SourcesEntry[]>;
358
436
  models(): Promise<ModelInstanceDef[]>;
359
437
  changeManifest(manifests: SourcesEntry[]): Promise<void>;
@@ -548,6 +626,117 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
548
626
  private dispatchChangeEvent;
549
627
  }
550
628
 
629
+ declare class Stream<Prediction> implements AsyncIterable<Prediction> {
630
+ private iterator;
631
+ controller: AbortController;
632
+ constructor(iterator: () => AsyncIterator<Prediction>, controller: AbortController);
633
+ static iterFromReadableStream<Prediction>(readableStream: Promise<ReadableStream<Uint8Array>>, controller: AbortController): AsyncIterator<Prediction, any, undefined>;
634
+ /**
635
+ * Generates a Stream from a newline-separated ReadableStream
636
+ * where each item is a JSON value.
637
+ */
638
+ static fromReadableStream<Prediction>(readableStream: ReadableStream<Uint8Array>, controller: AbortController): Stream<Prediction>;
639
+ [Symbol.asyncIterator](): AsyncIterator<Prediction>;
640
+ /**
641
+ * Splits the stream into two streams which can be
642
+ * independently read from at different speeds.
643
+ */
644
+ tee(): [Stream<Prediction>, Stream<Prediction>];
645
+ /**
646
+ * Converts this stream to a newline-separated ReadableStream of
647
+ * JSON stringified values in the stream
648
+ * which can be turned back into a Stream with `Stream.fromReadableStream()`.
649
+ */
650
+ toReadableStream(): ReadableStream;
651
+ }
652
+
653
+ declare class AbstractJob implements ResultStream {
654
+ protected _getSession: () => Promise<WorkerSession>;
655
+ protected _params: SourceParams | null;
656
+ protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
657
+ protected _controller: AbortController;
658
+ protected _client: HttpClient;
659
+ protected _requestLogger: Logger;
660
+ [Symbol.asyncIterator](): AsyncIterator<Prediction>;
661
+ protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
662
+ protected startJob(): Promise<Response>;
663
+ static n: number;
664
+ start(done: () => void, status: (statusCode: number) => void): AbstractJob;
665
+ cancel(): void;
666
+ }
667
+ declare class UploadJob extends AbstractJob {
668
+ private readonly _uploadStream;
669
+ private readonly _mimeType;
670
+ get [Symbol.toStringTag](): string;
671
+ constructor(stream: any, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
672
+ protected startJob(): Promise<Response>;
673
+ }
674
+ declare class LoadFromJob extends AbstractJob {
675
+ private readonly _location;
676
+ constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
677
+ get [Symbol.toStringTag](): string;
678
+ protected startJob(): Promise<Response>;
679
+ }
680
+ declare class LoadLiveIngressJob extends AbstractJob {
681
+ private readonly _ingressId;
682
+ constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
683
+ get [Symbol.toStringTag](): string;
684
+ protected startJob(): Promise<Response>;
685
+ }
686
+
687
+ interface OfferData {
688
+ iceUfrag: string;
689
+ icePwd: string;
690
+ medias: string[];
691
+ }
692
+ declare abstract class WebrtcBase {
693
+ protected readonly _getSession: () => Promise<WorkerSession>;
694
+ protected readonly _client: HttpClient;
695
+ protected readonly _requestLogger: Logger;
696
+ protected readonly _urlPath: string;
697
+ private readonly _ingressId;
698
+ private _location;
699
+ protected _pc: RTCPeerConnection | null;
700
+ protected _eTag: string;
701
+ protected _queuedCandidates: RTCIceCandidate[];
702
+ protected _offerData: OfferData | null;
703
+ constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
704
+ close(): Promise<void>;
705
+ ingressId(): string;
706
+ protected onLocalOffer(offer: RTCSessionDescriptionInit): Promise<WebrtcBase>;
707
+ protected abstract onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
708
+ protected sendLocalCandidates(candidates: RTCIceCandidate[]): Promise<WebrtcBase>;
709
+ protected onLocalCandidate(evt: RTCPeerConnectionIceEvent): Promise<WebrtcBase>;
710
+ static linkToIceServers(links: string | null): RTCIceServer[];
711
+ protected static editAnswer(answer: string, videoCodec: string, audioCodec: string | undefined, videoBitrate: number, audioBitrate: number | undefined, audioVoice: boolean): string;
712
+ private static setCodec;
713
+ private static setVideoBitrate;
714
+ private static setAudioBitrate;
715
+ static parseOffer(offer: string): OfferData;
716
+ static generateSdpFragment(offerData: OfferData, candidates: RTCIceCandidate[]): string;
717
+ static unquoteCredential(v: string | undefined): string;
718
+ }
719
+
720
+ declare class WebrtcWhep extends WebrtcBase implements LiveMedia {
721
+ private _stream;
722
+ constructor(ingressId: string, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
723
+ close(): Promise<void>;
724
+ stream(): Promise<MediaStream>;
725
+ start(): Promise<WebrtcWhep>;
726
+ protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
727
+ private onIceServers;
728
+ }
729
+
730
+ declare class WebrtcWhip extends WebrtcBase implements LiveMedia {
731
+ private _stream;
732
+ constructor(stream: MediaStream, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
733
+ start(): Promise<WebrtcWhip>;
734
+ stream(): Promise<MediaStream>;
735
+ protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
736
+ private onIceServers;
737
+ close(): Promise<void>;
738
+ }
739
+
551
740
  declare namespace EyePop {
552
741
  /**
553
742
  * @deprecated use workerEndpoint() instead
@@ -557,4 +746,4 @@ declare namespace EyePop {
557
746
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
558
747
  }
559
748
 
560
- export { type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type ChangeEvent, ChangeType, type Contour, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, EndpointState, EyePop, type FileSource, type IngressEvent, type LiveMedia, type LiveSource, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type SecretKeyAuth, type Session, type SessionAuth, type Source, type SourcesEntry, type StreamSource, type StreamTime, TranscodeMode, TransientPopId, type UrlSource, UserReview, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
749
+ export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -314,11 +314,91 @@ declare enum ModelPrecisionType {
314
314
  }
315
315
  interface ModelInstanceDef {
316
316
  id?: string;
317
- model_id: string;
318
- dataset: string;
319
- version: string | undefined;
320
- format: ModelFormat;
321
- type: ModelPrecisionType;
317
+ model_folder_url?: string;
318
+ model_id?: string;
319
+ dataset?: string;
320
+ version?: string;
321
+ format?: ModelFormat;
322
+ type?: ModelPrecisionType;
323
+ }
324
+ declare enum PopComponentType {
325
+ FORWARD = "forward",
326
+ INFERENCE = "inference",
327
+ TRACING = "tracing",
328
+ CONTOUR_FINDER = "contour_finder",
329
+ COMPONENT_FINDER = "component_finder"
330
+ }
331
+ declare enum ForwardOperatorType {
332
+ FULL = "full",
333
+ CROP = "crop",
334
+ CROP_WITH_FULL_FALLBACK = "crop_with_full_fallback"
335
+ }
336
+ interface PopCrop {
337
+ maxItems?: number;
338
+ boxPadding?: number;
339
+ orientationTargetAngle?: number;
340
+ }
341
+ interface PopForwardOperator {
342
+ type: ForwardOperatorType;
343
+ includeClasses?: string[];
344
+ crop?: PopCrop;
345
+ }
346
+ interface PopForward {
347
+ operator?: PopForwardOperator;
348
+ targets: PopComponent[];
349
+ }
350
+ interface BaseComponent {
351
+ type: PopComponentType;
352
+ forward?: PopForward;
353
+ }
354
+ interface ForwardComponent extends BaseComponent {
355
+ }
356
+ declare enum InferenceType {
357
+ IMAGE_CLASSIFICATION = "image_classification",
358
+ OBJECT_DETECTION = "object_detection",
359
+ KEY_POINTS = "key_points",
360
+ OCR = "ocr",
361
+ MESH = "mesh",
362
+ FEATURE_VECTOR = "feature_vector",
363
+ SEMANTIC_SEGMENTATION = "semantic_segmentation",
364
+ SEGMENTATION = "segmentation"
365
+ }
366
+ interface InferenceComponent extends BaseComponent {
367
+ inferenceTypes: InferenceType[];
368
+ hidden?: boolean;
369
+ modelUuid: string;
370
+ categoryName?: string;
371
+ confidenceThreshold?: number;
372
+ targetFps?: string;
373
+ }
374
+ interface TracingComponent extends BaseComponent {
375
+ reidModelUuid?: string;
376
+ maxAgeSeconds?: number;
377
+ iouThreshold?: number;
378
+ simThreshold?: number;
379
+ }
380
+ declare enum ContourType {
381
+ ALL_PIXELS = "all_pixels",
382
+ POLYGON = "polygon",
383
+ CONVEX_HULL = "convex_hull",
384
+ HOUGH_CIRCLES = "hough_circles",
385
+ CIRCLE = "circle",
386
+ TRIANGLE = "triangle",
387
+ RECTANGLE = "rectangle"
388
+ }
389
+ interface ContourFinderComponent extends BaseComponent {
390
+ contourType: ContourType;
391
+ }
392
+ interface ComponentFinderComponent extends BaseComponent {
393
+ dilate?: number;
394
+ erode?: number;
395
+ keepSource?: boolean;
396
+ componentClassLabel?: string;
397
+ }
398
+ type PopComponent = ForwardComponent | InferenceComponent | TracingComponent | ContourFinderComponent | ComponentFinderComponent;
399
+ interface Pop {
400
+ components: PopComponent[];
401
+ postTransform?: string;
322
402
  }
323
403
 
324
404
  declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
@@ -335,10 +415,8 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
335
415
  protected statusHandler404(statusCode: number): void;
336
416
  session(): Promise<WorkerSession>;
337
417
  popName(): string | null;
338
- popComp(): string | null;
339
- postTransform(): string | null;
340
- changePopComp(popComp: string): Promise<void>;
341
- changePostTransform(postTransform: string | null): Promise<void>;
418
+ pop(): Pop | null;
419
+ changePop(pop: Pop): Promise<void>;
342
420
  popId(): string | null;
343
421
  onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
344
422
  liveIngress(stream: MediaStream): Promise<LiveMedia>;
@@ -353,7 +431,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
353
431
  private jobDone;
354
432
  private jobStatus;
355
433
  protected reconnect(): Promise<WorkerEndpoint>;
356
- private startPopLessPipeline;
434
+ private startTransientPipeline;
357
435
  manifest(): Promise<SourcesEntry[]>;
358
436
  models(): Promise<ModelInstanceDef[]>;
359
437
  changeManifest(manifests: SourcesEntry[]): Promise<void>;
@@ -548,6 +626,117 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
548
626
  private dispatchChangeEvent;
549
627
  }
550
628
 
629
+ declare class Stream<Prediction> implements AsyncIterable<Prediction> {
630
+ private iterator;
631
+ controller: AbortController;
632
+ constructor(iterator: () => AsyncIterator<Prediction>, controller: AbortController);
633
+ static iterFromReadableStream<Prediction>(readableStream: Promise<ReadableStream<Uint8Array>>, controller: AbortController): AsyncIterator<Prediction, any, undefined>;
634
+ /**
635
+ * Generates a Stream from a newline-separated ReadableStream
636
+ * where each item is a JSON value.
637
+ */
638
+ static fromReadableStream<Prediction>(readableStream: ReadableStream<Uint8Array>, controller: AbortController): Stream<Prediction>;
639
+ [Symbol.asyncIterator](): AsyncIterator<Prediction>;
640
+ /**
641
+ * Splits the stream into two streams which can be
642
+ * independently read from at different speeds.
643
+ */
644
+ tee(): [Stream<Prediction>, Stream<Prediction>];
645
+ /**
646
+ * Converts this stream to a newline-separated ReadableStream of
647
+ * JSON stringified values in the stream
648
+ * which can be turned back into a Stream with `Stream.fromReadableStream()`.
649
+ */
650
+ toReadableStream(): ReadableStream;
651
+ }
652
+
653
+ declare class AbstractJob implements ResultStream {
654
+ protected _getSession: () => Promise<WorkerSession>;
655
+ protected _params: SourceParams | null;
656
+ protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
657
+ protected _controller: AbortController;
658
+ protected _client: HttpClient;
659
+ protected _requestLogger: Logger;
660
+ [Symbol.asyncIterator](): AsyncIterator<Prediction>;
661
+ protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
662
+ protected startJob(): Promise<Response>;
663
+ static n: number;
664
+ start(done: () => void, status: (statusCode: number) => void): AbstractJob;
665
+ cancel(): void;
666
+ }
667
+ declare class UploadJob extends AbstractJob {
668
+ private readonly _uploadStream;
669
+ private readonly _mimeType;
670
+ get [Symbol.toStringTag](): string;
671
+ constructor(stream: any, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
672
+ protected startJob(): Promise<Response>;
673
+ }
674
+ declare class LoadFromJob extends AbstractJob {
675
+ private readonly _location;
676
+ constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
677
+ get [Symbol.toStringTag](): string;
678
+ protected startJob(): Promise<Response>;
679
+ }
680
+ declare class LoadLiveIngressJob extends AbstractJob {
681
+ private readonly _ingressId;
682
+ constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
683
+ get [Symbol.toStringTag](): string;
684
+ protected startJob(): Promise<Response>;
685
+ }
686
+
687
+ interface OfferData {
688
+ iceUfrag: string;
689
+ icePwd: string;
690
+ medias: string[];
691
+ }
692
+ declare abstract class WebrtcBase {
693
+ protected readonly _getSession: () => Promise<WorkerSession>;
694
+ protected readonly _client: HttpClient;
695
+ protected readonly _requestLogger: Logger;
696
+ protected readonly _urlPath: string;
697
+ private readonly _ingressId;
698
+ private _location;
699
+ protected _pc: RTCPeerConnection | null;
700
+ protected _eTag: string;
701
+ protected _queuedCandidates: RTCIceCandidate[];
702
+ protected _offerData: OfferData | null;
703
+ constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
704
+ close(): Promise<void>;
705
+ ingressId(): string;
706
+ protected onLocalOffer(offer: RTCSessionDescriptionInit): Promise<WebrtcBase>;
707
+ protected abstract onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
708
+ protected sendLocalCandidates(candidates: RTCIceCandidate[]): Promise<WebrtcBase>;
709
+ protected onLocalCandidate(evt: RTCPeerConnectionIceEvent): Promise<WebrtcBase>;
710
+ static linkToIceServers(links: string | null): RTCIceServer[];
711
+ protected static editAnswer(answer: string, videoCodec: string, audioCodec: string | undefined, videoBitrate: number, audioBitrate: number | undefined, audioVoice: boolean): string;
712
+ private static setCodec;
713
+ private static setVideoBitrate;
714
+ private static setAudioBitrate;
715
+ static parseOffer(offer: string): OfferData;
716
+ static generateSdpFragment(offerData: OfferData, candidates: RTCIceCandidate[]): string;
717
+ static unquoteCredential(v: string | undefined): string;
718
+ }
719
+
720
+ declare class WebrtcWhep extends WebrtcBase implements LiveMedia {
721
+ private _stream;
722
+ constructor(ingressId: string, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
723
+ close(): Promise<void>;
724
+ stream(): Promise<MediaStream>;
725
+ start(): Promise<WebrtcWhep>;
726
+ protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
727
+ private onIceServers;
728
+ }
729
+
730
+ declare class WebrtcWhip extends WebrtcBase implements LiveMedia {
731
+ private _stream;
732
+ constructor(stream: MediaStream, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
733
+ start(): Promise<WebrtcWhip>;
734
+ stream(): Promise<MediaStream>;
735
+ protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
736
+ private onIceServers;
737
+ close(): Promise<void>;
738
+ }
739
+
551
740
  declare namespace EyePop {
552
741
  /**
553
742
  * @deprecated use workerEndpoint() instead
@@ -557,4 +746,4 @@ declare namespace EyePop {
557
746
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
558
747
  }
559
748
 
560
- export { type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type ChangeEvent, ChangeType, type Contour, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, EndpointState, EyePop, type FileSource, type IngressEvent, type LiveMedia, type LiveSource, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type SecretKeyAuth, type Session, type SessionAuth, type Source, type SourcesEntry, type StreamSource, type StreamTime, TranscodeMode, TransientPopId, type UrlSource, UserReview, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
749
+ export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, Endpoint, EndpointState, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type Mask, type Model, type ModelCreate, ModelFormat, type ModelInstanceDef, ModelPrecisionType, ModelStatus, ModelType, type ModelUpdate, type OAuth2Auth, type OnChangeEvent, type Options, type PathSource, type Point2d, type Point3d, type Pop, type PopComponent, PopComponentType, type PopCrop, type PopForward, type PopForwardOperator, type PredictedClass, type PredictedKeyPoint, type PredictedKeyPoints, type PredictedLabel, type PredictedMesh, type PredictedObject, type Prediction, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };