theta-client-react-native 1.4.0 → 1.6.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/android/build.gradle +2 -2
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +492 -1093
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +423 -253
- package/ios/ConvertUtil.swift +195 -2
- package/ios/ThetaClientReactNative.m +41 -0
- package/ios/ThetaClientReactNative.swift +427 -3
- package/lib/commonjs/capture/composite-interval-capture.js +112 -0
- package/lib/commonjs/capture/composite-interval-capture.js.map +1 -0
- package/lib/commonjs/capture/index.js +33 -0
- package/lib/commonjs/capture/index.js.map +1 -1
- package/lib/commonjs/capture/limitless-interval-capture.js +89 -0
- package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -0
- package/lib/commonjs/capture/photo-capture.js +7 -2
- package/lib/commonjs/capture/photo-capture.js.map +1 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js +113 -0
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -0
- package/lib/commonjs/capture/time-shift-capture.js +9 -1
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/theta-repository/options/index.js +55 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-auto-bracket.js +6 -0
- package/lib/commonjs/theta-repository/options/option-auto-bracket.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction-rotation.js +2 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction-rotation.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js +52 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-video-stitching.js +24 -0
- package/lib/commonjs/theta-repository/options/option-video-stitching.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-visibility-reduction.js +23 -0
- package/lib/commonjs/theta-repository/options/option-visibility-reduction.js.map +1 -0
- package/lib/commonjs/theta-repository/options/options.js +12 -0
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +36 -1
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/capture/composite-interval-capture.js +104 -0
- package/lib/module/capture/composite-interval-capture.js.map +1 -0
- package/lib/module/capture/index.js +3 -0
- package/lib/module/capture/index.js.map +1 -1
- package/lib/module/capture/limitless-interval-capture.js +81 -0
- package/lib/module/capture/limitless-interval-capture.js.map +1 -0
- package/lib/module/capture/photo-capture.js +7 -2
- package/lib/module/capture/photo-capture.js.map +1 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js +105 -0
- package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -0
- package/lib/module/capture/time-shift-capture.js +9 -1
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/theta-repository/options/index.js +5 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-auto-bracket.js +2 -0
- package/lib/module/theta-repository/options/option-auto-bracket.js.map +1 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction-rotation.js +2 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction-rotation.js.map +1 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction.js +45 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction.js.map +1 -0
- package/lib/module/theta-repository/options/option-video-stitching.js +17 -0
- package/lib/module/theta-repository/options/option-video-stitching.js.map +1 -0
- package/lib/module/theta-repository/options/option-visibility-reduction.js +16 -0
- package/lib/module/theta-repository/options/option-visibility-reduction.js.map +1 -0
- package/lib/module/theta-repository/options/options.js +12 -0
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +34 -2
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/typescript/capture/composite-interval-capture.d.ts +47 -0
- package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -0
- package/lib/typescript/capture/index.d.ts +3 -0
- package/lib/typescript/capture/index.d.ts.map +1 -1
- package/lib/typescript/capture/limitless-interval-capture.d.ts +40 -0
- package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -0
- package/lib/typescript/capture/photo-capture.d.ts +1 -1
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts +48 -0
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -0
- package/lib/typescript/capture/time-shift-capture.d.ts +2 -1
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/index.d.ts +5 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-auto-bracket.d.ts +36 -0
- package/lib/typescript/theta-repository/options/option-auto-bracket.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction-rotation.d.ts +22 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction-rotation.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction.d.ts +45 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-video-stitching.d.ts +17 -0
- package/lib/typescript/theta-repository/options/option-video-stitching.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-visibility-reduction.d.ts +16 -0
- package/lib/typescript/theta-repository/options/option-visibility-reduction.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/options.d.ts +32 -0
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +25 -2
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state.d.ts +1 -1
- package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/capture/composite-interval-capture.ts +140 -0
- package/src/capture/index.ts +3 -0
- package/src/capture/limitless-interval-capture.ts +99 -0
- package/src/capture/photo-capture.ts +7 -2
- package/src/capture/shot-count-specified-interval-capture.ts +147 -0
- package/src/capture/time-shift-capture.ts +19 -1
- package/src/theta-repository/options/index.ts +5 -0
- package/src/theta-repository/options/option-auto-bracket.ts +48 -0
- package/src/theta-repository/options/option-top-bottom-correction-rotation.ts +21 -0
- package/src/theta-repository/options/option-top-bottom-correction.ts +46 -0
- package/src/theta-repository/options/option-video-stitching.ts +18 -0
- package/src/theta-repository/options/option-visibility-reduction.ts +17 -0
- package/src/theta-repository/options/options.ts +32 -0
- package/src/theta-repository/theta-repository.ts +40 -1
- package/src/theta-repository/theta-state.ts +1 -1
- package/theta-client-react-native.podspec +1 -1
package/ios/ConvertUtil.swift
CHANGED
|
@@ -18,6 +18,8 @@ let KEY_SOCKET_TIMEOUT = "socketTimeout"
|
|
|
18
18
|
let KEY_THETA_MODEL = "thetaModel"
|
|
19
19
|
let KEY_TIMESHIFT = "timeShift"
|
|
20
20
|
let KEY_APERTURE = "aperture"
|
|
21
|
+
let KEY_CAPTURE_INTERVAL = "captureInterval"
|
|
22
|
+
let KEY_COMPOSITE_SHOOTING_OUTPUT_INTERVAL = "compositeShootingOutputInterval"
|
|
21
23
|
let KEY_COLOR_TEMPERATURE = "colorTemperature"
|
|
22
24
|
let KEY_EXPOSURE_COMPENSATION = "exposureCompensation"
|
|
23
25
|
let KEY_EXPOSURE_DELAY = "exposureDelay"
|
|
@@ -51,7 +53,10 @@ let KEY_BURST_COMPENSATION = "burstCompensation"
|
|
|
51
53
|
let KEY_BURST_MAX_EXPOSURE_TIME = "burstMaxExposureTime"
|
|
52
54
|
let KEY_BURST_ENABLE_ISO_CONTROL = "burstEnableIsoControl"
|
|
53
55
|
let KEY_BURST_ORDER = "burstOrder"
|
|
54
|
-
let
|
|
56
|
+
let KEY_TOP_BOTTOM_CORRECTION_ROTATION_PITCH = "pitch"
|
|
57
|
+
let KEY_TOP_BOTTOM_CORRECTION_ROTATION_ROLL = "roll"
|
|
58
|
+
let KEY_TOP_BOTTOM_CORRECTION_ROTATION_YAW = "yaw"
|
|
59
|
+
let KEY_TIMESHIFT_CAPTURE_INTERVAL = "_capture_interval"
|
|
55
60
|
|
|
56
61
|
public class ConvertUtil: NSObject {}
|
|
57
62
|
|
|
@@ -61,6 +66,7 @@ let optionItemNameToEnum = [
|
|
|
61
66
|
// TODO: Add items when adding options
|
|
62
67
|
"aiAutoThumbnail": ThetaRepository.OptionNameEnum.aiautothumbnail,
|
|
63
68
|
"aperture": ThetaRepository.OptionNameEnum.aperture,
|
|
69
|
+
"autoBracket": ThetaRepository.OptionNameEnum.autobracket,
|
|
64
70
|
"bitrate": ThetaRepository.OptionNameEnum.bitrate,
|
|
65
71
|
"bluetoothPower": ThetaRepository.OptionNameEnum.bluetoothpower,
|
|
66
72
|
"burstMode": ThetaRepository.OptionNameEnum.burstmode,
|
|
@@ -90,6 +96,7 @@ let optionItemNameToEnum = [
|
|
|
90
96
|
"iso": ThetaRepository.OptionNameEnum.iso,
|
|
91
97
|
"isoAutoHighLimit": ThetaRepository.OptionNameEnum.isoautohighlimit,
|
|
92
98
|
"language": ThetaRepository.OptionNameEnum.language,
|
|
99
|
+
"latestEnabledExposureDelayTime": ThetaRepository.OptionNameEnum.latestenabledexposuredelaytime,
|
|
93
100
|
"maxRecordableTime": ThetaRepository.OptionNameEnum.maxrecordabletime,
|
|
94
101
|
"networkType": ThetaRepository.OptionNameEnum.networktype,
|
|
95
102
|
"offDelay": ThetaRepository.OptionNameEnum.offdelay,
|
|
@@ -106,8 +113,12 @@ let optionItemNameToEnum = [
|
|
|
106
113
|
"shutterVolume": ThetaRepository.OptionNameEnum.shuttervolume,
|
|
107
114
|
"sleepDelay": ThetaRepository.OptionNameEnum.sleepdelay,
|
|
108
115
|
"timeShift": ThetaRepository.OptionNameEnum.timeshift,
|
|
116
|
+
"topBottomCorrection": ThetaRepository.OptionNameEnum.topbottomcorrection,
|
|
117
|
+
"topBottomCorrectionRotation": ThetaRepository.OptionNameEnum.topbottomcorrectionrotation,
|
|
109
118
|
"totalSpace": ThetaRepository.OptionNameEnum.totalspace,
|
|
110
119
|
"username": ThetaRepository.OptionNameEnum.username,
|
|
120
|
+
"videoStitching": ThetaRepository.OptionNameEnum.videostitching,
|
|
121
|
+
"visibilityReduction": ThetaRepository.OptionNameEnum.visibilityreduction,
|
|
111
122
|
"whiteBalance": ThetaRepository.OptionNameEnum.whitebalance,
|
|
112
123
|
"whiteBalanceAutoStrength": ThetaRepository.OptionNameEnum.whitebalanceautostrength,
|
|
113
124
|
"wlanFrequency": ThetaRepository.OptionNameEnum.wlanfrequency,
|
|
@@ -153,6 +164,10 @@ func setOptionsValue(options: ThetaRepository.Options, name: String, value: Any)
|
|
|
153
164
|
options.aperture = getEnumValue(
|
|
154
165
|
values: ThetaRepository.ApertureEnum.values(), name: value as! String
|
|
155
166
|
)!
|
|
167
|
+
case ThetaRepository.OptionNameEnum.autobracket.name:
|
|
168
|
+
if let params = value as? [[String: Any]] {
|
|
169
|
+
options.autoBracket = toAutoBracket(params: params)
|
|
170
|
+
}
|
|
156
171
|
case ThetaRepository.OptionNameEnum.bitrate.name:
|
|
157
172
|
options.bitrate = toBitrate(value: value)
|
|
158
173
|
case ThetaRepository.OptionNameEnum.bluetoothpower.name:
|
|
@@ -247,6 +262,10 @@ func setOptionsValue(options: ThetaRepository.Options, name: String, value: Any)
|
|
|
247
262
|
options.language = getEnumValue(
|
|
248
263
|
values: ThetaRepository.LanguageEnum.values(), name: value as! String
|
|
249
264
|
)!
|
|
265
|
+
case ThetaRepository.OptionNameEnum.latestenabledexposuredelaytime.name:
|
|
266
|
+
options.latestEnabledExposureDelayTime = getEnumValue(
|
|
267
|
+
values: ThetaRepository.ExposureDelayEnum.values(), name: value as! String
|
|
268
|
+
)!
|
|
250
269
|
case ThetaRepository.OptionNameEnum.maxrecordabletime.name:
|
|
251
270
|
options.maxRecordableTime = getEnumValue(
|
|
252
271
|
values: ThetaRepository.MaxRecordableTimeEnum.values(), name: value as! String
|
|
@@ -301,10 +320,22 @@ func setOptionsValue(options: ThetaRepository.Options, name: String, value: Any)
|
|
|
301
320
|
if let params = value as? [String: Any] {
|
|
302
321
|
options.timeShift = toTimeShift(params: params)
|
|
303
322
|
}
|
|
323
|
+
case ThetaRepository.OptionNameEnum.topbottomcorrection.name:
|
|
324
|
+
options.topBottomCorrection = getEnumValue(values: ThetaRepository.TopBottomCorrectionOptionEnum.values(), name: value as! String)!
|
|
325
|
+
case ThetaRepository.OptionNameEnum.topbottomcorrectionrotation.name:
|
|
326
|
+
options.topBottomCorrectionRotation = toTopBottomCorrectionRotation(params: value as! [String: Any])
|
|
304
327
|
case ThetaRepository.OptionNameEnum.totalspace.name:
|
|
305
328
|
options.totalSpace = KotlinLong(integerLiteral: value as! Int)
|
|
306
329
|
case ThetaRepository.OptionNameEnum.username.name:
|
|
307
330
|
options.username = value as? String
|
|
331
|
+
case ThetaRepository.OptionNameEnum.videostitching.name:
|
|
332
|
+
options.videoStitching = getEnumValue(
|
|
333
|
+
values: ThetaRepository.VideoStitchingEnum.values(), name: value as! String
|
|
334
|
+
)!
|
|
335
|
+
case ThetaRepository.OptionNameEnum.visibilityreduction.name:
|
|
336
|
+
options.visibilityReduction = getEnumValue(
|
|
337
|
+
values: ThetaRepository.VisibilityReductionEnum.values(), name: value as! String
|
|
338
|
+
)!
|
|
308
339
|
case ThetaRepository.OptionNameEnum.whitebalance.name:
|
|
309
340
|
options.whiteBalance = getEnumValue(
|
|
310
341
|
values: ThetaRepository.WhiteBalanceEnum.values(), name: value as! String
|
|
@@ -335,6 +366,10 @@ func convertResult(options: ThetaRepository.Options) -> [String: Any] {
|
|
|
335
366
|
result[key] = value as! Bool ? true : false
|
|
336
367
|
} else if value is NSNumber || value is String {
|
|
337
368
|
result[key] = value
|
|
369
|
+
} else if value is ThetaRepository.BracketSettingList,
|
|
370
|
+
let autoBracket = value as? ThetaRepository.BracketSettingList
|
|
371
|
+
{
|
|
372
|
+
result[key] = convertResult(autoBracket: autoBracket)
|
|
338
373
|
} else if let bitrate = value as? ThetaRepository.BitrateNumber {
|
|
339
374
|
result[key] = bitrate.value
|
|
340
375
|
} else if value is ThetaRepository.BurstOption,
|
|
@@ -352,6 +387,8 @@ func convertResult(options: ThetaRepository.Options) -> [String: Any] {
|
|
|
352
387
|
let timeshift = value as? ThetaRepository.TimeShiftSetting
|
|
353
388
|
{
|
|
354
389
|
result[key] = convertResult(timeshift: timeshift)
|
|
390
|
+
} else if value is ThetaRepository.TopBottomCorrectionRotation, let rotation = value as? ThetaRepository.TopBottomCorrectionRotation {
|
|
391
|
+
result[key] = convertResult(rotation: rotation)
|
|
355
392
|
} else if let offDelay = value as? ThetaRepository.OffDelaySec {
|
|
356
393
|
result[key] =
|
|
357
394
|
offDelay.sec == 0 ? ThetaRepository.OffDelayEnum.disable.name : offDelay.sec
|
|
@@ -478,7 +515,7 @@ func setPhotoCaptureBuilderParams(params: [String: Any], builder: PhotoCapture.B
|
|
|
478
515
|
}
|
|
479
516
|
|
|
480
517
|
func setTimeShiftCaptureBuilderParams(params: [String: Any], builder: TimeShiftCapture.Builder) {
|
|
481
|
-
if let interval = params[
|
|
518
|
+
if let interval = params[KEY_TIMESHIFT_CAPTURE_INTERVAL] as? Int,
|
|
482
519
|
interval >= 0
|
|
483
520
|
{
|
|
484
521
|
builder.setCheckStatusCommandInterval(timeMillis: Int64(interval))
|
|
@@ -514,6 +551,34 @@ func setVideoCaptureBuilderParams(params: [String: Any], builder: VideoCapture.B
|
|
|
514
551
|
}
|
|
515
552
|
}
|
|
516
553
|
|
|
554
|
+
func setLimitlessIntervalCaptureBuilderParams(params: [String: Any], builder: LimitlessIntervalCapture.Builder) {
|
|
555
|
+
if let value = params[KEY_CAPTURE_INTERVAL] as? Int32 {
|
|
556
|
+
builder.setCaptureInterval(interval: value)
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
func setShotCountSpecifiedIntervalCaptureBuilderParams(params: [String: Any], builder: ShotCountSpecifiedIntervalCapture.Builder) {
|
|
561
|
+
if let interval = params[KEY_TIMESHIFT_CAPTURE_INTERVAL] as? Int,
|
|
562
|
+
interval >= 0
|
|
563
|
+
{
|
|
564
|
+
builder.setCheckStatusCommandInterval(timeMillis: Int64(interval))
|
|
565
|
+
}
|
|
566
|
+
if let value = params[KEY_CAPTURE_INTERVAL] as? Int32 {
|
|
567
|
+
builder.setCaptureInterval(interval: value)
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
func setCompositeIntervalCaptureBuilderParams(params: [String: Any], builder: CompositeIntervalCapture.Builder) {
|
|
572
|
+
if let interval = params[KEY_TIMESHIFT_CAPTURE_INTERVAL] as? Int,
|
|
573
|
+
interval >= 0
|
|
574
|
+
{
|
|
575
|
+
builder.setCheckStatusCommandInterval(timeMillis: Int64(interval))
|
|
576
|
+
}
|
|
577
|
+
if let value = params[KEY_COMPOSITE_SHOOTING_OUTPUT_INTERVAL] as? Int32 {
|
|
578
|
+
builder.setCompositeShootingOutputInterval(sec: value)
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
517
582
|
// MARK: - Utility
|
|
518
583
|
|
|
519
584
|
func getEnumValue<T, E: KotlinEnum<T>>(values: KotlinArray<E>, name: String) -> E? {
|
|
@@ -698,6 +763,40 @@ func convertResult(burstOption: ThetaRepository.BurstOption) -> [String: Any] {
|
|
|
698
763
|
return result
|
|
699
764
|
}
|
|
700
765
|
|
|
766
|
+
func convertResult(autoBracket: ThetaRepository.BracketSettingList) -> [[String: Any]] {
|
|
767
|
+
var resultList = [[String: Any]]()
|
|
768
|
+
|
|
769
|
+
autoBracket.list.forEach { bracketSetting in
|
|
770
|
+
var result: [String: Any] = [:]
|
|
771
|
+
if let setting = bracketSetting as? ThetaRepository.BracketSetting {
|
|
772
|
+
if let aperture = setting.aperture?.name {
|
|
773
|
+
result["aperture"] = aperture
|
|
774
|
+
}
|
|
775
|
+
if let colorTemperature = setting.colorTemperature?.intValue {
|
|
776
|
+
result["colorTemperature"] = colorTemperature
|
|
777
|
+
}
|
|
778
|
+
if let exposureCompensation = setting.exposureCompensation?.name {
|
|
779
|
+
result["exposureCompensation"] = exposureCompensation
|
|
780
|
+
}
|
|
781
|
+
if let exposureProgram = setting.exposureProgram?.name {
|
|
782
|
+
result["exposureProgram"] = exposureProgram
|
|
783
|
+
}
|
|
784
|
+
if let iso = setting.iso?.name {
|
|
785
|
+
result["iso"] = iso
|
|
786
|
+
}
|
|
787
|
+
if let shutterSpeed = setting.shutterSpeed?.name {
|
|
788
|
+
result["shutterSpeed"] = shutterSpeed
|
|
789
|
+
}
|
|
790
|
+
if let whiteBalance = setting.whiteBalance?.name {
|
|
791
|
+
result["whiteBalance"] = whiteBalance
|
|
792
|
+
}
|
|
793
|
+
resultList.append(result)
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
return resultList
|
|
798
|
+
}
|
|
799
|
+
|
|
701
800
|
func convertResult(gpsInfo: ThetaRepository.GpsInfo) -> [String: Any] {
|
|
702
801
|
return [
|
|
703
802
|
"latitude": gpsInfo.latitude,
|
|
@@ -739,6 +838,14 @@ func convertResult(timeshift: ThetaRepository.TimeShiftSetting) -> [String: Any]
|
|
|
739
838
|
return result
|
|
740
839
|
}
|
|
741
840
|
|
|
841
|
+
func convertResult(rotation: ThetaRepository.TopBottomCorrectionRotation) -> [String: Any] {
|
|
842
|
+
return [
|
|
843
|
+
KEY_TOP_BOTTOM_CORRECTION_ROTATION_PITCH: rotation.pitch,
|
|
844
|
+
KEY_TOP_BOTTOM_CORRECTION_ROTATION_ROLL: rotation.roll,
|
|
845
|
+
KEY_TOP_BOTTOM_CORRECTION_ROTATION_YAW: rotation.yaw,
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
|
|
742
849
|
func convertResult(exif: ThetaRepository.Exif) -> [String: Any] {
|
|
743
850
|
var result = [String: Any]()
|
|
744
851
|
result["exifVersion"] = exif.exifVersion
|
|
@@ -889,6 +996,80 @@ func toBurstOption(params: [String: Any]) -> ThetaRepository.BurstOption {
|
|
|
889
996
|
)
|
|
890
997
|
}
|
|
891
998
|
|
|
999
|
+
func toAutoBracket(params: [[String: Any]]) -> ThetaRepository.BracketSettingList {
|
|
1000
|
+
let autoBracket = ThetaRepository.BracketSettingList(list: NSMutableArray())
|
|
1001
|
+
|
|
1002
|
+
params.forEach { map in
|
|
1003
|
+
let aperture = {
|
|
1004
|
+
if let name = map["aperture"] as? String {
|
|
1005
|
+
return getEnumValue(values: ThetaRepository.ApertureEnum.values(), name: name)
|
|
1006
|
+
} else {
|
|
1007
|
+
return nil
|
|
1008
|
+
}
|
|
1009
|
+
}()
|
|
1010
|
+
|
|
1011
|
+
let colorTemperature = {
|
|
1012
|
+
if let value = map["colorTemperature"] as? Int {
|
|
1013
|
+
return toKotlinInt(value: value)
|
|
1014
|
+
} else {
|
|
1015
|
+
return nil
|
|
1016
|
+
}
|
|
1017
|
+
}()
|
|
1018
|
+
|
|
1019
|
+
let exposureCompensation = {
|
|
1020
|
+
if let name = map["exposureCompensation"] as? String {
|
|
1021
|
+
return getEnumValue(values: ThetaRepository.ExposureCompensationEnum.values(), name: name)
|
|
1022
|
+
} else {
|
|
1023
|
+
return nil
|
|
1024
|
+
}
|
|
1025
|
+
}()
|
|
1026
|
+
|
|
1027
|
+
let exposureProgram = {
|
|
1028
|
+
if let name = map["exposureProgram"] as? String {
|
|
1029
|
+
return getEnumValue(values: ThetaRepository.ExposureProgramEnum.values(), name: name)
|
|
1030
|
+
} else {
|
|
1031
|
+
return nil
|
|
1032
|
+
}
|
|
1033
|
+
}()
|
|
1034
|
+
|
|
1035
|
+
let iso = {
|
|
1036
|
+
if let name = map["iso"] as? String {
|
|
1037
|
+
return getEnumValue(values: ThetaRepository.IsoEnum.values(), name: name)
|
|
1038
|
+
} else {
|
|
1039
|
+
return nil
|
|
1040
|
+
}
|
|
1041
|
+
}()
|
|
1042
|
+
|
|
1043
|
+
let shutterSpeed = {
|
|
1044
|
+
if let name = map["shutterSpeed"] as? String {
|
|
1045
|
+
return getEnumValue(values: ThetaRepository.ShutterSpeedEnum.values(), name: name)
|
|
1046
|
+
} else {
|
|
1047
|
+
return nil
|
|
1048
|
+
}
|
|
1049
|
+
}()
|
|
1050
|
+
|
|
1051
|
+
let whiteBalance = {
|
|
1052
|
+
if let name = map["whiteBalance"] as? String {
|
|
1053
|
+
return getEnumValue(values: ThetaRepository.WhiteBalanceEnum.values(), name: name)
|
|
1054
|
+
} else {
|
|
1055
|
+
return nil
|
|
1056
|
+
}
|
|
1057
|
+
}()
|
|
1058
|
+
|
|
1059
|
+
autoBracket.add(setting: ThetaRepository.BracketSetting(
|
|
1060
|
+
aperture: aperture,
|
|
1061
|
+
colorTemperature: colorTemperature,
|
|
1062
|
+
exposureCompensation: exposureCompensation,
|
|
1063
|
+
exposureProgram: exposureProgram,
|
|
1064
|
+
iso: iso,
|
|
1065
|
+
shutterSpeed: shutterSpeed,
|
|
1066
|
+
whiteBalance: whiteBalance
|
|
1067
|
+
))
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
return autoBracket
|
|
1071
|
+
}
|
|
1072
|
+
|
|
892
1073
|
func toGpsInfo(params: [String: Any]) -> ThetaRepository.GpsInfo? {
|
|
893
1074
|
guard let latitude = params[KEY_GPS_LATITUDE] as? Double,
|
|
894
1075
|
let longitude = params[KEY_GPS_LONGITUDE] as? Double,
|
|
@@ -936,6 +1117,18 @@ func toTimeShift(params: [String: Any]) -> ThetaRepository.TimeShiftSetting {
|
|
|
936
1117
|
)
|
|
937
1118
|
}
|
|
938
1119
|
|
|
1120
|
+
func toTopBottomCorrectionRotation(params: [String: Any]) -> ThetaRepository.TopBottomCorrectionRotation? {
|
|
1121
|
+
guard let pitch = params[KEY_TOP_BOTTOM_CORRECTION_ROTATION_PITCH] as? Double,
|
|
1122
|
+
let roll = params[KEY_TOP_BOTTOM_CORRECTION_ROTATION_ROLL] as? Double,
|
|
1123
|
+
let yaw = params[KEY_TOP_BOTTOM_CORRECTION_ROTATION_YAW] as? Double else { return nil }
|
|
1124
|
+
|
|
1125
|
+
return ThetaRepository.TopBottomCorrectionRotation(
|
|
1126
|
+
pitch: Float(pitch),
|
|
1127
|
+
roll: Float(roll),
|
|
1128
|
+
yaw: Float(yaw)
|
|
1129
|
+
)
|
|
1130
|
+
}
|
|
1131
|
+
|
|
939
1132
|
func toDigestAuth(params: [String: String?]?) -> DigestAuth? {
|
|
940
1133
|
guard let params = params,
|
|
941
1134
|
let username = params["username"] as? String
|
|
@@ -94,6 +94,47 @@ RCT_EXTERN_METHOD(startVideoCapture:(RCTPromiseResolveBlock)resolve
|
|
|
94
94
|
RCT_EXTERN_METHOD(stopVideoCapture:(RCTPromiseResolveBlock)resolve
|
|
95
95
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
96
96
|
|
|
97
|
+
RCT_EXTERN_METHOD(getLimitlessIntervalCaptureBuilder:(RCTPromiseResolveBlock)resolve
|
|
98
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
99
|
+
|
|
100
|
+
RCT_EXTERN_METHOD(buildLimitlessIntervalCapture:(NSDictionary*)options
|
|
101
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
102
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
103
|
+
|
|
104
|
+
RCT_EXTERN_METHOD(startLimitlessIntervalCapture:(RCTPromiseResolveBlock)resolve
|
|
105
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
106
|
+
|
|
107
|
+
RCT_EXTERN_METHOD(stopLimitlessIntervalCapture:(RCTPromiseResolveBlock)resolve
|
|
108
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
109
|
+
|
|
110
|
+
RCT_EXTERN_METHOD(getShotCountSpecifiedIntervalCaptureBuilder:(int)shotCount
|
|
111
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
112
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
113
|
+
|
|
114
|
+
RCT_EXTERN_METHOD(buildShotCountSpecifiedIntervalCapture:(NSDictionary*)options
|
|
115
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
116
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
117
|
+
|
|
118
|
+
RCT_EXTERN_METHOD(startShotCountSpecifiedIntervalCapture:(RCTPromiseResolveBlock)resolve
|
|
119
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
120
|
+
|
|
121
|
+
RCT_EXTERN_METHOD(cancelShotCountSpecifiedIntervalCapture:(RCTPromiseResolveBlock)resolve
|
|
122
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
123
|
+
|
|
124
|
+
RCT_EXTERN_METHOD(getCompositeIntervalCaptureBuilder:(int)shootingTimeSec
|
|
125
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
126
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
127
|
+
|
|
128
|
+
RCT_EXTERN_METHOD(buildCompositeIntervalCapture:(NSDictionary*)options
|
|
129
|
+
withResolver:(RCTPromiseResolveBlock)resolve
|
|
130
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
131
|
+
|
|
132
|
+
RCT_EXTERN_METHOD(startCompositeIntervalCapture:(RCTPromiseResolveBlock)resolve
|
|
133
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
134
|
+
|
|
135
|
+
RCT_EXTERN_METHOD(cancelCompositeIntervalCapture:(RCTPromiseResolveBlock)resolve
|
|
136
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
137
|
+
|
|
97
138
|
RCT_EXTERN_METHOD(getMetadata:(NSString*)fileUrl
|
|
98
139
|
withResolver:(RCTPromiseResolveBlock)resolve
|
|
99
140
|
withRejecter:(RCTPromiseRejectBlock)reject)
|