UNPKG

theta-client-react-native

Version:

This library provides a way to control RICOH THETA using.

144 lines (131 loc) 3.65 kB
/** * Capture Builder class */ export class CaptureBuilder { /** capture options */ /** construct capture builder instance */ constructor() { this.options = {}; } /** * Set aperture value. * @param {ApertureEnum} aperture aperture value to set * @return CaptureBuilder */ setAperture(aperture) { this.options.aperture = aperture; return this; } /** * Set color temperature of the camera (Kelvin). * @param {number} kelvin Color temperature to set * @return CaptureBuilder */ setColorTemperature(kelvin) { this.options.colorTemperature = kelvin; return this; } /** * Set exposure compensation (EV). * @param {ExposureCompensationEnum} value Exposure compensation to set * @return CaptureBuilder */ setExposureCompensation(value) { this.options.exposureCompensation = value; return this; } /** * Set operating time (sec.) of the self-timer. * @param {ExposureDelayEnum} delay Operating time to set * @return CaptureBuilder */ setExposureDelay(delay) { this.options.exposureDelay = delay; return this; } /** * Set exposure program. The exposure settings that take priority can be selected. * @param {ExposureProgramEnum} program Exposure program to set * @return CaptureBuilder */ setExposureProgram(program) { this.options.exposureProgram = program; return this; } /** * Set GPS information. * @param {GpsInfo} gpsInfo GPS information to set * @return CaptureBuilder */ setGpsInfo(gpsInfo) { this.options.gpsInfo = gpsInfo; return this; } /** * Set turns position information assigning ON/OFF. * @param {GpsTagRecordingEnum} value Turns position information assigning ON/OFF to set * @return CaptureBuilder */ setGpsTagRecording(value) { this.options._gpsTagRecording = value; return this; } /** * Set ISO sensitivity. * @param {IsoEnum} iso ISO sensitivity to set * @return CaptureBuilder */ setIso(iso) { this.options.iso = iso; return this; } /** * Set ISO sensitivity upper limit when ISO sensitivity is set to automatic. * @param {IsoAutoHighLimitEnum} iso ISO sensitivity upper limit to set * @return CaptureBuilder */ setIsoAutoHighLimit(iso) { this.options.isoAutoHighLimit = iso; return this; } /** * Set white balance. * @param {WhiteBalanceEnum} whiteBalance White balance to set * @return CaptureBuilder */ setWhiteBalance(whiteBalance) { this.options.whiteBalance = whiteBalance; return this; } } /** Capturing status */ export const CapturingStatusEnum = { /** The process is starting */ STARTING: 'STARTING', /** Capture in progress */ CAPTURING: 'CAPTURING', /** Self-timer in progress */ SELF_TIMER_COUNTDOWN: 'SELF_TIMER_COUNTDOWN', /** Performing timeShift shooting */ TIME_SHIFT_SHOOTING: 'TIME_SHIFT_SHOOTING', /** Performing second capture of manual timeShift shooting */ TIME_SHIFT_SHOOTING_SECOND: 'TIME_SHIFT_SHOOTING_SECOND', /** * In the case of time-lag shooting by manual lens, * set while waiting for the second shot to be taken after the first shot is completed. */ TIME_SHIFT_SHOOTING_IDLE: 'TIME_SHIFT_SHOOTING_IDLE' }; /** type definition of CapturingStatusEnum */ export class PhotoCaptureBuilderBase extends CaptureBuilder { /** * Set photo file format. * @param {PhotoFileFormatEnum} fileFormat Photo file format to set * @return PhotoCaptureBuilder */ setFileFormat(fileFormat) { this.options.fileFormat = fileFormat; return this; } } //# sourceMappingURL=capture.js.map