theta-client-react-native 1.9.0 → 1.10.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 +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +27 -0
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +94 -0
- package/ios/ConvertUtil.swift +22 -0
- package/ios/ThetaClientReactNative.m +3 -0
- package/ios/ThetaClientReactNative.swift +133 -9
- package/lib/commonjs/capture/burst-capture.js +13 -1
- package/lib/commonjs/capture/burst-capture.js.map +1 -1
- package/lib/commonjs/capture/capture.js +24 -1
- package/lib/commonjs/capture/capture.js.map +1 -1
- package/lib/commonjs/capture/composite-interval-capture.js +13 -1
- package/lib/commonjs/capture/composite-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/continuous-capture.js +12 -1
- package/lib/commonjs/capture/continuous-capture.js.map +1 -1
- package/lib/commonjs/capture/limitless-interval-capture.js +29 -2
- package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/multi-bracket-capture.js +13 -1
- package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -1
- package/lib/commonjs/capture/photo-capture.js +34 -10
- package/lib/commonjs/capture/photo-capture.js.map +1 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js +12 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/time-shift-capture.js +12 -1
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/capture/video-capture.js +29 -2
- package/lib/commonjs/capture/video-capture.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-file-format.js +20 -0
- package/lib/commonjs/theta-repository/options/option-file-format.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +11 -0
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state/capture-status.js +32 -0
- package/lib/commonjs/theta-repository/theta-state/capture-status.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-state/index.js +11 -0
- package/lib/commonjs/theta-repository/theta-state/index.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state/theta-state.js +1 -23
- package/lib/commonjs/theta-repository/theta-state/theta-state.js.map +1 -1
- package/lib/module/capture/burst-capture.js +13 -1
- package/lib/module/capture/burst-capture.js.map +1 -1
- package/lib/module/capture/capture.js +22 -0
- package/lib/module/capture/capture.js.map +1 -1
- package/lib/module/capture/composite-interval-capture.js +13 -1
- package/lib/module/capture/composite-interval-capture.js.map +1 -1
- package/lib/module/capture/continuous-capture.js +12 -1
- package/lib/module/capture/continuous-capture.js.map +1 -1
- package/lib/module/capture/limitless-interval-capture.js +29 -2
- package/lib/module/capture/limitless-interval-capture.js.map +1 -1
- package/lib/module/capture/multi-bracket-capture.js +13 -1
- package/lib/module/capture/multi-bracket-capture.js.map +1 -1
- package/lib/module/capture/photo-capture.js +35 -11
- package/lib/module/capture/photo-capture.js.map +1 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js +12 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +12 -1
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/capture/video-capture.js +29 -2
- package/lib/module/capture/video-capture.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-file-format.js +20 -0
- package/lib/module/theta-repository/options/option-file-format.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +10 -0
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/theta-repository/theta-state/capture-status.js +26 -0
- package/lib/module/theta-repository/theta-state/capture-status.js.map +1 -0
- package/lib/module/theta-repository/theta-state/index.js +1 -0
- package/lib/module/theta-repository/theta-state/index.js.map +1 -1
- package/lib/module/theta-repository/theta-state/theta-state.js +0 -22
- package/lib/module/theta-repository/theta-state/theta-state.js.map +1 -1
- package/lib/typescript/capture/burst-capture.d.ts +4 -2
- package/lib/typescript/capture/burst-capture.d.ts.map +1 -1
- package/lib/typescript/capture/capture.d.ts +18 -1
- package/lib/typescript/capture/capture.d.ts.map +1 -1
- package/lib/typescript/capture/composite-interval-capture.d.ts +4 -2
- package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/continuous-capture.d.ts +3 -2
- package/lib/typescript/capture/continuous-capture.d.ts.map +1 -1
- package/lib/typescript/capture/limitless-interval-capture.d.ts +10 -2
- package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/multi-bracket-capture.d.ts +5 -3
- package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -1
- package/lib/typescript/capture/photo-capture.d.ts +15 -8
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts +3 -2
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts +3 -2
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/capture/video-capture.d.ts +10 -2
- package/lib/typescript/capture/video-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-file-format.d.ts +30 -0
- package/lib/typescript/theta-repository/options/option-file-format.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +7 -0
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state/capture-status.d.ts +26 -0
- package/lib/typescript/theta-repository/theta-state/capture-status.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-state/index.d.ts +1 -0
- package/lib/typescript/theta-repository/theta-state/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state/theta-state.d.ts +1 -21
- package/lib/typescript/theta-repository/theta-state/theta-state.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/capture/burst-capture.ts +20 -2
- package/src/capture/capture.ts +27 -0
- package/src/capture/composite-interval-capture.ts +20 -2
- package/src/capture/continuous-capture.ts +19 -2
- package/src/capture/limitless-interval-capture.ts +40 -5
- package/src/capture/multi-bracket-capture.ts +21 -3
- package/src/capture/photo-capture.ts +50 -15
- package/src/capture/shot-count-specified-interval-capture.ts +19 -2
- package/src/capture/time-shift-capture.ts +19 -2
- package/src/capture/video-capture.ts +38 -3
- package/src/theta-repository/options/option-file-format.ts +20 -0
- package/src/theta-repository/theta-repository.ts +10 -0
- package/src/theta-repository/theta-state/capture-status.ts +27 -0
- package/src/theta-repository/theta-state/index.ts +1 -0
- package/src/theta-repository/theta-state/theta-state.ts +1 -24
- package/theta-client-react-native.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -135,7 +135,7 @@ dependencies {
|
|
|
135
135
|
implementation "com.facebook.react:react-native:+"
|
|
136
136
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
137
137
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
|
|
138
|
-
implementation "com.ricoh360.thetaclient:theta-client:1.
|
|
138
|
+
implementation "com.ricoh360.thetaclient:theta-client:1.10.0"
|
|
139
139
|
|
|
140
140
|
// From node_modules
|
|
141
141
|
}
|
|
@@ -16,6 +16,7 @@ const val KEY_NOTIFY_PARAMS = "params"
|
|
|
16
16
|
const val KEY_NOTIFY_PARAM_COMPLETION = "completion"
|
|
17
17
|
const val KEY_NOTIFY_PARAM_EVENT = "event"
|
|
18
18
|
const val KEY_NOTIFY_PARAM_MESSAGE = "message"
|
|
19
|
+
const val KEY_NOTIFY_PARAM_STATUS = "status"
|
|
19
20
|
const val KEY_GPS_INFO = "gpsInfo"
|
|
20
21
|
const val KEY_STATE_EXTERNAL_GPS_INFO = "externalGpsInfo"
|
|
21
22
|
const val KEY_STATE_INTERNAL_GPS_INFO = "internalGpsInfo"
|
|
@@ -114,6 +115,12 @@ fun toMessageNotifyParam(value: String): WritableMap {
|
|
|
114
115
|
return result
|
|
115
116
|
}
|
|
116
117
|
|
|
118
|
+
fun toCapturingNotifyParam(status: CapturingStatusEnum): WritableMap {
|
|
119
|
+
val result = Arguments.createMap()
|
|
120
|
+
result.putString(KEY_NOTIFY_PARAM_STATUS, status.name)
|
|
121
|
+
return result
|
|
122
|
+
}
|
|
123
|
+
|
|
117
124
|
fun toGpsInfo(map: ReadableMap): GpsInfo {
|
|
118
125
|
return GpsInfo(
|
|
119
126
|
latitude = map.getDouble("latitude").toFloat(),
|
|
@@ -157,6 +164,13 @@ fun <T> setCaptureBuilderParams(optionMap: ReadableMap, builder: Capture.Builder
|
|
|
157
164
|
}
|
|
158
165
|
|
|
159
166
|
fun setPhotoCaptureBuilderParams(optionMap: ReadableMap, builder: PhotoCapture.Builder) {
|
|
167
|
+
val interval = if (optionMap.hasKey("_capture_interval")) optionMap.getInt("_capture_interval") else null
|
|
168
|
+
interval?.let {
|
|
169
|
+
if (it >= 0) {
|
|
170
|
+
builder.setCheckStatusCommandInterval(it.toLong())
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
160
174
|
optionMap.getString("filter")?.let {
|
|
161
175
|
builder.setFilter(FilterEnum.valueOf(it))
|
|
162
176
|
}
|
|
@@ -190,6 +204,13 @@ fun setTimeShiftCaptureBuilderParams(optionMap: ReadableMap, builder: TimeShiftC
|
|
|
190
204
|
}
|
|
191
205
|
|
|
192
206
|
fun setVideoCaptureBuilderParams(optionMap: ReadableMap, builder: VideoCapture.Builder) {
|
|
207
|
+
val interval =
|
|
208
|
+
if (optionMap.hasKey("_capture_interval")) optionMap.getInt("_capture_interval") else null
|
|
209
|
+
interval?.let {
|
|
210
|
+
if (it >= 0) {
|
|
211
|
+
builder.setCheckStatusCommandInterval(it.toLong())
|
|
212
|
+
}
|
|
213
|
+
}
|
|
193
214
|
optionMap.getString("maxRecordableTime")?.let {
|
|
194
215
|
builder.setMaxRecordableTime(MaxRecordableTimeEnum.valueOf(it))
|
|
195
216
|
}
|
|
@@ -199,6 +220,12 @@ fun setVideoCaptureBuilderParams(optionMap: ReadableMap, builder: VideoCapture.B
|
|
|
199
220
|
}
|
|
200
221
|
|
|
201
222
|
fun setLimitlessIntervalCaptureBuilderParams(optionMap: ReadableMap, builder: LimitlessIntervalCapture.Builder) {
|
|
223
|
+
val interval = if (optionMap.hasKey("_capture_interval")) optionMap.getInt("_capture_interval") else null
|
|
224
|
+
interval?.let {
|
|
225
|
+
if (it >= 0) {
|
|
226
|
+
builder.setCheckStatusCommandInterval(it.toLong())
|
|
227
|
+
}
|
|
228
|
+
}
|
|
202
229
|
if (optionMap.hasKey("captureInterval")) {
|
|
203
230
|
builder.setCaptureInterval(optionMap.getInt("captureInterval"))
|
|
204
231
|
}
|
|
@@ -205,6 +205,27 @@ class ThetaClientReactNativeModule(
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* getPluginLicense - acquires open source license information related to the camera.
|
|
210
|
+
* @param promise promise to set result
|
|
211
|
+
*/
|
|
212
|
+
@ReactMethod
|
|
213
|
+
fun getThetaLicense(promise: Promise) {
|
|
214
|
+
val theta = theta
|
|
215
|
+
if (theta == null) {
|
|
216
|
+
promise.reject(Exception(messageNotInit))
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
launch {
|
|
220
|
+
try {
|
|
221
|
+
val result = theta.getThetaLicense()
|
|
222
|
+
promise.resolve(result)
|
|
223
|
+
} catch (t: Throwable) {
|
|
224
|
+
promise.reject(t)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
208
229
|
/**
|
|
209
230
|
* getThetaState - retrieve ThetaState from THETA via repository
|
|
210
231
|
* @param promise promise to set result
|
|
@@ -516,6 +537,13 @@ class ThetaClientReactNativeModule(
|
|
|
516
537
|
photoCapture = null
|
|
517
538
|
}
|
|
518
539
|
|
|
540
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
541
|
+
super.onCapturing(status)
|
|
542
|
+
sendNotifyEvent(
|
|
543
|
+
toNotify(NOTIFY_PHOTO_CAPTURING, toCapturingNotifyParam(status = status))
|
|
544
|
+
)
|
|
545
|
+
}
|
|
546
|
+
|
|
519
547
|
override fun onError(exception: ThetaRepository.ThetaRepositoryException) {
|
|
520
548
|
promise.reject(exception)
|
|
521
549
|
photoCapture = null
|
|
@@ -597,6 +625,13 @@ class ThetaClientReactNativeModule(
|
|
|
597
625
|
)
|
|
598
626
|
}
|
|
599
627
|
|
|
628
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
629
|
+
super.onCapturing(status)
|
|
630
|
+
sendNotifyEvent(
|
|
631
|
+
toNotify(NOTIFY_TIMESHIFT_CAPTURING, toCapturingNotifyParam(status = status))
|
|
632
|
+
)
|
|
633
|
+
}
|
|
634
|
+
|
|
600
635
|
override fun onCaptureFailed(exception: ThetaRepository.ThetaRepositoryException) {
|
|
601
636
|
promise.reject(exception)
|
|
602
637
|
timeShiftCapture = null
|
|
@@ -707,6 +742,13 @@ class ThetaClientReactNativeModule(
|
|
|
707
742
|
)
|
|
708
743
|
)
|
|
709
744
|
}
|
|
745
|
+
|
|
746
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
747
|
+
super.onCapturing(status)
|
|
748
|
+
sendNotifyEvent(
|
|
749
|
+
toNotify(NOTIFY_VIDEO_CAPTURE_CAPTURING, toCapturingNotifyParam(status = status))
|
|
750
|
+
)
|
|
751
|
+
}
|
|
710
752
|
}
|
|
711
753
|
videoCapturing = videoCapture?.startCapture(StartCaptureCallback())
|
|
712
754
|
}
|
|
@@ -809,6 +851,16 @@ class ThetaClientReactNativeModule(
|
|
|
809
851
|
)
|
|
810
852
|
)
|
|
811
853
|
}
|
|
854
|
+
|
|
855
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
856
|
+
super.onCapturing(status)
|
|
857
|
+
sendNotifyEvent(
|
|
858
|
+
toNotify(
|
|
859
|
+
NOTIFY_LIMITLESS_INTERVAL_CAPTURE_CAPTURING,
|
|
860
|
+
toCapturingNotifyParam(status = status)
|
|
861
|
+
)
|
|
862
|
+
)
|
|
863
|
+
}
|
|
812
864
|
}
|
|
813
865
|
limitlessIntervalCapturing = limitlessIntervalCapture?.startCapture(StartCaptureCallback())
|
|
814
866
|
}
|
|
@@ -906,6 +958,15 @@ class ThetaClientReactNativeModule(
|
|
|
906
958
|
)
|
|
907
959
|
}
|
|
908
960
|
|
|
961
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
962
|
+
sendNotifyEvent(
|
|
963
|
+
toNotify(
|
|
964
|
+
NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_CAPTURING,
|
|
965
|
+
toCapturingNotifyParam(status = status)
|
|
966
|
+
)
|
|
967
|
+
)
|
|
968
|
+
}
|
|
969
|
+
|
|
909
970
|
override fun onStopFailed(exception: ThetaRepository.ThetaRepositoryException) {
|
|
910
971
|
sendNotifyEvent(
|
|
911
972
|
toNotify(
|
|
@@ -1020,6 +1081,12 @@ class ThetaClientReactNativeModule(
|
|
|
1020
1081
|
)
|
|
1021
1082
|
}
|
|
1022
1083
|
|
|
1084
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
1085
|
+
sendNotifyEvent(
|
|
1086
|
+
toNotify(NOTIFY_COMPOSITE_INTERVAL_CAPTURING, toCapturingNotifyParam(status = status))
|
|
1087
|
+
)
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1023
1090
|
override fun onStopFailed(exception: ThetaRepository.ThetaRepositoryException) {
|
|
1024
1091
|
sendNotifyEvent(
|
|
1025
1092
|
toNotify(
|
|
@@ -1155,6 +1222,12 @@ class ThetaClientReactNativeModule(
|
|
|
1155
1222
|
)
|
|
1156
1223
|
}
|
|
1157
1224
|
|
|
1225
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
1226
|
+
sendNotifyEvent(
|
|
1227
|
+
toNotify(NOTIFY_BURST_CAPTURING, toCapturingNotifyParam(status = status))
|
|
1228
|
+
)
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1158
1231
|
override fun onStopFailed(exception: ThetaRepository.ThetaRepositoryException) {
|
|
1159
1232
|
sendNotifyEvent(
|
|
1160
1233
|
toNotify(
|
|
@@ -1267,6 +1340,12 @@ class ThetaClientReactNativeModule(
|
|
|
1267
1340
|
)
|
|
1268
1341
|
}
|
|
1269
1342
|
|
|
1343
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
1344
|
+
sendNotifyEvent(
|
|
1345
|
+
toNotify(NOTIFY_MULTI_BRACKET_CAPTURING, toCapturingNotifyParam(status = status))
|
|
1346
|
+
)
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1270
1349
|
override fun onStopFailed(exception: ThetaRepository.ThetaRepositoryException) {
|
|
1271
1350
|
sendNotifyEvent(
|
|
1272
1351
|
toNotify(
|
|
@@ -1381,6 +1460,12 @@ class ThetaClientReactNativeModule(
|
|
|
1381
1460
|
)
|
|
1382
1461
|
}
|
|
1383
1462
|
|
|
1463
|
+
override fun onCapturing(status: CapturingStatusEnum) {
|
|
1464
|
+
sendNotifyEvent(
|
|
1465
|
+
toNotify(NOTIFY_CONTINUOUS_CAPTURING, toCapturingNotifyParam(status = status))
|
|
1466
|
+
)
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1384
1469
|
override fun onCaptureFailed(exception: ThetaRepository.ThetaRepositoryException) {
|
|
1385
1470
|
promise.reject(exception)
|
|
1386
1471
|
continuousCapture = null
|
|
@@ -2063,19 +2148,28 @@ class ThetaClientReactNativeModule(
|
|
|
2063
2148
|
const val NAME = "ThetaClientReactNative"
|
|
2064
2149
|
const val EVENT_NAME = "ThetaFrameEvent"
|
|
2065
2150
|
const val EVENT_NOTIFY = "ThetaNotify"
|
|
2151
|
+
const val NOTIFY_PHOTO_CAPTURING = "PHOTO-CAPTURING"
|
|
2066
2152
|
const val NOTIFY_TIMESHIFT_PROGRESS = "TIME-SHIFT-PROGRESS"
|
|
2067
2153
|
const val NOTIFY_TIMESHIFT_STOP_ERROR = "TIME-SHIFT-STOP-ERROR"
|
|
2154
|
+
const val NOTIFY_TIMESHIFT_CAPTURING = "TIME-SHIFT-CAPTURING"
|
|
2068
2155
|
const val NOTIFY_VIDEO_CAPTURE_STOP_ERROR = "VIDEO-CAPTURE-STOP-ERROR"
|
|
2156
|
+
const val NOTIFY_VIDEO_CAPTURE_CAPTURING = "VIDEO-CAPTURE-CAPTURING"
|
|
2069
2157
|
const val NOTIFY_LIMITLESS_INTERVAL_CAPTURE_STOP_ERROR = "LIMITLESS-INTERVAL-CAPTURE-STOP-ERROR"
|
|
2158
|
+
const val NOTIFY_LIMITLESS_INTERVAL_CAPTURE_CAPTURING = "LIMITLESS-INTERVAL-CAPTURE-CAPTURING"
|
|
2070
2159
|
const val NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_PROGRESS = "SHOT-COUNT-SPECIFIED-INTERVAL-PROGRESS"
|
|
2071
2160
|
const val NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_STOP_ERROR = "SHOT-COUNT-SPECIFIED-INTERVAL-STOP-ERROR"
|
|
2161
|
+
const val NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_CAPTURING = "SHOT-COUNT-SPECIFIED-INTERVAL-CAPTURING"
|
|
2072
2162
|
const val NOTIFY_COMPOSITE_INTERVAL_PROGRESS = "COMPOSITE-INTERVAL-PROGRESS"
|
|
2073
2163
|
const val NOTIFY_COMPOSITE_INTERVAL_STOP_ERROR = "COMPOSITE-INTERVAL-STOP-ERROR"
|
|
2164
|
+
const val NOTIFY_COMPOSITE_INTERVAL_CAPTURING = "COMPOSITE-INTERVAL-CAPTURING"
|
|
2074
2165
|
const val NOTIFY_BURST_PROGRESS = "BURST-PROGRESS"
|
|
2075
2166
|
const val NOTIFY_BURST_STOP_ERROR = "BURST-STOP-ERROR"
|
|
2167
|
+
const val NOTIFY_BURST_CAPTURING = "BURST-CAPTURING"
|
|
2076
2168
|
const val NOTIFY_MULTI_BRACKET_PROGRESS = "MULTI-BRACKET-PROGRESS"
|
|
2077
2169
|
const val NOTIFY_MULTI_BRACKET_STOP_ERROR = "MULTI-BRACKET-STOP-ERROR"
|
|
2170
|
+
const val NOTIFY_MULTI_BRACKET_CAPTURING = "MULTI-BRACKET-CAPTURING"
|
|
2078
2171
|
const val NOTIFY_CONTINUOUS_PROGRESS = "CONTINUOUS-PROGRESS"
|
|
2172
|
+
const val NOTIFY_CONTINUOUS_CAPTURING = "CONTINUOUS-CAPTURING"
|
|
2079
2173
|
const val NOTIFY_EVENT_WEBSOCKET_EVENT = "EVENT-WEBSOCKET-EVENT"
|
|
2080
2174
|
const val NOTIFY_EVENT_WEBSOCKET_CLOSE = "EVENT-WEBSOCKET-CLOSE"
|
|
2081
2175
|
}
|
package/ios/ConvertUtil.swift
CHANGED
|
@@ -8,6 +8,7 @@ let KEY_NOTIFY_PARAM_COMPLETION = "completion"
|
|
|
8
8
|
let KEY_NOTIFY_PARAM_EVENT = "event"
|
|
9
9
|
let KEY_NOTIFY_PARAM_IMAGE = "image"
|
|
10
10
|
let KEY_NOTIFY_PARAM_MESSAGE = "message"
|
|
11
|
+
let KEY_NOTIFY_PARAM_STATUS = "status"
|
|
11
12
|
let KEY_DATETIME = "dateTime"
|
|
12
13
|
let KEY_LANGUAGE = "language"
|
|
13
14
|
let KEY_OFF_DELAY = "offDelay"
|
|
@@ -457,6 +458,12 @@ func toMessageNotifyParam(value: String) -> [String: Any] {
|
|
|
457
458
|
]
|
|
458
459
|
}
|
|
459
460
|
|
|
461
|
+
func toCapturingNotifyParam(value: CapturingStatusEnum) -> [String: Any] {
|
|
462
|
+
return [
|
|
463
|
+
KEY_NOTIFY_PARAM_STATUS: value.name,
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
|
|
460
467
|
// MARK: - Capture builder
|
|
461
468
|
|
|
462
469
|
func setCaptureBuilderParams<T>(params: [String: Any], builder: CaptureBuilder<T>) {
|
|
@@ -524,6 +531,11 @@ func setCaptureBuilderParams<T>(params: [String: Any], builder: CaptureBuilder<T
|
|
|
524
531
|
}
|
|
525
532
|
|
|
526
533
|
func setPhotoCaptureBuilderParams(params: [String: Any], builder: PhotoCapture.Builder) {
|
|
534
|
+
if let interval = params[KEY_TIMESHIFT_CAPTURE_INTERVAL] as? Int,
|
|
535
|
+
interval >= 0
|
|
536
|
+
{
|
|
537
|
+
builder.setCheckStatusCommandInterval(timeMillis: Int64(interval))
|
|
538
|
+
}
|
|
527
539
|
if let value = params[KEY_FILTER] as? String {
|
|
528
540
|
if let enumValue = getEnumValue(values: ThetaRepository.FilterEnum.values(), name: value) {
|
|
529
541
|
builder.setFilter(filter: enumValue)
|
|
@@ -564,6 +576,11 @@ func setTimeShiftCaptureBuilderParams(params: [String: Any], builder: TimeShiftC
|
|
|
564
576
|
}
|
|
565
577
|
|
|
566
578
|
func setVideoCaptureBuilderParams(params: [String: Any], builder: VideoCapture.Builder) {
|
|
579
|
+
if let interval = params[KEY_TIMESHIFT_CAPTURE_INTERVAL] as? Int,
|
|
580
|
+
interval >= 0
|
|
581
|
+
{
|
|
582
|
+
builder.setCheckStatusCommandInterval(timeMillis: Int64(interval))
|
|
583
|
+
}
|
|
567
584
|
if let value = params[KEY_MAX_RECORDABLE_TIME] as? String {
|
|
568
585
|
if let enumValue = getEnumValue(
|
|
569
586
|
values: ThetaRepository.MaxRecordableTimeEnum.values(), name: value
|
|
@@ -581,6 +598,11 @@ func setVideoCaptureBuilderParams(params: [String: Any], builder: VideoCapture.B
|
|
|
581
598
|
}
|
|
582
599
|
|
|
583
600
|
func setLimitlessIntervalCaptureBuilderParams(params: [String: Any], builder: LimitlessIntervalCapture.Builder) {
|
|
601
|
+
if let interval = params[KEY_TIMESHIFT_CAPTURE_INTERVAL] as? Int,
|
|
602
|
+
interval >= 0
|
|
603
|
+
{
|
|
604
|
+
builder.setCheckStatusCommandInterval(timeMillis: Int64(interval))
|
|
605
|
+
}
|
|
584
606
|
if let value = params[KEY_CAPTURE_INTERVAL] as? Int32 {
|
|
585
607
|
builder.setCaptureInterval(interval: value)
|
|
586
608
|
}
|
|
@@ -21,6 +21,9 @@ RCT_EXTERN_METHOD(getThetaModel:(RCTPromiseResolveBlock)resolve
|
|
|
21
21
|
RCT_EXTERN_METHOD(getThetaInfo:(RCTPromiseResolveBlock)resolve
|
|
22
22
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
23
23
|
|
|
24
|
+
RCT_EXTERN_METHOD(getThetaLicense:(RCTPromiseResolveBlock)resolve
|
|
25
|
+
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
26
|
+
|
|
24
27
|
RCT_EXTERN_METHOD(getThetaState:(RCTPromiseResolveBlock)resolve
|
|
25
28
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
26
29
|
|
|
@@ -65,22 +65,31 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
65
65
|
static let EVENT_FRAME = "ThetaFrameEvent"
|
|
66
66
|
static let EVENT_NOTIFY = "ThetaNotify"
|
|
67
67
|
|
|
68
|
+
static let NOTIFY_PHOTO_CAPTURING = "PHOTO-CAPTURING"
|
|
68
69
|
static let NOTIFY_TIMESHIFT_PROGRESS = "TIME-SHIFT-PROGRESS"
|
|
69
70
|
static let NOTIFY_TIMESHIFT_STOP_ERROR = "TIME-SHIFT-STOP-ERROR"
|
|
71
|
+
static let NOTIFY_TIMESHIFT_CAPTURING = "TIME-SHIFT-CAPTURING"
|
|
70
72
|
static let NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_PROGRESS = "SHOT-COUNT-SPECIFIED-INTERVAL-PROGRESS"
|
|
71
73
|
static let NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_STOP_ERROR = "SHOT-COUNT-SPECIFIED-INTERVAL-STOP-ERROR"
|
|
74
|
+
static let NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_CAPTURING = "SHOT-COUNT-SPECIFIED-INTERVAL-CAPTURING"
|
|
72
75
|
static let NOTIFY_VIDEO_CAPTURE_STOP_ERROR = "VIDEO-CAPTURE-STOP-ERROR"
|
|
76
|
+
static let NOTIFY_VIDEO_CAPTURE_CAPTURING = "VIDEO-CAPTURE-CAPTURING"
|
|
73
77
|
static let NOTIFY_LIMITLESS_INTERVAL_CAPTURE_STOP_ERROR = "LIMITLESS-INTERVAL-CAPTURE-STOP-ERROR"
|
|
78
|
+
static let NOTIFY_LIMITLESS_INTERVAL_CAPTURE_CAPTURING = "LIMITLESS-INTERVAL-CAPTURE-CAPTURING"
|
|
74
79
|
static let NOTIFY_COMPOSITE_INTERVAL_PROGRESS = "COMPOSITE-INTERVAL-PROGRESS"
|
|
75
80
|
static let NOTIFY_COMPOSITE_INTERVAL_STOP_ERROR = "COMPOSITE-INTERVAL-STOP-ERROR"
|
|
81
|
+
static let NOTIFY_COMPOSITE_INTERVAL_CAPTURING = "COMPOSITE-INTERVAL-CAPTURING"
|
|
76
82
|
static let NOTIFY_BURST_PROGRESS = "BURST-PROGRESS"
|
|
77
83
|
static let NOTIFY_BURST_STOP_ERROR = "BURST-STOP-ERROR"
|
|
84
|
+
static let NOTIFY_BURST_CAPTURING = "BURST-CAPTURING"
|
|
78
85
|
static let NOTIFY_MULTI_BRACKET_PROGRESS = "MULTI-BRACKET-PROGRESS"
|
|
79
86
|
static let NOTIFY_MULTI_BRACKET_STOP_ERROR = "MULTI-BRACKET-STOP-ERROR"
|
|
87
|
+
static let NOTIFY_MULTI_BRACKET_CAPTURING = "MULTI-BRACKET-CAPTURING"
|
|
80
88
|
static let NOTIFY_CONTINUOUS_PROGRESS = "CONTINUOUS-PROGRESS"
|
|
89
|
+
static let NOTIFY_CONTINUOUS_CAPTURING = "CONTINUOUS-CAPTURING"
|
|
81
90
|
static let NOTIFY_EVENT_WEBSOCKET_EVENT = "EVENT-WEBSOCKET-EVENT"
|
|
82
91
|
static let NOTIFY_EVENT_WEBSOCKET_CLOSE = "EVENT-WEBSOCKET-CLOSE"
|
|
83
|
-
|
|
92
|
+
|
|
84
93
|
@objc
|
|
85
94
|
override func supportedEvents() -> [String]! {
|
|
86
95
|
return [ThetaClientReactNative.EVENT_FRAME, ThetaClientReactNative.EVENT_NOTIFY]
|
|
@@ -210,6 +219,27 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
210
219
|
}
|
|
211
220
|
}
|
|
212
221
|
|
|
222
|
+
@objc(getThetaLicense:withRejecter:)
|
|
223
|
+
func getThetaLicense(
|
|
224
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
225
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
226
|
+
) {
|
|
227
|
+
guard let thetaRepository else {
|
|
228
|
+
reject(ERROR_CODE_ERROR, MESSAGE_NOT_INIT, nil)
|
|
229
|
+
return
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
thetaRepository.getThetaLicense() { response, error in
|
|
233
|
+
if let error {
|
|
234
|
+
reject(ERROR_CODE_ERROR, error.localizedDescription, error)
|
|
235
|
+
} else if let response {
|
|
236
|
+
resolve(response)
|
|
237
|
+
} else {
|
|
238
|
+
reject(ERROR_CODE_ERROR, MESSAGE_NO_RESULT, nil)
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
213
243
|
@objc(getThetaState:withRejecter:)
|
|
214
244
|
func getThetaState(
|
|
215
245
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
@@ -535,15 +565,28 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
535
565
|
|
|
536
566
|
class Callback: PhotoCaptureTakePictureCallback {
|
|
537
567
|
let callback: (_ url: String?, _ error: Error?) -> Void
|
|
538
|
-
|
|
568
|
+
weak var client: ThetaClientReactNative?
|
|
569
|
+
init(
|
|
570
|
+
_ callback: @escaping (_ url: String?, _ error: Error?) -> Void,
|
|
571
|
+
client: ThetaClientReactNative
|
|
572
|
+
) {
|
|
539
573
|
self.callback = callback
|
|
574
|
+
self.client = client
|
|
540
575
|
}
|
|
541
576
|
|
|
542
577
|
func onSuccess(fileUrl: String?) {
|
|
543
578
|
callback(fileUrl, nil)
|
|
544
579
|
}
|
|
545
580
|
|
|
546
|
-
func
|
|
581
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
582
|
+
client?.sendEvent(
|
|
583
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
584
|
+
body: toNotify(
|
|
585
|
+
name: ThetaClientReactNative.NOTIFY_PHOTO_CAPTURING,
|
|
586
|
+
params: toCapturingNotifyParam(value: status)
|
|
587
|
+
)
|
|
588
|
+
)
|
|
589
|
+
}
|
|
547
590
|
|
|
548
591
|
func onError(exception: ThetaRepository.ThetaRepositoryException) {
|
|
549
592
|
callback(nil, exception.asError())
|
|
@@ -551,14 +594,15 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
551
594
|
}
|
|
552
595
|
|
|
553
596
|
photoCapture.takePicture(
|
|
554
|
-
callback: Callback
|
|
597
|
+
callback: Callback({ url, error in
|
|
555
598
|
if let error {
|
|
556
599
|
reject(ERROR_CODE_ERROR, error.localizedDescription, error)
|
|
557
600
|
} else {
|
|
558
601
|
self.photoCapture = nil
|
|
559
602
|
resolve(url)
|
|
560
603
|
}
|
|
561
|
-
})
|
|
604
|
+
}, client: self)
|
|
605
|
+
)
|
|
562
606
|
}
|
|
563
607
|
|
|
564
608
|
@objc(getTimeShiftCaptureBuilder:withRejecter:)
|
|
@@ -655,7 +699,17 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
655
699
|
)
|
|
656
700
|
)
|
|
657
701
|
}
|
|
658
|
-
|
|
702
|
+
|
|
703
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
704
|
+
client?.sendEvent(
|
|
705
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
706
|
+
body: toNotify(
|
|
707
|
+
name: ThetaClientReactNative.NOTIFY_TIMESHIFT_CAPTURING,
|
|
708
|
+
params: toCapturingNotifyParam(value: status)
|
|
709
|
+
)
|
|
710
|
+
)
|
|
711
|
+
}
|
|
712
|
+
|
|
659
713
|
func onCaptureCompleted(fileUrl: String?) {
|
|
660
714
|
callback(fileUrl, nil)
|
|
661
715
|
}
|
|
@@ -777,6 +831,16 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
777
831
|
)
|
|
778
832
|
)
|
|
779
833
|
}
|
|
834
|
+
|
|
835
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
836
|
+
client?.sendEvent(
|
|
837
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
838
|
+
body: toNotify(
|
|
839
|
+
name: ThetaClientReactNative.NOTIFY_VIDEO_CAPTURE_CAPTURING,
|
|
840
|
+
params: toCapturingNotifyParam(value: status)
|
|
841
|
+
)
|
|
842
|
+
)
|
|
843
|
+
}
|
|
780
844
|
}
|
|
781
845
|
|
|
782
846
|
videoCapturing = videoCapture.startCapture(
|
|
@@ -897,6 +961,16 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
897
961
|
)
|
|
898
962
|
)
|
|
899
963
|
}
|
|
964
|
+
|
|
965
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
966
|
+
client?.sendEvent(
|
|
967
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
968
|
+
body: toNotify(
|
|
969
|
+
name: ThetaClientReactNative.NOTIFY_LIMITLESS_INTERVAL_CAPTURE_CAPTURING,
|
|
970
|
+
params: toCapturingNotifyParam(value: status)
|
|
971
|
+
)
|
|
972
|
+
)
|
|
973
|
+
}
|
|
900
974
|
}
|
|
901
975
|
|
|
902
976
|
limitlessIntervalCapturing = limitlessIntervalCapture.startCapture(
|
|
@@ -1013,7 +1087,17 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
1013
1087
|
)
|
|
1014
1088
|
)
|
|
1015
1089
|
}
|
|
1016
|
-
|
|
1090
|
+
|
|
1091
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
1092
|
+
client?.sendEvent(
|
|
1093
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
1094
|
+
body: toNotify(
|
|
1095
|
+
name: ThetaClientReactNative.NOTIFY_SHOT_COUNT_SPECIFIED_INTERVAL_CAPTURING,
|
|
1096
|
+
params: toCapturingNotifyParam(value: status)
|
|
1097
|
+
)
|
|
1098
|
+
)
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1017
1101
|
func onCaptureCompleted(fileUrls: [String]?) {
|
|
1018
1102
|
callback(fileUrls, nil)
|
|
1019
1103
|
}
|
|
@@ -1144,6 +1228,16 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
1144
1228
|
)
|
|
1145
1229
|
}
|
|
1146
1230
|
|
|
1231
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
1232
|
+
client?.sendEvent(
|
|
1233
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
1234
|
+
body: toNotify(
|
|
1235
|
+
name: ThetaClientReactNative.NOTIFY_COMPOSITE_INTERVAL_CAPTURING,
|
|
1236
|
+
params: toCapturingNotifyParam(value: status)
|
|
1237
|
+
)
|
|
1238
|
+
)
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1147
1241
|
func onCaptureCompleted(fileUrls: [String]?) {
|
|
1148
1242
|
callback(fileUrls, nil)
|
|
1149
1243
|
}
|
|
@@ -1298,6 +1392,16 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
1298
1392
|
)
|
|
1299
1393
|
}
|
|
1300
1394
|
|
|
1395
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
1396
|
+
client?.sendEvent(
|
|
1397
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
1398
|
+
body: toNotify(
|
|
1399
|
+
name: ThetaClientReactNative.NOTIFY_BURST_CAPTURING,
|
|
1400
|
+
params: toCapturingNotifyParam(value: status)
|
|
1401
|
+
)
|
|
1402
|
+
)
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1301
1405
|
func onCaptureCompleted(fileUrls: [String]?) {
|
|
1302
1406
|
callback(fileUrls, nil)
|
|
1303
1407
|
}
|
|
@@ -1428,7 +1532,17 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
1428
1532
|
)
|
|
1429
1533
|
)
|
|
1430
1534
|
}
|
|
1431
|
-
|
|
1535
|
+
|
|
1536
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
1537
|
+
client?.sendEvent(
|
|
1538
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
1539
|
+
body: toNotify(
|
|
1540
|
+
name: ThetaClientReactNative.NOTIFY_MULTI_BRACKET_CAPTURING,
|
|
1541
|
+
params: toCapturingNotifyParam(value: status)
|
|
1542
|
+
)
|
|
1543
|
+
)
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1432
1546
|
func onCaptureCompleted(fileUrls: [String]?) {
|
|
1433
1547
|
callback(fileUrls, nil)
|
|
1434
1548
|
}
|
|
@@ -1559,7 +1673,17 @@ class ThetaClientReactNative: RCTEventEmitter {
|
|
|
1559
1673
|
)
|
|
1560
1674
|
)
|
|
1561
1675
|
}
|
|
1562
|
-
|
|
1676
|
+
|
|
1677
|
+
func onCapturing(status: CapturingStatusEnum) {
|
|
1678
|
+
client?.sendEvent(
|
|
1679
|
+
withName: ThetaClientReactNative.EVENT_NOTIFY,
|
|
1680
|
+
body: toNotify(
|
|
1681
|
+
name: ThetaClientReactNative.NOTIFY_CONTINUOUS_CAPTURING,
|
|
1682
|
+
params: toCapturingNotifyParam(value: status)
|
|
1683
|
+
)
|
|
1684
|
+
)
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1563
1687
|
func onCaptureCompleted(fileUrls: [String]?) {
|
|
1564
1688
|
callback(fileUrls, nil)
|
|
1565
1689
|
}
|
|
@@ -10,6 +10,7 @@ var _notifyController = require("../theta-repository/notify-controller");
|
|
|
10
10
|
const ThetaClientReactNative = _reactNative.NativeModules.ThetaClientReactNative;
|
|
11
11
|
const NOTIFY_PROGRESS = 'BURST-PROGRESS';
|
|
12
12
|
const NOTIFY_STOP_ERROR = 'BURST-STOP-ERROR';
|
|
13
|
+
const NOTIFY_CAPTURING = 'BURST-CAPTURING';
|
|
13
14
|
/**
|
|
14
15
|
* BurstCapture class
|
|
15
16
|
*/
|
|
@@ -20,9 +21,11 @@ class BurstCapture {
|
|
|
20
21
|
/**
|
|
21
22
|
* start burst shooting
|
|
22
23
|
* @param onProgress the block for burst shooting onProgress
|
|
24
|
+
* @param onStopFailed Called when stopCapture error occurs
|
|
25
|
+
* @param onCapturing Called when change capture status
|
|
23
26
|
* @return promise of captured file url
|
|
24
27
|
*/
|
|
25
|
-
async startCapture(onProgress, onStopFailed) {
|
|
28
|
+
async startCapture(onProgress, onStopFailed, onCapturing) {
|
|
26
29
|
if (onProgress) {
|
|
27
30
|
this.notify.addNotify(NOTIFY_PROGRESS, event => {
|
|
28
31
|
var _event$params;
|
|
@@ -34,6 +37,14 @@ class BurstCapture {
|
|
|
34
37
|
onStopFailed(event.params);
|
|
35
38
|
});
|
|
36
39
|
}
|
|
40
|
+
if (onCapturing) {
|
|
41
|
+
this.notify.addNotify(NOTIFY_CAPTURING, event => {
|
|
42
|
+
var _event$params2;
|
|
43
|
+
if ((_event$params2 = event.params) !== null && _event$params2 !== void 0 && _event$params2.status) {
|
|
44
|
+
onCapturing(event.params.status);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
37
48
|
return new Promise(async (resolve, reject) => {
|
|
38
49
|
await ThetaClientReactNative.startBurstCapture().then(result => {
|
|
39
50
|
resolve(result ?? undefined);
|
|
@@ -42,6 +53,7 @@ class BurstCapture {
|
|
|
42
53
|
}).finally(() => {
|
|
43
54
|
this.notify.removeNotify(NOTIFY_PROGRESS);
|
|
44
55
|
this.notify.removeNotify(NOTIFY_STOP_ERROR);
|
|
56
|
+
this.notify.removeNotify(NOTIFY_CAPTURING);
|
|
45
57
|
});
|
|
46
58
|
});
|
|
47
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_capture","require","_reactNative","_notifyController","ThetaClientReactNative","NativeModules","NOTIFY_PROGRESS","NOTIFY_STOP_ERROR","BurstCapture","constructor","notify","startCapture","onProgress","onStopFailed","addNotify","event","_event$params","params","completion","Promise","resolve","reject","startBurstCapture","then","result","undefined","catch","error","finally","removeNotify","cancelCapture","cancelBurstCapture","exports","BurstCaptureBuilder","CaptureBuilder","burstCaptureNum","burstBracketStep","burstCompensation","burstMaxExposureTime","burstEnableIsoControl","burstOrder","interval","setCheckStatusCommandInterval","timeMillis","setBurstMode","mode","options","burstMode","build","_capture_interval","getBurstCaptureBuilder","buildBurstCapture","NotifyController","instance"],"sourceRoot":"../../../src","sources":["capture/burst-capture.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAaA,MAAMG,sBAAsB,GAAGC,0BAAa,CAACD,sBAAsB;AAEnE,MAAME,eAAe,GAAG,gBAAgB;AACxC,MAAMC,iBAAiB,GAAG,kBAAkB;
|
|
1
|
+
{"version":3,"names":["_capture","require","_reactNative","_notifyController","ThetaClientReactNative","NativeModules","NOTIFY_PROGRESS","NOTIFY_STOP_ERROR","NOTIFY_CAPTURING","BurstCapture","constructor","notify","startCapture","onProgress","onStopFailed","onCapturing","addNotify","event","_event$params","params","completion","_event$params2","status","Promise","resolve","reject","startBurstCapture","then","result","undefined","catch","error","finally","removeNotify","cancelCapture","cancelBurstCapture","exports","BurstCaptureBuilder","CaptureBuilder","burstCaptureNum","burstBracketStep","burstCompensation","burstMaxExposureTime","burstEnableIsoControl","burstOrder","interval","setCheckStatusCommandInterval","timeMillis","setBurstMode","mode","options","burstMode","build","_capture_interval","getBurstCaptureBuilder","buildBurstCapture","NotifyController","instance"],"sourceRoot":"../../../src","sources":["capture/burst-capture.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CaptureBuilder = void 0;
|
|
6
|
+
exports.PhotoCaptureBuilderBase = exports.CapturingStatusEnum = exports.CaptureBuilder = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Capture Builder class
|
|
9
9
|
*/
|
|
@@ -114,5 +114,28 @@ class CaptureBuilder {
|
|
|
114
114
|
return this;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
|
|
118
|
+
/** Capturing status */
|
|
117
119
|
exports.CaptureBuilder = CaptureBuilder;
|
|
120
|
+
const CapturingStatusEnum = exports.CapturingStatusEnum = {
|
|
121
|
+
/** Capture in progress */
|
|
122
|
+
CAPTURING: 'CAPTURING',
|
|
123
|
+
/** Self-timer in progress */
|
|
124
|
+
SELF_TIMER_COUNTDOWN: 'SELF_TIMER_COUNTDOWN'
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** type definition of CapturingStatusEnum */
|
|
128
|
+
|
|
129
|
+
class PhotoCaptureBuilderBase extends CaptureBuilder {
|
|
130
|
+
/**
|
|
131
|
+
* Set photo file format.
|
|
132
|
+
* @param {PhotoFileFormatEnum} fileFormat Photo file format to set
|
|
133
|
+
* @return PhotoCaptureBuilder
|
|
134
|
+
*/
|
|
135
|
+
setFileFormat(fileFormat) {
|
|
136
|
+
this.options.fileFormat = fileFormat;
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.PhotoCaptureBuilderBase = PhotoCaptureBuilderBase;
|
|
118
141
|
//# sourceMappingURL=capture.js.map
|