@eyepop.ai/eyepop 1.12.2 → 1.13.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.
@@ -280,20 +280,27 @@ interface LiveMedia {
280
280
  stream(): Promise<MediaStream>;
281
281
  close(): Promise<void>;
282
282
  }
283
+ declare enum VideoMode {
284
+ stream = "stream",
285
+ buffer = "buffer"
286
+ }
283
287
  interface IngressEvent {
284
288
  readonly ingressId: string;
285
289
  readonly event: 'stream-ready' | 'stream-ready';
286
290
  }
287
291
  interface FileSource {
288
292
  readonly file: File;
293
+ readonly videoMode?: VideoMode;
289
294
  }
290
295
  interface StreamSource {
291
296
  readonly stream: ReadableStream<Uint8Array> | Blob | BufferSource;
292
297
  readonly mimeType: string;
298
+ readonly videoMode?: VideoMode;
293
299
  }
294
300
  interface PathSource {
295
301
  readonly path: string;
296
302
  readonly mimeType?: string;
303
+ readonly videoMode?: VideoMode;
297
304
  }
298
305
  interface LiveSource {
299
306
  readonly ingressId: string;
@@ -831,8 +838,9 @@ declare class UploadJob extends AbstractJob {
831
838
  private readonly _uploadStream;
832
839
  private readonly _mimeType;
833
840
  private readonly _needsFullDuplex;
841
+ private readonly _videoMode;
834
842
  get [Symbol.toStringTag](): string;
835
- constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
843
+ constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, videoMode: VideoMode | undefined, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
836
844
  protected onEvent(event: StreamEvent): Promise<void>;
837
845
  protected startJob(): Promise<Response>;
838
846
  }
@@ -912,4 +920,4 @@ declare namespace EyePop {
912
920
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
913
921
  }
914
922
 
915
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
923
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -280,20 +280,27 @@ interface LiveMedia {
280
280
  stream(): Promise<MediaStream>;
281
281
  close(): Promise<void>;
282
282
  }
283
+ declare enum VideoMode {
284
+ stream = "stream",
285
+ buffer = "buffer"
286
+ }
283
287
  interface IngressEvent {
284
288
  readonly ingressId: string;
285
289
  readonly event: 'stream-ready' | 'stream-ready';
286
290
  }
287
291
  interface FileSource {
288
292
  readonly file: File;
293
+ readonly videoMode?: VideoMode;
289
294
  }
290
295
  interface StreamSource {
291
296
  readonly stream: ReadableStream<Uint8Array> | Blob | BufferSource;
292
297
  readonly mimeType: string;
298
+ readonly videoMode?: VideoMode;
293
299
  }
294
300
  interface PathSource {
295
301
  readonly path: string;
296
302
  readonly mimeType?: string;
303
+ readonly videoMode?: VideoMode;
297
304
  }
298
305
  interface LiveSource {
299
306
  readonly ingressId: string;
@@ -831,8 +838,9 @@ declare class UploadJob extends AbstractJob {
831
838
  private readonly _uploadStream;
832
839
  private readonly _mimeType;
833
840
  private readonly _needsFullDuplex;
841
+ private readonly _videoMode;
834
842
  get [Symbol.toStringTag](): string;
835
- constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
843
+ constructor(stream: ReadableStream<Uint8Array> | Blob | BufferSource, mimeType: string, videoMode: VideoMode | undefined, params: SourceParams | undefined, getSession: () => Promise<WorkerSession>, client: HttpClient, requestLogger: Logger);
836
844
  protected onEvent(event: StreamEvent): Promise<void>;
837
845
  protected startJob(): Promise<Response>;
838
846
  }
@@ -912,4 +920,4 @@ declare namespace EyePop {
912
920
  function dataEndpoint(opts?: DataOptions): DataEndpoint;
913
921
  }
914
922
 
915
- export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
923
+ export { AbstractJob, type Annotation, AnnotationType, ArtifactType, type Asset, type AssetImport, AssetStatus, type Auth0Options, type Authentication, type AutoAnnotateParams, type AutoAnnotatePrompt, AutoAnnotateTask, type BaseComponent, type Box, type ChangeEvent, ChangeType, type ComponentFinderComponent, type Contour, type ContourFinderComponent, ContourType, DataEndpoint, type DataOptions, type DataSession, type Dataset, type DatasetCreate, type DatasetHeroAssetUpdate, type DatasetParent, type DatasetUpdate, type DatasetVersion, type DatasetVersionAssetStats, Endpoint, EndpointState, ExportedBy, EyePop, type FileSource, type ForwardComponent, ForwardOperatorType, type InferenceComponent, InferenceType, type IngressEvent, type LiveMedia, type LiveSource, LoadFromJob, LoadLiveIngressJob, type LocalAuth, type Mask, type Model, type ModelCreate, type ModelExport, ModelExportStatus, ModelFormat, type ModelInstanceDef, type ModelMetrics, ModelPrecisionType, type ModelSample, ModelStatus, ModelTask, type ModelTrainingProgress, ModelTrainingStage, 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 PredictedMesh, type PredictedObject, type PredictedText, type Prediction, type QcAiHubExportParams, type ResultStream, type Roi, type SecretKeyAuth, Semaphore, type Session, type SessionAuth, type Source, type SourceParams, type SourcesEntry, Stream, type StreamEvent, type StreamSource, type StreamTime, type TracingComponent, TranscodeMode, TransientPopId, UploadJob, type UrlSource, UserReview, VideoMode, WebrtcBase, WebrtcWhep, WebrtcWhip, WorkerEndpoint, type WorkerOptions, type WorkerSession, EyePop as default };
@@ -8686,6 +8686,7 @@ __export(index_exports, {
8686
8686
  TransientPopId: () => TransientPopId,
8687
8687
  UploadJob: () => UploadJob,
8688
8688
  UserReview: () => UserReview,
8689
+ VideoMode: () => VideoMode,
8689
8690
  WebrtcBase: () => WebrtcBase,
8690
8691
  WebrtcWhep: () => WebrtcWhep,
8691
8692
  WebrtcWhip: () => WebrtcWhip,
@@ -8965,10 +8966,11 @@ var UploadJob = class extends AbstractJob {
8965
8966
  get [Symbol.toStringTag]() {
8966
8967
  return "uploadJob";
8967
8968
  }
8968
- constructor(stream, mimeType, params, getSession, client, requestLogger) {
8969
+ constructor(stream, mimeType, videoMode, params, getSession, client, requestLogger) {
8969
8970
  super(params, getSession, client, requestLogger);
8970
8971
  this._uploadStream = stream;
8971
8972
  this._mimeType = mimeType;
8973
+ this._videoMode = videoMode;
8972
8974
  this._needsFullDuplex = !client.isFullDuplex() && mimeType.startsWith("video/");
8973
8975
  }
8974
8976
  async onEvent(event) {
@@ -8981,7 +8983,8 @@ var UploadJob = class extends AbstractJob {
8981
8983
  return Promise.reject("session.baseUrl must not ne null");
8982
8984
  }
8983
8985
  let request;
8984
- const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=async&sourceId=${event.source_id}`;
8986
+ const videoModeQuery = this._videoMode ? `&videoMode=${this._videoMode}` : "";
8987
+ const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=async&sourceId=${event.source_id}${videoModeQuery}`;
8985
8988
  if (this._params) {
8986
8989
  this._requestLogger.debug("before POST %s with multipart body because of params", postUrl);
8987
8990
  const params = JSON.stringify(this._params);
@@ -9052,7 +9055,8 @@ var UploadJob = class extends AbstractJob {
9052
9055
  });
9053
9056
  this._requestLogger.debug("after POST {} to prepare full duplex upload {} {}", prepareUrl, response.status, response.statusText);
9054
9057
  } else {
9055
- const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=sync`;
9058
+ const videoModeQuery = this._videoMode ? `&videoMode=${this._videoMode}` : "";
9059
+ const postUrl = `${session.baseUrl.replace(/\/+$/, "")}/pipelines/${session.pipelineId}/source?mode=queue&processing=sync${videoModeQuery}`;
9056
9060
  if (this._params) {
9057
9061
  this._requestLogger.debug("before POST {} with multipart body because of params", postUrl);
9058
9062
  const params = JSON.stringify(this._params);
@@ -10402,6 +10406,7 @@ var WorkerEndpoint = class extends Endpoint {
10402
10406
  const job = new UploadJob(
10403
10407
  source.file.stream(),
10404
10408
  source.file.type,
10409
+ source.videoMode,
10405
10410
  params,
10406
10411
  async () => {
10407
10412
  return this.session();
@@ -10432,6 +10437,7 @@ var WorkerEndpoint = class extends Endpoint {
10432
10437
  const job = new UploadJob(
10433
10438
  source.stream,
10434
10439
  source.mimeType,
10440
+ source.videoMode,
10435
10441
  params,
10436
10442
  async () => {
10437
10443
  return this.session();
@@ -10463,6 +10469,7 @@ var WorkerEndpoint = class extends Endpoint {
10463
10469
  const job = new UploadJob(
10464
10470
  streamSource.stream,
10465
10471
  streamSource.mimeType,
10472
+ source.videoMode,
10466
10473
  params,
10467
10474
  async () => {
10468
10475
  return this.session();
@@ -11577,6 +11584,11 @@ var DataEndpoint = class extends Endpoint {
11577
11584
  };
11578
11585
 
11579
11586
  // worker/worker_types.ts
11587
+ var VideoMode = /* @__PURE__ */ ((VideoMode2) => {
11588
+ VideoMode2["stream"] = "stream";
11589
+ VideoMode2["buffer"] = "buffer";
11590
+ return VideoMode2;
11591
+ })(VideoMode || {});
11580
11592
  var ModelFormat = /* @__PURE__ */ ((ModelFormat2) => {
11581
11593
  ModelFormat2["TensorFlowLite"] = "TensorFlowLite";
11582
11594
  ModelFormat2["TensorFlowGraphDef"] = "TensorFlowGraphDef";
@@ -11777,6 +11789,7 @@ var index_default = EyePop;
11777
11789
  TransientPopId,
11778
11790
  UploadJob,
11779
11791
  UserReview,
11792
+ VideoMode,
11780
11793
  WebrtcBase,
11781
11794
  WebrtcWhep,
11782
11795
  WebrtcWhip,