All files / src/lib cameraSettings.ts

100% Statements 5/5
100% Branches 4/4
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38                            15x               15x       15x       15x       15x      
/**
 * A configuration object to request custom capabilities when accessing a camera.
 */
export interface CameraSettings {
  /**
   * The preferred video frame resolution.
   *
   * Not guaranteed to be precise: depending on device, browser and camera it could be different/lower than requested.
   *
   * Note that higher resolutions lead to slower processing times and higher memory requirements.
   */
  readonly resolutionPreference: CameraSettings.ResolutionPreference;
}
 
export namespace CameraSettings {
  /**
   * Video frame resolution request.
   *
   * Not guaranteed to be precise: depending on device, browser and camera it could be different/lower than requested.
   *
   * Note that higher resolutions lead to slower processing times and higher memory requirements.
   */
  export enum ResolutionPreference {
    /**
     * Resolution of around 3840 x 2160.
     */
    ULTRA_HD = "ultra-hd",
    /**
     * Resolution of around 1920 x 1080.
     */
    FULL_HD = "full-hd",
    /**
     * Resolution of around 1280 x 720.
     */
    HD = "hd",
  }
}