theta-client-react-native 1.0.2 → 1.2.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/README.md +6 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +409 -0
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +700 -24
- package/ios/ThetaClientReactNative.h +6 -0
- package/ios/ThetaClientReactNative.mm +1661 -183
- package/lib/commonjs/capture/capture.js +118 -0
- package/lib/commonjs/capture/capture.js.map +1 -0
- package/lib/commonjs/capture/index.js +50 -0
- package/lib/commonjs/capture/index.js.map +1 -0
- package/lib/commonjs/capture/notify.js +12 -0
- package/lib/commonjs/capture/notify.js.map +1 -0
- package/lib/commonjs/capture/photo-capture.js +64 -0
- package/lib/commonjs/capture/photo-capture.js.map +1 -0
- package/lib/commonjs/capture/time-shift-capture.js +91 -0
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -0
- package/lib/commonjs/capture/video-capture.js +71 -0
- package/lib/commonjs/capture/video-capture.js.map +1 -0
- package/lib/commonjs/index.js +40 -1041
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/access-point.js +23 -0
- package/lib/commonjs/theta-repository/access-point.js.map +1 -0
- package/lib/commonjs/theta-repository/digest-auth.js +2 -0
- package/lib/commonjs/theta-repository/digest-auth.js.map +1 -0
- package/lib/commonjs/theta-repository/index.js +105 -0
- package/lib/commonjs/theta-repository/index.js.map +1 -0
- package/lib/commonjs/theta-repository/options/index.js +138 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-camera-control-source.js +29 -0
- package/lib/commonjs/theta-repository/options/option-camera-control-source.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-camera-mode.js +26 -0
- package/lib/commonjs/theta-repository/options/option-camera-mode.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-network-type.js +26 -0
- package/lib/commonjs/theta-repository/options/option-network-type.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-power-saving.js +24 -0
- package/lib/commonjs/theta-repository/options/option-power-saving.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-preview-format.js +32 -0
- package/lib/commonjs/theta-repository/options/option-preview-format.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-proxy.js +2 -0
- package/lib/commonjs/theta-repository/options/option-proxy.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-shooting-method.js +41 -0
- package/lib/commonjs/theta-repository/options/option-shooting-method.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-shutter-speed.js +302 -0
- package/lib/commonjs/theta-repository/options/option-shutter-speed.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-time-shift.js +43 -0
- package/lib/commonjs/theta-repository/options/option-time-shift.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js +25 -0
- package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-wlan-frequency.js +22 -0
- package/lib/commonjs/theta-repository/options/option-wlan-frequency.js.map +1 -0
- package/lib/commonjs/theta-repository/options/options.js +490 -0
- package/lib/commonjs/theta-repository/options/options.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-config.js +6 -0
- package/lib/commonjs/theta-repository/theta-config.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-files.js +35 -0
- package/lib/commonjs/theta-repository/theta-files.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-info.js +2 -0
- package/lib/commonjs/theta-repository/theta-info.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-meta.js +2 -0
- package/lib/commonjs/theta-repository/theta-meta.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-plugin.js +2 -0
- package/lib/commonjs/theta-repository/theta-plugin.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-repository.js +510 -0
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-state.js +120 -0
- package/lib/commonjs/theta-repository/theta-state.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-timeout.js +2 -0
- package/lib/commonjs/theta-repository/theta-timeout.js.map +1 -0
- package/lib/module/capture/capture.js +111 -0
- package/lib/module/capture/capture.js.map +1 -0
- package/lib/module/capture/index.js +5 -0
- package/lib/module/capture/index.js.map +1 -0
- package/lib/module/capture/notify.js +6 -0
- package/lib/module/capture/notify.js.map +1 -0
- package/lib/module/capture/photo-capture.js +56 -0
- package/lib/module/capture/photo-capture.js.map +1 -0
- package/lib/module/capture/time-shift-capture.js +83 -0
- package/lib/module/capture/time-shift-capture.js.map +1 -0
- package/lib/module/capture/video-capture.js +63 -0
- package/lib/module/capture/video-capture.js.map +1 -0
- package/lib/module/index.js +3 -1009
- package/lib/module/index.js.map +1 -1
- package/lib/module/theta-repository/access-point.js +16 -0
- package/lib/module/theta-repository/access-point.js.map +1 -0
- package/lib/module/theta-repository/digest-auth.js +2 -0
- package/lib/module/theta-repository/digest-auth.js.map +1 -0
- package/lib/module/theta-repository/index.js +10 -0
- package/lib/module/theta-repository/index.js.map +1 -0
- package/lib/module/theta-repository/options/index.js +13 -0
- package/lib/module/theta-repository/options/index.js.map +1 -0
- package/lib/module/theta-repository/options/option-camera-control-source.js +22 -0
- package/lib/module/theta-repository/options/option-camera-control-source.js.map +1 -0
- package/lib/module/theta-repository/options/option-camera-mode.js +19 -0
- package/lib/module/theta-repository/options/option-camera-mode.js.map +1 -0
- package/lib/module/theta-repository/options/option-network-type.js +19 -0
- package/lib/module/theta-repository/options/option-network-type.js.map +1 -0
- package/lib/module/theta-repository/options/option-power-saving.js +17 -0
- package/lib/module/theta-repository/options/option-power-saving.js.map +1 -0
- package/lib/module/theta-repository/options/option-preview-format.js +25 -0
- package/lib/module/theta-repository/options/option-preview-format.js.map +1 -0
- package/lib/module/theta-repository/options/option-proxy.js +2 -0
- package/lib/module/theta-repository/options/option-proxy.js.map +1 -0
- package/lib/module/theta-repository/options/option-shooting-method.js +34 -0
- package/lib/module/theta-repository/options/option-shooting-method.js.map +1 -0
- package/lib/module/theta-repository/options/option-shutter-speed.js +295 -0
- package/lib/module/theta-repository/options/option-shutter-speed.js.map +1 -0
- package/lib/module/theta-repository/options/option-time-shift.js +36 -0
- package/lib/module/theta-repository/options/option-time-shift.js.map +1 -0
- package/lib/module/theta-repository/options/option-white-balance-auto-strength.js +18 -0
- package/lib/module/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
- package/lib/module/theta-repository/options/option-wlan-frequency.js +15 -0
- package/lib/module/theta-repository/options/option-wlan-frequency.js.map +1 -0
- package/lib/module/theta-repository/options/options.js +482 -0
- package/lib/module/theta-repository/options/options.js.map +1 -0
- package/lib/module/theta-repository/theta-config.js +2 -0
- package/lib/module/theta-repository/theta-config.js.map +1 -0
- package/lib/module/theta-repository/theta-files.js +28 -0
- package/lib/module/theta-repository/theta-files.js.map +1 -0
- package/lib/module/theta-repository/theta-info.js +2 -0
- package/lib/module/theta-repository/theta-info.js.map +1 -0
- package/lib/module/theta-repository/theta-meta.js +2 -0
- package/lib/module/theta-repository/theta-meta.js.map +1 -0
- package/lib/module/theta-repository/theta-plugin.js +2 -0
- package/lib/module/theta-repository/theta-plugin.js.map +1 -0
- package/lib/module/theta-repository/theta-repository.js +466 -0
- package/lib/module/theta-repository/theta-repository.js.map +1 -0
- package/lib/module/theta-repository/theta-state.js +113 -0
- package/lib/module/theta-repository/theta-state.js.map +1 -0
- package/lib/module/theta-repository/theta-timeout.js +2 -0
- package/lib/module/theta-repository/theta-timeout.js.map +1 -0
- package/lib/typescript/capture/capture.d.ts +71 -0
- package/lib/typescript/capture/capture.d.ts.map +1 -0
- package/lib/typescript/capture/index.d.ts +5 -0
- package/lib/typescript/capture/index.d.ts.map +1 -0
- package/lib/typescript/capture/notify.d.ts +13 -0
- package/lib/typescript/capture/notify.d.ts.map +1 -0
- package/lib/typescript/capture/photo-capture.d.ts +38 -0
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -0
- package/lib/typescript/capture/time-shift-capture.d.ts +44 -0
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -0
- package/lib/typescript/capture/video-capture.d.ts +43 -0
- package/lib/typescript/capture/video-capture.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -972
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/access-point.d.ts +36 -0
- package/lib/typescript/theta-repository/access-point.d.ts.map +1 -0
- package/lib/typescript/theta-repository/digest-auth.d.ts +17 -0
- package/lib/typescript/theta-repository/digest-auth.d.ts.map +1 -0
- package/lib/typescript/theta-repository/index.d.ts +10 -0
- package/lib/typescript/theta-repository/index.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/index.d.ts +13 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-camera-control-source.d.ts +22 -0
- package/lib/typescript/theta-repository/options/option-camera-control-source.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-camera-mode.d.ts +19 -0
- package/lib/typescript/theta-repository/options/option-camera-mode.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-network-type.d.ts +19 -0
- package/lib/typescript/theta-repository/options/option-network-type.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-power-saving.d.ts +16 -0
- package/lib/typescript/theta-repository/options/option-power-saving.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-preview-format.d.ts +25 -0
- package/lib/typescript/theta-repository/options/option-preview-format.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-proxy.d.ts +23 -0
- package/lib/typescript/theta-repository/options/option-proxy.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-shooting-method.d.ts +33 -0
- package/lib/typescript/theta-repository/options/option-shooting-method.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-shutter-speed.d.ts +295 -0
- package/lib/typescript/theta-repository/options/option-shutter-speed.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-time-shift.d.ts +54 -0
- package/lib/typescript/theta-repository/options/option-time-shift.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts +18 -0
- package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-wlan-frequency.d.ts +15 -0
- package/lib/typescript/theta-repository/options/option-wlan-frequency.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/options.d.ts +566 -0
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-config.d.ts +20 -0
- package/lib/typescript/theta-repository/theta-config.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-files.d.ts +45 -0
- package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-info.d.ts +34 -0
- package/lib/typescript/theta-repository/theta-info.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-meta.d.ts +38 -0
- package/lib/typescript/theta-repository/theta-meta.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-plugin.d.ts +26 -0
- package/lib/typescript/theta-repository/theta-plugin.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-repository.d.ts +333 -0
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-state.d.ts +150 -0
- package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-timeout.d.ts +22 -0
- package/lib/typescript/theta-repository/theta-timeout.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/capture/capture.ts +124 -0
- package/src/capture/index.ts +4 -0
- package/src/capture/notify.ts +27 -0
- package/src/capture/photo-capture.ts +62 -0
- package/src/capture/time-shift-capture.ts +99 -0
- package/src/capture/video-capture.ts +69 -0
- package/src/index.tsx +3 -1243
- package/src/theta-repository/access-point.ts +38 -0
- package/src/theta-repository/digest-auth.ts +16 -0
- package/src/theta-repository/index.ts +9 -0
- package/src/theta-repository/options/index.ts +13 -0
- package/src/theta-repository/options/option-camera-control-source.ts +24 -0
- package/src/theta-repository/options/option-camera-mode.ts +20 -0
- package/src/theta-repository/options/option-network-type.ts +20 -0
- package/src/theta-repository/options/option-power-saving.ts +18 -0
- package/src/theta-repository/options/option-preview-format.ts +27 -0
- package/src/theta-repository/options/option-proxy.ts +22 -0
- package/src/theta-repository/options/option-shooting-method.ts +36 -0
- package/src/theta-repository/options/option-shutter-speed.ts +360 -0
- package/src/theta-repository/options/option-time-shift.ts +59 -0
- package/src/theta-repository/options/option-white-balance-auto-strength.ts +19 -0
- package/src/theta-repository/options/option-wlan-frequency.ts +16 -0
- package/src/theta-repository/options/options.ts +622 -0
- package/src/theta-repository/theta-config.ts +20 -0
- package/src/theta-repository/theta-files.ts +49 -0
- package/src/theta-repository/theta-info.ts +35 -0
- package/src/theta-repository/theta-meta.ts +39 -0
- package/src/theta-repository/theta-plugin.ts +25 -0
- package/src/theta-repository/theta-repository.ts +527 -0
- package/src/theta-repository/theta-state.ts +164 -0
- package/src/theta-repository/theta-timeout.ts +21 -0
- package/theta-client-react-native.podspec +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Build theta-client.
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
$
|
|
8
|
+
$ gradlew publishToMavenLocal podPublishXCFramework
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
* Set the directory of theta-client to environment variable `THETA_CLIENT`.
|
|
@@ -64,3 +64,8 @@
|
|
|
64
64
|
```
|
|
65
65
|
$ yarn start
|
|
66
66
|
```
|
|
67
|
+
|
|
68
|
+
### Tips for Windows 11
|
|
69
|
+
|
|
70
|
+
* Convert your `mkpackage.sh` file from Carriage Return Line Feed "CRLF" to Line Feed "LF"
|
|
71
|
+
* Instead of running `sh mkpackage.sh` use `bash mkpackage.sh`
|
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.6.4-native-mt"
|
|
138
|
-
implementation "com.ricoh360.thetaclient:theta-client:1.
|
|
138
|
+
implementation "com.ricoh360.thetaclient:theta-client:1.2.0"
|
|
139
139
|
|
|
140
140
|
// From node_modules
|
|
141
141
|
}
|
|
@@ -4,10 +4,34 @@ import com.facebook.react.bridge.Arguments
|
|
|
4
4
|
import com.facebook.react.bridge.ReadableMap
|
|
5
5
|
import com.facebook.react.bridge.ReadableType
|
|
6
6
|
import com.facebook.react.bridge.WritableMap
|
|
7
|
+
import com.ricoh360.thetaclient.DigestAuth
|
|
7
8
|
import com.ricoh360.thetaclient.ThetaRepository
|
|
8
9
|
import com.ricoh360.thetaclient.capture.PhotoCapture
|
|
10
|
+
import com.ricoh360.thetaclient.capture.TimeShiftCapture
|
|
9
11
|
import com.ricoh360.thetaclient.capture.VideoCapture
|
|
10
12
|
|
|
13
|
+
const val KEY_NOTIFY_NAME = "name"
|
|
14
|
+
const val KEY_NOTIFY_PARAMS = "params"
|
|
15
|
+
const val KEY_NOTIFY_PARAM_COMPLETION = "completion"
|
|
16
|
+
|
|
17
|
+
fun toNotify(
|
|
18
|
+
name: String,
|
|
19
|
+
params: WritableMap?
|
|
20
|
+
): WritableMap {
|
|
21
|
+
val objects = Arguments.createMap()
|
|
22
|
+
objects.putString(KEY_NOTIFY_NAME, name)
|
|
23
|
+
params?.run {
|
|
24
|
+
objects.putMap(KEY_NOTIFY_PARAMS, params)
|
|
25
|
+
}
|
|
26
|
+
return objects
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
fun toCaptureProgressNotifyParam(value: Float): WritableMap {
|
|
30
|
+
val result = Arguments.createMap()
|
|
31
|
+
result.putDouble(KEY_NOTIFY_PARAM_COMPLETION, value.toDouble())
|
|
32
|
+
return result
|
|
33
|
+
}
|
|
34
|
+
|
|
11
35
|
/**
|
|
12
36
|
* convert option interface
|
|
13
37
|
*/
|
|
@@ -15,6 +39,7 @@ interface OptionConverter {
|
|
|
15
39
|
fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {}
|
|
16
40
|
fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {}
|
|
17
41
|
fun setPhotoOption(objects: ReadableMap, builder: PhotoCapture.Builder) {}
|
|
42
|
+
fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {}
|
|
18
43
|
fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {}
|
|
19
44
|
}
|
|
20
45
|
|
|
@@ -40,6 +65,12 @@ class ApertureConverter : OptionConverter {
|
|
|
40
65
|
}
|
|
41
66
|
}
|
|
42
67
|
|
|
68
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
69
|
+
objects.getString("aperture")?.let {
|
|
70
|
+
builder.setAperture(ThetaRepository.ApertureEnum.valueOf(it))
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
43
74
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
44
75
|
objects.getString("aperture")?.let {
|
|
45
76
|
builder.setAperture(ThetaRepository.ApertureEnum.valueOf(it))
|
|
@@ -47,6 +78,57 @@ class ApertureConverter : OptionConverter {
|
|
|
47
78
|
}
|
|
48
79
|
}
|
|
49
80
|
|
|
81
|
+
/**
|
|
82
|
+
* BluetoothPowerConverter
|
|
83
|
+
*/
|
|
84
|
+
class BluetoothPowerConverter : OptionConverter {
|
|
85
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
86
|
+
objects.getString("bluetoothPower")?.let {
|
|
87
|
+
options.bluetoothPower = ThetaRepository.BluetoothPowerEnum.valueOf(it)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
92
|
+
options.bluetoothPower?.let {
|
|
93
|
+
objects.putString("bluetoothPower", it.toString())
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* CameraControlSourceConverter
|
|
100
|
+
*/
|
|
101
|
+
class CameraControlSourceConverter : OptionConverter {
|
|
102
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
103
|
+
objects.getString("cameraControlSource")?.let {
|
|
104
|
+
options.cameraControlSource = ThetaRepository.CameraControlSourceEnum.valueOf(it)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
109
|
+
options.cameraControlSource?.let {
|
|
110
|
+
objects.putString("cameraControlSource", it.toString())
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* CameraModeConverter
|
|
117
|
+
*/
|
|
118
|
+
class CameraModeConverter : OptionConverter {
|
|
119
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
120
|
+
objects.getString("cameraMode")?.let {
|
|
121
|
+
options.cameraMode = ThetaRepository.CameraModeEnum.valueOf(it)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
126
|
+
options.cameraMode?.let {
|
|
127
|
+
objects.putString("cameraMode", it.toString())
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
50
132
|
/**
|
|
51
133
|
* CaptureModeConverter
|
|
52
134
|
*/
|
|
@@ -86,6 +168,12 @@ class ExposureCompensationConverter : OptionConverter {
|
|
|
86
168
|
}
|
|
87
169
|
}
|
|
88
170
|
|
|
171
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
172
|
+
objects.getString("exposureCompensation")?.let {
|
|
173
|
+
builder.setExposureCompensation(ThetaRepository.ExposureCompensationEnum.valueOf(it))
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
89
177
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
90
178
|
objects.getString("exposureCompensation")?.let {
|
|
91
179
|
builder.setExposureCompensation(ThetaRepository.ExposureCompensationEnum.valueOf(it))
|
|
@@ -115,6 +203,12 @@ class ExposureDelayConverter : OptionConverter {
|
|
|
115
203
|
}
|
|
116
204
|
}
|
|
117
205
|
|
|
206
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
207
|
+
objects.getString("exposureDelay")?.let {
|
|
208
|
+
builder.setExposureDelay(ThetaRepository.ExposureDelayEnum.valueOf(it))
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
118
212
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
119
213
|
objects.getString("exposureDelay")?.let {
|
|
120
214
|
builder.setExposureDelay(ThetaRepository.ExposureDelayEnum.valueOf(it))
|
|
@@ -144,6 +238,12 @@ class ExposureProgramConverter : OptionConverter {
|
|
|
144
238
|
}
|
|
145
239
|
}
|
|
146
240
|
|
|
241
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
242
|
+
objects.getString("exposureProgram")?.let {
|
|
243
|
+
builder.setExposureProgram(ThetaRepository.ExposureProgramEnum.valueOf(it))
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
147
247
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
148
248
|
objects.getString("exposureProgram")?.let {
|
|
149
249
|
builder.setExposureProgram(ThetaRepository.ExposureProgramEnum.valueOf(it))
|
|
@@ -213,6 +313,12 @@ class GpsTagRecordingConverter : OptionConverter {
|
|
|
213
313
|
}
|
|
214
314
|
}
|
|
215
315
|
|
|
316
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
317
|
+
objects.getString("gpsTagRecording")?.let {
|
|
318
|
+
builder.setGpsTagRecording(ThetaRepository.GpsTagRecordingEnum.valueOf(it))
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
216
322
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
217
323
|
objects.getString("gpsTagRecording")?.let {
|
|
218
324
|
builder.setGpsTagRecording(ThetaRepository.GpsTagRecordingEnum.valueOf(it))
|
|
@@ -242,6 +348,12 @@ class IsoConverter : OptionConverter {
|
|
|
242
348
|
}
|
|
243
349
|
}
|
|
244
350
|
|
|
351
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
352
|
+
objects.getString("iso")?.let {
|
|
353
|
+
builder.setIso(ThetaRepository.IsoEnum.valueOf(it))
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
245
357
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
246
358
|
objects.getString("iso")?.let {
|
|
247
359
|
builder.setIso(ThetaRepository.IsoEnum.valueOf(it))
|
|
@@ -271,6 +383,12 @@ class IsoAutoHighLimitConverter : OptionConverter {
|
|
|
271
383
|
}
|
|
272
384
|
}
|
|
273
385
|
|
|
386
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
387
|
+
objects.getString("isoAutoHighLimit")?.let {
|
|
388
|
+
builder.setIsoAutoHighLimit(ThetaRepository.IsoAutoHighLimitEnum.valueOf(it))
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
274
392
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
275
393
|
objects.getString("isoAutoHighLimit")?.let {
|
|
276
394
|
builder.setIsoAutoHighLimit(ThetaRepository.IsoAutoHighLimitEnum.valueOf(it))
|
|
@@ -318,6 +436,23 @@ class MaxRecordableTimeConverter : OptionConverter {
|
|
|
318
436
|
}
|
|
319
437
|
}
|
|
320
438
|
|
|
439
|
+
/**
|
|
440
|
+
* NetworkTypeConverter
|
|
441
|
+
*/
|
|
442
|
+
class NetworkTypeConverter : OptionConverter {
|
|
443
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
444
|
+
objects.getString("networkType")?.let {
|
|
445
|
+
options.networkType = ThetaRepository.NetworkTypeEnum.valueOf(it)
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
450
|
+
options.networkType?.let {
|
|
451
|
+
objects.putString("networkType", it.toString())
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
321
456
|
/**
|
|
322
457
|
* OffDelayConverter
|
|
323
458
|
*/
|
|
@@ -344,6 +479,131 @@ class OffDelayConverter : OptionConverter {
|
|
|
344
479
|
}
|
|
345
480
|
}
|
|
346
481
|
|
|
482
|
+
/**
|
|
483
|
+
* PowerSavingConverter
|
|
484
|
+
*/
|
|
485
|
+
class PowerSavingConverter : OptionConverter {
|
|
486
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
487
|
+
objects.getString("powerSaving")?.let {
|
|
488
|
+
options.powerSaving = ThetaRepository.PowerSavingEnum.valueOf(it)
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
493
|
+
options.powerSaving?.let {
|
|
494
|
+
objects.putString("powerSaving", it.toString())
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* PreviewFormatConverter
|
|
501
|
+
*/
|
|
502
|
+
class PreviewFormatConverter : OptionConverter {
|
|
503
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
504
|
+
objects.getString("previewFormat")?.let {
|
|
505
|
+
options.previewFormat = ThetaRepository.PreviewFormatEnum.valueOf(it)
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
510
|
+
options.previewFormat?.let {
|
|
511
|
+
objects.putString("previewFormat", it.toString())
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* ProxyConverter
|
|
518
|
+
*/
|
|
519
|
+
class ProxyConverter : OptionConverter {
|
|
520
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
521
|
+
objects.getMap("proxy")?.let {
|
|
522
|
+
options.proxy = ThetaRepository.Proxy(
|
|
523
|
+
use = it.getBoolean("use") ?: false,
|
|
524
|
+
url = it.getString("url"),
|
|
525
|
+
port = if (it.hasKey("port")) it.getInt("port") else null,
|
|
526
|
+
userid = it.getString("userid"),
|
|
527
|
+
password = it.getString("password")
|
|
528
|
+
)
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
533
|
+
options.proxy?.let {
|
|
534
|
+
val proxy = Arguments.createMap()
|
|
535
|
+
proxy.putBoolean("use", it.use)
|
|
536
|
+
it.url?.let { url ->
|
|
537
|
+
proxy.putString("url", url)
|
|
538
|
+
}
|
|
539
|
+
it.port?.let { port ->
|
|
540
|
+
proxy.putInt("port", port)
|
|
541
|
+
}
|
|
542
|
+
it.userid?.let { userid ->
|
|
543
|
+
proxy.putString("userid", userid)
|
|
544
|
+
}
|
|
545
|
+
it.password?.let { password ->
|
|
546
|
+
proxy.putString("password", password)
|
|
547
|
+
}
|
|
548
|
+
objects.putMap("proxy", proxy)
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* TimeShiftConverter
|
|
555
|
+
*/
|
|
556
|
+
class TimeShiftConverter : OptionConverter {
|
|
557
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
558
|
+
objects.getMap("timeShift")?.let { timeShiftMap ->
|
|
559
|
+
val timeShift = ThetaRepository.TimeShiftSetting()
|
|
560
|
+
if (timeShiftMap.hasKey("isFrontFirst")) {
|
|
561
|
+
timeShift.isFrontFirst = timeShiftMap.getBoolean("isFrontFirst")
|
|
562
|
+
}
|
|
563
|
+
timeShiftMap.getString("firstInterval")?.let {
|
|
564
|
+
timeShift.firstInterval = ThetaRepository.TimeShiftIntervalEnum.valueOf(it)
|
|
565
|
+
}
|
|
566
|
+
timeShiftMap.getString("secondInterval")?.let {
|
|
567
|
+
timeShift.secondInterval = ThetaRepository.TimeShiftIntervalEnum.valueOf(it)
|
|
568
|
+
}
|
|
569
|
+
options.timeShift = timeShift
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
574
|
+
options.timeShift?.let { timeShiftMap ->
|
|
575
|
+
val timeShift = Arguments.createMap()
|
|
576
|
+
timeShiftMap.isFrontFirst?.let {
|
|
577
|
+
timeShift.putBoolean("isFrontFirst", it)
|
|
578
|
+
}
|
|
579
|
+
timeShiftMap.firstInterval?.let {
|
|
580
|
+
timeShift.putString("firstInterval", it.toString())
|
|
581
|
+
}
|
|
582
|
+
timeShiftMap.secondInterval?.let {
|
|
583
|
+
timeShift.putString("secondInterval", it.toString())
|
|
584
|
+
}
|
|
585
|
+
objects.putMap("timeShift", timeShift)
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* ShootingMethodConverter
|
|
592
|
+
*/
|
|
593
|
+
class ShootingMethodConverter : OptionConverter {
|
|
594
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
595
|
+
objects.getString("shootingMethod")?.let {
|
|
596
|
+
options.shootingMethod = ThetaRepository.ShootingMethodEnum.valueOf(it)
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
601
|
+
options.shootingMethod?.let {
|
|
602
|
+
objects.putString("shootingMethod", it.toString())
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
347
607
|
/**
|
|
348
608
|
* WhiteBalanceConverter
|
|
349
609
|
*/
|
|
@@ -366,6 +626,12 @@ class WhiteBalanceConverter : OptionConverter {
|
|
|
366
626
|
}
|
|
367
627
|
}
|
|
368
628
|
|
|
629
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
630
|
+
objects.getString("whiteBalance")?.let {
|
|
631
|
+
builder.setWhiteBalance(ThetaRepository.WhiteBalanceEnum.valueOf(it))
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
369
635
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
370
636
|
objects.getString("whiteBalance")?.let {
|
|
371
637
|
builder.setWhiteBalance(ThetaRepository.WhiteBalanceEnum.valueOf(it))
|
|
@@ -373,6 +639,41 @@ class WhiteBalanceConverter : OptionConverter {
|
|
|
373
639
|
}
|
|
374
640
|
}
|
|
375
641
|
|
|
642
|
+
/**
|
|
643
|
+
* WhiteBalanceAutoStrengthConverter
|
|
644
|
+
*/
|
|
645
|
+
class WhiteBalanceAutoStrengthConverter : OptionConverter {
|
|
646
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
647
|
+
objects.getString("whiteBalanceAutoStrength")?.let {
|
|
648
|
+
options.whiteBalanceAutoStrength = ThetaRepository.WhiteBalanceAutoStrengthEnum.valueOf(it)
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
653
|
+
options.whiteBalanceAutoStrength?.let {
|
|
654
|
+
objects.putString("whiteBalanceAutoStrength", it.toString())
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* WlanFrequencyConverter
|
|
661
|
+
*/
|
|
662
|
+
class WlanFrequencyConverter : OptionConverter {
|
|
663
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
664
|
+
objects.getString("wlanFrequency")?.let {
|
|
665
|
+
options.wlanFrequency = ThetaRepository.WlanFrequencyEnum.valueOf(it)
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
670
|
+
options.wlanFrequency?.let {
|
|
671
|
+
objects.putString("wlanFrequency", it.toString())
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
|
|
376
677
|
/**
|
|
377
678
|
* ColorTemperatureConverter
|
|
378
679
|
*/
|
|
@@ -391,6 +692,10 @@ class ColorTemperatureConverter : OptionConverter {
|
|
|
391
692
|
builder.setColorTemperature(objects.getInt("colorTemperature"))
|
|
392
693
|
}
|
|
393
694
|
|
|
695
|
+
override fun setTimeShiftOption(objects: ReadableMap, builder: TimeShiftCapture.Builder) {
|
|
696
|
+
builder.setColorTemperature(objects.getInt("colorTemperature"))
|
|
697
|
+
}
|
|
698
|
+
|
|
394
699
|
override fun setVideoOption(objects: ReadableMap, builder: VideoCapture.Builder) {
|
|
395
700
|
builder.setColorTemperature(objects.getInt("colorTemperature"))
|
|
396
701
|
}
|
|
@@ -428,6 +733,23 @@ class IsGpsOnConverter : OptionConverter {
|
|
|
428
733
|
}
|
|
429
734
|
}
|
|
430
735
|
|
|
736
|
+
/**
|
|
737
|
+
* ShutterSpeedConverter
|
|
738
|
+
*/
|
|
739
|
+
class ShutterSpeedConverter : OptionConverter {
|
|
740
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
741
|
+
objects.getString("shutterSpeed")?.let {
|
|
742
|
+
options.shutterSpeed = ThetaRepository.ShutterSpeedEnum.valueOf(it)
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
747
|
+
options.shutterSpeed?.let {
|
|
748
|
+
objects.putString("shutterSpeed", it.toString())
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
431
753
|
/**
|
|
432
754
|
* SleepDelayConverter
|
|
433
755
|
*/
|
|
@@ -555,3 +877,90 @@ class GpsInfoConverter : OptionConverter {
|
|
|
555
877
|
}
|
|
556
878
|
}
|
|
557
879
|
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* UsernameConverter
|
|
883
|
+
*/
|
|
884
|
+
class UsernameConverter : OptionConverter {
|
|
885
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
886
|
+
objects.getString("username")?.let {
|
|
887
|
+
options.username = it
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
892
|
+
options.username?.let {
|
|
893
|
+
objects.putString("username", it)
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* PasswordConverter
|
|
900
|
+
*/
|
|
901
|
+
class PasswordConverter : OptionConverter {
|
|
902
|
+
override fun setToTheta(options: ThetaRepository.Options, objects: ReadableMap) {
|
|
903
|
+
objects.getString("password")?.let {
|
|
904
|
+
options.password = it
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
override fun setFromTheta(options: ThetaRepository.Options, objects: WritableMap) {
|
|
909
|
+
options.password?.let {
|
|
910
|
+
objects.putString("password", it)
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
fun configToTheta(objects: ReadableMap): ThetaRepository.Config {
|
|
916
|
+
val config = ThetaRepository.Config()
|
|
917
|
+
config.dateTime = objects.getString("dateTime")
|
|
918
|
+
|
|
919
|
+
objects.getString("language")?.let {
|
|
920
|
+
config.language = ThetaRepository.LanguageEnum.valueOf(it)
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
objects.getString("offDelay")?.let {
|
|
924
|
+
config.offDelay = ThetaRepository.OffDelayEnum.valueOf(it)
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
objects.getString("sleepDelay")?.let {
|
|
928
|
+
config.sleepDelay = ThetaRepository.SleepDelayEnum.valueOf(it)
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
config.shutterVolume = if (objects.hasKey("shutterVolume")) {
|
|
932
|
+
objects.getInt("shutterVolume")
|
|
933
|
+
} else {
|
|
934
|
+
null
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
config.clientMode = if (objects.hasKey("clientMode")) {
|
|
938
|
+
objects.getMap("clientMode")?.let {
|
|
939
|
+
digestAuthToTheta(it)
|
|
940
|
+
}
|
|
941
|
+
} else {
|
|
942
|
+
null
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
return config
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
fun digestAuthToTheta(objects: ReadableMap): DigestAuth? {
|
|
949
|
+
val username = objects.getString("username") ?: run {
|
|
950
|
+
return null
|
|
951
|
+
}
|
|
952
|
+
val password = if (objects.hasKey("password")) {
|
|
953
|
+
objects.getString("password")
|
|
954
|
+
} else {
|
|
955
|
+
null
|
|
956
|
+
}
|
|
957
|
+
return DigestAuth(username, password)
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
fun timeoutToTheta(objects: ReadableMap): ThetaRepository.Timeout {
|
|
961
|
+
return ThetaRepository.Timeout(
|
|
962
|
+
objects.getInt("connectTimeout").toLong(),
|
|
963
|
+
objects.getInt("requestTimeout").toLong(),
|
|
964
|
+
objects.getInt("socketTimeout").toLong(),
|
|
965
|
+
)
|
|
966
|
+
}
|