@eyepop.ai/eyepop 0.22.0 → 0.23.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/dist/eyepop.index.d.mts +117 -2
- package/dist/eyepop.index.d.ts +117 -2
- package/dist/eyepop.index.js +33 -3
- package/dist/eyepop.index.js.map +1 -1
- package/dist/eyepop.index.mjs +23 -3
- package/dist/eyepop.index.mjs.map +1 -1
- package/dist/eyepop.min.js +1 -1
- package/package.json +4 -4
package/dist/eyepop.index.d.mts
CHANGED
|
@@ -321,6 +321,10 @@ interface ModelInstanceDef {
|
|
|
321
321
|
type: ModelPrecisionType;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
interface ModelRef {
|
|
325
|
+
id: string;
|
|
326
|
+
folderUrl: string;
|
|
327
|
+
}
|
|
324
328
|
declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
325
329
|
private _baseUrl;
|
|
326
330
|
private _pipelineId;
|
|
@@ -337,7 +341,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
|
337
341
|
popName(): string | null;
|
|
338
342
|
popComp(): string | null;
|
|
339
343
|
postTransform(): string | null;
|
|
340
|
-
changePopComp(popComp: string): Promise<void>;
|
|
344
|
+
changePopComp(popComp: string, modelRefs?: ModelRef[]): Promise<void>;
|
|
341
345
|
changePostTransform(postTransform: string | null): Promise<void>;
|
|
342
346
|
popId(): string | null;
|
|
343
347
|
onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
|
|
@@ -548,6 +552,117 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
548
552
|
private dispatchChangeEvent;
|
|
549
553
|
}
|
|
550
554
|
|
|
555
|
+
declare class Stream<Prediction> implements AsyncIterable<Prediction> {
|
|
556
|
+
private iterator;
|
|
557
|
+
controller: AbortController;
|
|
558
|
+
constructor(iterator: () => AsyncIterator<Prediction>, controller: AbortController);
|
|
559
|
+
static iterFromReadableStream<Prediction>(readableStream: Promise<ReadableStream<Uint8Array>>, controller: AbortController): AsyncIterator<Prediction, any, undefined>;
|
|
560
|
+
/**
|
|
561
|
+
* Generates a Stream from a newline-separated ReadableStream
|
|
562
|
+
* where each item is a JSON value.
|
|
563
|
+
*/
|
|
564
|
+
static fromReadableStream<Prediction>(readableStream: ReadableStream<Uint8Array>, controller: AbortController): Stream<Prediction>;
|
|
565
|
+
[Symbol.asyncIterator](): AsyncIterator<Prediction>;
|
|
566
|
+
/**
|
|
567
|
+
* Splits the stream into two streams which can be
|
|
568
|
+
* independently read from at different speeds.
|
|
569
|
+
*/
|
|
570
|
+
tee(): [Stream<Prediction>, Stream<Prediction>];
|
|
571
|
+
/**
|
|
572
|
+
* Converts this stream to a newline-separated ReadableStream of
|
|
573
|
+
* JSON stringified values in the stream
|
|
574
|
+
* which can be turned back into a Stream with `Stream.fromReadableStream()`.
|
|
575
|
+
*/
|
|
576
|
+
toReadableStream(): ReadableStream;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare class AbstractJob implements ResultStream {
|
|
580
|
+
protected _getSession: () => Promise<WorkerSession>;
|
|
581
|
+
protected _params: SourceParams | null;
|
|
582
|
+
protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
|
|
583
|
+
protected _controller: AbortController;
|
|
584
|
+
protected _client: HttpClient;
|
|
585
|
+
protected _requestLogger: Logger;
|
|
586
|
+
[Symbol.asyncIterator](): AsyncIterator<Prediction>;
|
|
587
|
+
protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
588
|
+
protected startJob(): Promise<Response>;
|
|
589
|
+
static n: number;
|
|
590
|
+
start(done: () => void, status: (statusCode: number) => void): AbstractJob;
|
|
591
|
+
cancel(): void;
|
|
592
|
+
}
|
|
593
|
+
declare class UploadJob extends AbstractJob {
|
|
594
|
+
private readonly _uploadStream;
|
|
595
|
+
private readonly _mimeType;
|
|
596
|
+
get [Symbol.toStringTag](): string;
|
|
597
|
+
constructor(stream: any, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
598
|
+
protected startJob(): Promise<Response>;
|
|
599
|
+
}
|
|
600
|
+
declare class LoadFromJob extends AbstractJob {
|
|
601
|
+
private readonly _location;
|
|
602
|
+
constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
603
|
+
get [Symbol.toStringTag](): string;
|
|
604
|
+
protected startJob(): Promise<Response>;
|
|
605
|
+
}
|
|
606
|
+
declare class LoadLiveIngressJob extends AbstractJob {
|
|
607
|
+
private readonly _ingressId;
|
|
608
|
+
constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
609
|
+
get [Symbol.toStringTag](): string;
|
|
610
|
+
protected startJob(): Promise<Response>;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
interface OfferData {
|
|
614
|
+
iceUfrag: string;
|
|
615
|
+
icePwd: string;
|
|
616
|
+
medias: string[];
|
|
617
|
+
}
|
|
618
|
+
declare abstract class WebrtcBase {
|
|
619
|
+
protected readonly _getSession: () => Promise<WorkerSession>;
|
|
620
|
+
protected readonly _client: HttpClient;
|
|
621
|
+
protected readonly _requestLogger: Logger;
|
|
622
|
+
protected readonly _urlPath: string;
|
|
623
|
+
private readonly _ingressId;
|
|
624
|
+
private _location;
|
|
625
|
+
protected _pc: RTCPeerConnection | null;
|
|
626
|
+
protected _eTag: string;
|
|
627
|
+
protected _queuedCandidates: RTCIceCandidate[];
|
|
628
|
+
protected _offerData: OfferData | null;
|
|
629
|
+
constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
|
|
630
|
+
close(): Promise<void>;
|
|
631
|
+
ingressId(): string;
|
|
632
|
+
protected onLocalOffer(offer: RTCSessionDescriptionInit): Promise<WebrtcBase>;
|
|
633
|
+
protected abstract onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
|
|
634
|
+
protected sendLocalCandidates(candidates: RTCIceCandidate[]): Promise<WebrtcBase>;
|
|
635
|
+
protected onLocalCandidate(evt: RTCPeerConnectionIceEvent): Promise<WebrtcBase>;
|
|
636
|
+
static linkToIceServers(links: string | null): RTCIceServer[];
|
|
637
|
+
protected static editAnswer(answer: string, videoCodec: string, audioCodec: string | undefined, videoBitrate: number, audioBitrate: number | undefined, audioVoice: boolean): string;
|
|
638
|
+
private static setCodec;
|
|
639
|
+
private static setVideoBitrate;
|
|
640
|
+
private static setAudioBitrate;
|
|
641
|
+
static parseOffer(offer: string): OfferData;
|
|
642
|
+
static generateSdpFragment(offerData: OfferData, candidates: RTCIceCandidate[]): string;
|
|
643
|
+
static unquoteCredential(v: string | undefined): string;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
declare class WebrtcWhep extends WebrtcBase implements LiveMedia {
|
|
647
|
+
private _stream;
|
|
648
|
+
constructor(ingressId: string, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
649
|
+
close(): Promise<void>;
|
|
650
|
+
stream(): Promise<MediaStream>;
|
|
651
|
+
start(): Promise<WebrtcWhep>;
|
|
652
|
+
protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
|
|
653
|
+
private onIceServers;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare class WebrtcWhip extends WebrtcBase implements LiveMedia {
|
|
657
|
+
private _stream;
|
|
658
|
+
constructor(stream: MediaStream, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
659
|
+
start(): Promise<WebrtcWhip>;
|
|
660
|
+
stream(): Promise<MediaStream>;
|
|
661
|
+
protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
|
|
662
|
+
private onIceServers;
|
|
663
|
+
close(): Promise<void>;
|
|
664
|
+
}
|
|
665
|
+
|
|
551
666
|
declare namespace EyePop {
|
|
552
667
|
/**
|
|
553
668
|
* @deprecated use workerEndpoint() instead
|
|
@@ -557,4 +672,4 @@ declare namespace EyePop {
|
|
|
557
672
|
function dataEndpoint(opts?: DataOptions): DataEndpoint;
|
|
558
673
|
}
|
|
559
674
|
|
|
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 };
|
|
675
|
+
export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type Box, type ChangeEvent, ChangeType, type Contour, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, Endpoint, EndpointState, EyePop, type FileSource, 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 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, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
|
package/dist/eyepop.index.d.ts
CHANGED
|
@@ -321,6 +321,10 @@ interface ModelInstanceDef {
|
|
|
321
321
|
type: ModelPrecisionType;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
interface ModelRef {
|
|
325
|
+
id: string;
|
|
326
|
+
folderUrl: string;
|
|
327
|
+
}
|
|
324
328
|
declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
325
329
|
private _baseUrl;
|
|
326
330
|
private _pipelineId;
|
|
@@ -337,7 +341,7 @@ declare class WorkerEndpoint extends Endpoint<WorkerEndpoint> {
|
|
|
337
341
|
popName(): string | null;
|
|
338
342
|
popComp(): string | null;
|
|
339
343
|
postTransform(): string | null;
|
|
340
|
-
changePopComp(popComp: string): Promise<void>;
|
|
344
|
+
changePopComp(popComp: string, modelRefs?: ModelRef[]): Promise<void>;
|
|
341
345
|
changePostTransform(postTransform: string | null): Promise<void>;
|
|
342
346
|
popId(): string | null;
|
|
343
347
|
onIngressEvent(handler: (event: IngressEvent) => void): WorkerEndpoint;
|
|
@@ -548,6 +552,117 @@ declare class DataEndpoint extends Endpoint<DataEndpoint> {
|
|
|
548
552
|
private dispatchChangeEvent;
|
|
549
553
|
}
|
|
550
554
|
|
|
555
|
+
declare class Stream<Prediction> implements AsyncIterable<Prediction> {
|
|
556
|
+
private iterator;
|
|
557
|
+
controller: AbortController;
|
|
558
|
+
constructor(iterator: () => AsyncIterator<Prediction>, controller: AbortController);
|
|
559
|
+
static iterFromReadableStream<Prediction>(readableStream: Promise<ReadableStream<Uint8Array>>, controller: AbortController): AsyncIterator<Prediction, any, undefined>;
|
|
560
|
+
/**
|
|
561
|
+
* Generates a Stream from a newline-separated ReadableStream
|
|
562
|
+
* where each item is a JSON value.
|
|
563
|
+
*/
|
|
564
|
+
static fromReadableStream<Prediction>(readableStream: ReadableStream<Uint8Array>, controller: AbortController): Stream<Prediction>;
|
|
565
|
+
[Symbol.asyncIterator](): AsyncIterator<Prediction>;
|
|
566
|
+
/**
|
|
567
|
+
* Splits the stream into two streams which can be
|
|
568
|
+
* independently read from at different speeds.
|
|
569
|
+
*/
|
|
570
|
+
tee(): [Stream<Prediction>, Stream<Prediction>];
|
|
571
|
+
/**
|
|
572
|
+
* Converts this stream to a newline-separated ReadableStream of
|
|
573
|
+
* JSON stringified values in the stream
|
|
574
|
+
* which can be turned back into a Stream with `Stream.fromReadableStream()`.
|
|
575
|
+
*/
|
|
576
|
+
toReadableStream(): ReadableStream;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare class AbstractJob implements ResultStream {
|
|
580
|
+
protected _getSession: () => Promise<WorkerSession>;
|
|
581
|
+
protected _params: SourceParams | null;
|
|
582
|
+
protected _responseStream: Promise<ReadableStream<Uint8Array>> | null;
|
|
583
|
+
protected _controller: AbortController;
|
|
584
|
+
protected _client: HttpClient;
|
|
585
|
+
protected _requestLogger: Logger;
|
|
586
|
+
[Symbol.asyncIterator](): AsyncIterator<Prediction>;
|
|
587
|
+
protected constructor(params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
588
|
+
protected startJob(): Promise<Response>;
|
|
589
|
+
static n: number;
|
|
590
|
+
start(done: () => void, status: (statusCode: number) => void): AbstractJob;
|
|
591
|
+
cancel(): void;
|
|
592
|
+
}
|
|
593
|
+
declare class UploadJob extends AbstractJob {
|
|
594
|
+
private readonly _uploadStream;
|
|
595
|
+
private readonly _mimeType;
|
|
596
|
+
get [Symbol.toStringTag](): string;
|
|
597
|
+
constructor(stream: any, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
598
|
+
protected startJob(): Promise<Response>;
|
|
599
|
+
}
|
|
600
|
+
declare class LoadFromJob extends AbstractJob {
|
|
601
|
+
private readonly _location;
|
|
602
|
+
constructor(location: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
603
|
+
get [Symbol.toStringTag](): string;
|
|
604
|
+
protected startJob(): Promise<Response>;
|
|
605
|
+
}
|
|
606
|
+
declare class LoadLiveIngressJob extends AbstractJob {
|
|
607
|
+
private readonly _ingressId;
|
|
608
|
+
constructor(ingressId: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
609
|
+
get [Symbol.toStringTag](): string;
|
|
610
|
+
protected startJob(): Promise<Response>;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
interface OfferData {
|
|
614
|
+
iceUfrag: string;
|
|
615
|
+
icePwd: string;
|
|
616
|
+
medias: string[];
|
|
617
|
+
}
|
|
618
|
+
declare abstract class WebrtcBase {
|
|
619
|
+
protected readonly _getSession: () => Promise<WorkerSession>;
|
|
620
|
+
protected readonly _client: HttpClient;
|
|
621
|
+
protected readonly _requestLogger: Logger;
|
|
622
|
+
protected readonly _urlPath: string;
|
|
623
|
+
private readonly _ingressId;
|
|
624
|
+
private _location;
|
|
625
|
+
protected _pc: RTCPeerConnection | null;
|
|
626
|
+
protected _eTag: string;
|
|
627
|
+
protected _queuedCandidates: RTCIceCandidate[];
|
|
628
|
+
protected _offerData: OfferData | null;
|
|
629
|
+
constructor(getSession: () => Promise<WorkerSession>, client: HttpClient, ingressId: string, urlBasePath: string, requestLogger: Logger);
|
|
630
|
+
close(): Promise<void>;
|
|
631
|
+
ingressId(): string;
|
|
632
|
+
protected onLocalOffer(offer: RTCSessionDescriptionInit): Promise<WebrtcBase>;
|
|
633
|
+
protected abstract onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
|
|
634
|
+
protected sendLocalCandidates(candidates: RTCIceCandidate[]): Promise<WebrtcBase>;
|
|
635
|
+
protected onLocalCandidate(evt: RTCPeerConnectionIceEvent): Promise<WebrtcBase>;
|
|
636
|
+
static linkToIceServers(links: string | null): RTCIceServer[];
|
|
637
|
+
protected static editAnswer(answer: string, videoCodec: string, audioCodec: string | undefined, videoBitrate: number, audioBitrate: number | undefined, audioVoice: boolean): string;
|
|
638
|
+
private static setCodec;
|
|
639
|
+
private static setVideoBitrate;
|
|
640
|
+
private static setAudioBitrate;
|
|
641
|
+
static parseOffer(offer: string): OfferData;
|
|
642
|
+
static generateSdpFragment(offerData: OfferData, candidates: RTCIceCandidate[]): string;
|
|
643
|
+
static unquoteCredential(v: string | undefined): string;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
declare class WebrtcWhep extends WebrtcBase implements LiveMedia {
|
|
647
|
+
private _stream;
|
|
648
|
+
constructor(ingressId: string, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
649
|
+
close(): Promise<void>;
|
|
650
|
+
stream(): Promise<MediaStream>;
|
|
651
|
+
start(): Promise<WebrtcWhep>;
|
|
652
|
+
protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
|
|
653
|
+
private onIceServers;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare class WebrtcWhip extends WebrtcBase implements LiveMedia {
|
|
657
|
+
private _stream;
|
|
658
|
+
constructor(stream: MediaStream, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
|
|
659
|
+
start(): Promise<WebrtcWhip>;
|
|
660
|
+
stream(): Promise<MediaStream>;
|
|
661
|
+
protected onRemoteAnswer(answer: RTCSessionDescription): Promise<WebrtcBase>;
|
|
662
|
+
private onIceServers;
|
|
663
|
+
close(): Promise<void>;
|
|
664
|
+
}
|
|
665
|
+
|
|
551
666
|
declare namespace EyePop {
|
|
552
667
|
/**
|
|
553
668
|
* @deprecated use workerEndpoint() instead
|
|
@@ -557,4 +672,4 @@ declare namespace EyePop {
|
|
|
557
672
|
function dataEndpoint(opts?: DataOptions): DataEndpoint;
|
|
558
673
|
}
|
|
559
674
|
|
|
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 };
|
|
675
|
+
export { AbstractJob, type Annotation, AnnotationType, type Asset, AssetStatus, type Auth0Options, type Authentication, type Box, type ChangeEvent, ChangeType, type Contour, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetUpdate, type DatasetVersion, Endpoint, EndpointState, EyePop, type FileSource, 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 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, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
|
package/dist/eyepop.index.js
CHANGED
|
@@ -8656,19 +8656,29 @@ var require_mime_types = __commonJS({
|
|
|
8656
8656
|
// index.ts
|
|
8657
8657
|
var eyepop_exports = {};
|
|
8658
8658
|
__export(eyepop_exports, {
|
|
8659
|
+
AbstractJob: () => AbstractJob,
|
|
8659
8660
|
AnnotationType: () => AnnotationType,
|
|
8660
8661
|
AssetStatus: () => AssetStatus,
|
|
8661
8662
|
ChangeType: () => ChangeType,
|
|
8662
8663
|
DataEndpoint: () => DataEndpoint,
|
|
8664
|
+
Endpoint: () => Endpoint,
|
|
8663
8665
|
EndpointState: () => EndpointState,
|
|
8664
8666
|
EyePop: () => EyePop,
|
|
8667
|
+
LoadFromJob: () => LoadFromJob,
|
|
8668
|
+
LoadLiveIngressJob: () => LoadLiveIngressJob,
|
|
8665
8669
|
ModelFormat: () => ModelFormat,
|
|
8666
8670
|
ModelPrecisionType: () => ModelPrecisionType,
|
|
8667
8671
|
ModelStatus: () => ModelStatus,
|
|
8668
8672
|
ModelType: () => ModelType,
|
|
8673
|
+
Semaphore: () => Semaphore,
|
|
8674
|
+
Stream: () => Stream,
|
|
8669
8675
|
TranscodeMode: () => TranscodeMode,
|
|
8670
8676
|
TransientPopId: () => TransientPopId,
|
|
8677
|
+
UploadJob: () => UploadJob,
|
|
8671
8678
|
UserReview: () => UserReview,
|
|
8679
|
+
WebrtcBase: () => WebrtcBase,
|
|
8680
|
+
WebrtcWhep: () => WebrtcWhep,
|
|
8681
|
+
WebrtcWhip: () => WebrtcWhip,
|
|
8672
8682
|
WorkerEndpoint: () => WorkerEndpoint,
|
|
8673
8683
|
default: () => eyepop_default
|
|
8674
8684
|
});
|
|
@@ -10112,14 +10122,15 @@ var WorkerEndpoint = class extends Endpoint {
|
|
|
10112
10122
|
return null;
|
|
10113
10123
|
}
|
|
10114
10124
|
}
|
|
10115
|
-
async changePopComp(popComp) {
|
|
10125
|
+
async changePopComp(popComp, modelRefs = []) {
|
|
10116
10126
|
const client = this._client;
|
|
10117
10127
|
const baseUrl = this._baseUrl;
|
|
10118
10128
|
if (!baseUrl || !client) {
|
|
10119
10129
|
return Promise.reject("endpoint not connected, use connect() before changePopComp()");
|
|
10120
10130
|
}
|
|
10121
10131
|
const body = {
|
|
10122
|
-
"pipeline": popComp
|
|
10132
|
+
"pipeline": popComp,
|
|
10133
|
+
"modelRefs": modelRefs
|
|
10123
10134
|
};
|
|
10124
10135
|
let response = await this.fetchWithRetry(async () => {
|
|
10125
10136
|
const session = await this.session();
|
|
@@ -10136,10 +10147,12 @@ var WorkerEndpoint = class extends Endpoint {
|
|
|
10136
10147
|
});
|
|
10137
10148
|
if (response.status != 204) {
|
|
10138
10149
|
const message = await response.text();
|
|
10150
|
+
console.error(message);
|
|
10139
10151
|
return Promise.reject(`Unexpected status ${response.status}: ${message}`);
|
|
10140
10152
|
}
|
|
10141
10153
|
if (this._pipeline) {
|
|
10142
10154
|
this._pipeline.inferPipeline = popComp;
|
|
10155
|
+
this._pipeline.modelRefs = modelRefs;
|
|
10143
10156
|
}
|
|
10144
10157
|
}
|
|
10145
10158
|
async changePostTransform(postTransform) {
|
|
@@ -10502,9 +10515,16 @@ var WorkerEndpoint = class extends Endpoint {
|
|
|
10502
10515
|
} else {
|
|
10503
10516
|
postTransform = null;
|
|
10504
10517
|
}
|
|
10518
|
+
let modelRefs;
|
|
10519
|
+
if (this._pipeline && this._pipeline.modelRefs) {
|
|
10520
|
+
modelRefs = this._pipeline.modelRefs;
|
|
10521
|
+
} else {
|
|
10522
|
+
modelRefs = [];
|
|
10523
|
+
}
|
|
10505
10524
|
const body = {
|
|
10506
10525
|
"inferPipelineDef": {
|
|
10507
|
-
"pipeline": pipeline
|
|
10526
|
+
"pipeline": pipeline,
|
|
10527
|
+
"modelRefs": modelRefs
|
|
10508
10528
|
},
|
|
10509
10529
|
"postTransformDef": {
|
|
10510
10530
|
"transform": postTransform
|
|
@@ -11345,19 +11365,29 @@ var EyePop;
|
|
|
11345
11365
|
var eyepop_default = EyePop;
|
|
11346
11366
|
// Annotate the CommonJS export names for ESM import in node:
|
|
11347
11367
|
0 && (module.exports = {
|
|
11368
|
+
AbstractJob,
|
|
11348
11369
|
AnnotationType,
|
|
11349
11370
|
AssetStatus,
|
|
11350
11371
|
ChangeType,
|
|
11351
11372
|
DataEndpoint,
|
|
11373
|
+
Endpoint,
|
|
11352
11374
|
EndpointState,
|
|
11353
11375
|
EyePop,
|
|
11376
|
+
LoadFromJob,
|
|
11377
|
+
LoadLiveIngressJob,
|
|
11354
11378
|
ModelFormat,
|
|
11355
11379
|
ModelPrecisionType,
|
|
11356
11380
|
ModelStatus,
|
|
11357
11381
|
ModelType,
|
|
11382
|
+
Semaphore,
|
|
11383
|
+
Stream,
|
|
11358
11384
|
TranscodeMode,
|
|
11359
11385
|
TransientPopId,
|
|
11386
|
+
UploadJob,
|
|
11360
11387
|
UserReview,
|
|
11388
|
+
WebrtcBase,
|
|
11389
|
+
WebrtcWhep,
|
|
11390
|
+
WebrtcWhip,
|
|
11361
11391
|
WorkerEndpoint
|
|
11362
11392
|
});
|
|
11363
11393
|
/*! Bundled license information:
|