deepar 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/deepar.d.ts CHANGED
@@ -205,6 +205,20 @@ declare enum LogType {
205
205
  */
206
206
  ERROR = 3
207
207
  }
208
+ /**
209
+ * Parameters that specify the format of recorded videos. Used by {@link DeepAR.startVideoRecording}.
210
+ */
211
+ export interface VideoRecordingOptions {
212
+ /**
213
+ * A MIME type specyfing the format for the resulting video, such as `video/webm` or `video/mp4`.
214
+ * Corresponds to the MIME type used by <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">Blob</a>
215
+ * objects and <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder">MediaRecorder</a>
216
+ * from the MediaStream Recording API.
217
+ *
218
+ * Note that `video/mp4` may not be supported in all browsers.
219
+ */
220
+ mimeType?: string;
221
+ }
208
222
  /**
209
223
  * Main class for interacting with DeepAR SDK.
210
224
  */
@@ -375,8 +389,9 @@ export declare class DeepAR {
375
389
  touchOccurred(touchInfo: ARTouchInfo): void;
376
390
  /**
377
391
  * Starts video recording of the canvas.
392
+ * @param options Video recording options.
378
393
  */
379
- startVideoRecording(): void;
394
+ startVideoRecording(options?: VideoRecordingOptions): void;
380
395
  /**
381
396
  * Stops the video recording and returns a video blob via callback.
382
397
  * @param callback A callback function with single argument that will be a blob of video/mp4 file.
@@ -414,6 +429,11 @@ export declare class DeepAR {
414
429
  * @param enable True - DeepAR will use its internal timer for the rendering loop. Rendering will work even when tab is not focused. False - DeepAR will use requestAnimationFrame() for the rendering loop.
415
430
  */
416
431
  setOffscreenRenderingEnabled(enable: boolean): void;
432
+ /**
433
+ * @internal
434
+ * @param enable
435
+ */
436
+ enableAutoframing(enable: boolean): void;
417
437
  /**
418
438
  * Used to initialize the DeepAR SDK.<br><br>
419
439
  * <strong><u>IMPORTANT</u></strong>: Note that this is now called with the <b>new</b> keyword. In previous versions of SDK this was just a plain function called without new keyword
@@ -205,6 +205,20 @@ declare enum LogType {
205
205
  */
206
206
  ERROR = 3
207
207
  }
208
+ /**
209
+ * Parameters that specify the format of recorded videos. Used by {@link DeepAR.startVideoRecording}.
210
+ */
211
+ export interface VideoRecordingOptions {
212
+ /**
213
+ * A MIME type specyfing the format for the resulting video, such as `video/webm` or `video/mp4`.
214
+ * Corresponds to the MIME type used by <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">Blob</a>
215
+ * objects and <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder">MediaRecorder</a>
216
+ * from the MediaStream Recording API.
217
+ *
218
+ * Note that `video/mp4` may not be supported in all browsers.
219
+ */
220
+ mimeType?: string;
221
+ }
208
222
  /**
209
223
  * Main class for interacting with DeepAR SDK.
210
224
  */
@@ -375,8 +389,9 @@ export declare class DeepAR {
375
389
  touchOccurred(touchInfo: ARTouchInfo): void;
376
390
  /**
377
391
  * Starts video recording of the canvas.
392
+ * @param options Video recording options.
378
393
  */
379
- startVideoRecording(): void;
394
+ startVideoRecording(options?: VideoRecordingOptions): void;
380
395
  /**
381
396
  * Stops the video recording and returns a video blob via callback.
382
397
  * @param callback A callback function with single argument that will be a blob of video/mp4 file.
@@ -414,6 +429,11 @@ export declare class DeepAR {
414
429
  * @param enable True - DeepAR will use its internal timer for the rendering loop. Rendering will work even when tab is not focused. False - DeepAR will use requestAnimationFrame() for the rendering loop.
415
430
  */
416
431
  setOffscreenRenderingEnabled(enable: boolean): void;
432
+ /**
433
+ * @internal
434
+ * @param enable
435
+ */
436
+ enableAutoframing(enable: boolean): void;
417
437
  /**
418
438
  * Used to initialize the DeepAR SDK.<br><br>
419
439
  * <strong><u>IMPORTANT</u></strong>: Note that this is now called with the <b>new</b> keyword. In previous versions of SDK this was just a plain function called without new keyword