theta-client-react-native 1.13.1 → 1.14.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.
Files changed (136) hide show
  1. package/README.ja.md +7 -0
  2. package/README.md +7 -0
  3. package/android/build.gradle +14 -86
  4. package/android/gradle.properties +3 -4
  5. package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +2 -0
  6. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +205 -116
  7. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkPackage.kt +22 -8
  8. package/ios/ConvertUtil.swift +5 -0
  9. package/ios/ThetaClientReactNative.mm +37 -0
  10. package/ios/ThetaClientReactNative.swift +126 -143
  11. package/lib/commonjs/NativeThetaClientReactNative.js +34 -0
  12. package/lib/commonjs/NativeThetaClientReactNative.js.map +1 -0
  13. package/lib/commonjs/capture/burst-capture.js +6 -6
  14. package/lib/commonjs/capture/burst-capture.js.map +1 -1
  15. package/lib/commonjs/capture/composite-interval-capture.js +6 -6
  16. package/lib/commonjs/capture/composite-interval-capture.js.map +1 -1
  17. package/lib/commonjs/capture/continuous-capture.js +5 -5
  18. package/lib/commonjs/capture/continuous-capture.js.map +1 -1
  19. package/lib/commonjs/capture/limitless-interval-capture.js +6 -6
  20. package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -1
  21. package/lib/commonjs/capture/multi-bracket-capture.js +6 -6
  22. package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -1
  23. package/lib/commonjs/capture/photo-capture.js +5 -5
  24. package/lib/commonjs/capture/photo-capture.js.map +1 -1
  25. package/lib/commonjs/capture/shot-count-specified-interval-capture.js +6 -6
  26. package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
  27. package/lib/commonjs/capture/time-shift-capture.js +6 -6
  28. package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
  29. package/lib/commonjs/capture/time-shift-manual-capture.js +7 -7
  30. package/lib/commonjs/capture/time-shift-manual-capture.js.map +1 -1
  31. package/lib/commonjs/capture/video-capture.js +6 -6
  32. package/lib/commonjs/capture/video-capture.js.map +1 -1
  33. package/lib/commonjs/index.js +12 -12
  34. package/lib/commonjs/index.js.map +1 -1
  35. package/lib/commonjs/theta-repository/event-websocket.js +4 -4
  36. package/lib/commonjs/theta-repository/event-websocket.js.map +1 -1
  37. package/lib/commonjs/theta-repository/libs/convert-video-formats.js +3 -3
  38. package/lib/commonjs/theta-repository/libs/convert-video-formats.js.map +1 -1
  39. package/lib/commonjs/theta-repository/notify-controller.js +3 -1
  40. package/lib/commonjs/theta-repository/notify-controller.js.map +1 -1
  41. package/lib/commonjs/theta-repository/options/index.js +11 -0
  42. package/lib/commonjs/theta-repository/options/index.js.map +1 -1
  43. package/lib/commonjs/theta-repository/options/option-mode-memory.js +33 -0
  44. package/lib/commonjs/theta-repository/options/option-mode-memory.js.map +1 -0
  45. package/lib/commonjs/theta-repository/options/options.js +2 -0
  46. package/lib/commonjs/theta-repository/options/options.js.map +1 -1
  47. package/lib/commonjs/theta-repository/theta-repository.js +54 -64
  48. package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
  49. package/lib/module/NativeThetaClientReactNative.js +28 -0
  50. package/lib/module/NativeThetaClientReactNative.js.map +1 -0
  51. package/lib/module/capture/burst-capture.js +1 -2
  52. package/lib/module/capture/burst-capture.js.map +1 -1
  53. package/lib/module/capture/composite-interval-capture.js +1 -2
  54. package/lib/module/capture/composite-interval-capture.js.map +1 -1
  55. package/lib/module/capture/continuous-capture.js +1 -2
  56. package/lib/module/capture/continuous-capture.js.map +1 -1
  57. package/lib/module/capture/limitless-interval-capture.js +1 -2
  58. package/lib/module/capture/limitless-interval-capture.js.map +1 -1
  59. package/lib/module/capture/multi-bracket-capture.js +1 -2
  60. package/lib/module/capture/multi-bracket-capture.js.map +1 -1
  61. package/lib/module/capture/photo-capture.js +1 -2
  62. package/lib/module/capture/photo-capture.js.map +1 -1
  63. package/lib/module/capture/shot-count-specified-interval-capture.js +1 -2
  64. package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
  65. package/lib/module/capture/time-shift-capture.js +1 -2
  66. package/lib/module/capture/time-shift-capture.js.map +1 -1
  67. package/lib/module/capture/time-shift-manual-capture.js +1 -2
  68. package/lib/module/capture/time-shift-manual-capture.js.map +1 -1
  69. package/lib/module/capture/video-capture.js +1 -2
  70. package/lib/module/capture/video-capture.js.map +1 -1
  71. package/lib/module/index.js +11 -12
  72. package/lib/module/index.js.map +1 -1
  73. package/lib/module/theta-repository/event-websocket.js +1 -2
  74. package/lib/module/theta-repository/event-websocket.js.map +1 -1
  75. package/lib/module/theta-repository/libs/convert-video-formats.js +1 -2
  76. package/lib/module/theta-repository/libs/convert-video-formats.js.map +1 -1
  77. package/lib/module/theta-repository/notify-controller.js +3 -2
  78. package/lib/module/theta-repository/notify-controller.js.map +1 -1
  79. package/lib/module/theta-repository/options/index.js +1 -0
  80. package/lib/module/theta-repository/options/index.js.map +1 -1
  81. package/lib/module/theta-repository/options/option-mode-memory.js +27 -0
  82. package/lib/module/theta-repository/options/option-mode-memory.js.map +1 -0
  83. package/lib/module/theta-repository/options/options.js +2 -0
  84. package/lib/module/theta-repository/options/options.js.map +1 -1
  85. package/lib/module/theta-repository/theta-repository.js +15 -26
  86. package/lib/module/theta-repository/theta-repository.js.map +1 -1
  87. package/lib/typescript/NativeThetaClientReactNative.d.ts +91 -0
  88. package/lib/typescript/NativeThetaClientReactNative.d.ts.map +1 -0
  89. package/lib/typescript/capture/burst-capture.d.ts.map +1 -1
  90. package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -1
  91. package/lib/typescript/capture/continuous-capture.d.ts +2 -1
  92. package/lib/typescript/capture/continuous-capture.d.ts.map +1 -1
  93. package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -1
  94. package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -1
  95. package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
  96. package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
  97. package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
  98. package/lib/typescript/capture/time-shift-manual-capture.d.ts.map +1 -1
  99. package/lib/typescript/capture/video-capture.d.ts.map +1 -1
  100. package/lib/typescript/index.d.ts +6 -2
  101. package/lib/typescript/index.d.ts.map +1 -1
  102. package/lib/typescript/theta-repository/event-websocket.d.ts.map +1 -1
  103. package/lib/typescript/theta-repository/notify-controller.d.ts +2 -1
  104. package/lib/typescript/theta-repository/notify-controller.d.ts.map +1 -1
  105. package/lib/typescript/theta-repository/options/index.d.ts +1 -0
  106. package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
  107. package/lib/typescript/theta-repository/options/option-mode-memory.d.ts +27 -0
  108. package/lib/typescript/theta-repository/options/option-mode-memory.d.ts.map +1 -0
  109. package/lib/typescript/theta-repository/options/options.d.ts +5 -0
  110. package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
  111. package/lib/typescript/theta-repository/theta-repository.d.ts +6 -6
  112. package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
  113. package/package.json +35 -27
  114. package/src/NativeThetaClientReactNative.ts +199 -0
  115. package/src/capture/burst-capture.ts +3 -6
  116. package/src/capture/capture.ts +1 -1
  117. package/src/capture/composite-interval-capture.ts +3 -6
  118. package/src/capture/continuous-capture.ts +4 -7
  119. package/src/capture/limitless-interval-capture.ts +3 -6
  120. package/src/capture/multi-bracket-capture.ts +3 -6
  121. package/src/capture/photo-capture.ts +3 -6
  122. package/src/capture/shot-count-specified-interval-capture.ts +3 -6
  123. package/src/capture/time-shift-capture.ts +3 -6
  124. package/src/capture/time-shift-manual-capture.ts +3 -6
  125. package/src/capture/video-capture.ts +3 -6
  126. package/src/index.tsx +12 -19
  127. package/src/theta-repository/event-websocket.ts +1 -3
  128. package/src/theta-repository/libs/convert-video-formats.ts +3 -3
  129. package/src/theta-repository/notify-controller.ts +4 -8
  130. package/src/theta-repository/options/index.ts +1 -0
  131. package/src/theta-repository/options/option-mode-memory.ts +28 -0
  132. package/src/theta-repository/options/options.ts +5 -0
  133. package/src/theta-repository/theta-repository.ts +28 -36
  134. package/theta-client-react-native.podspec +4 -19
  135. package/ios/ThetaClientReactNative.m +0 -308
  136. package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +0 -283
@@ -14,7 +14,7 @@ import kotlin.text.String
14
14
 
15
15
  class ThetaClientReactNativeModule(
16
16
  reactContext: ReactApplicationContext
17
- ) : ReactContextBaseJavaModule(reactContext), CoroutineScope {
17
+ ) : NativeThetaClientReactNativeSpec(reactContext), CoroutineScope {
18
18
 
19
19
  override val coroutineContext: CoroutineContext = Job()
20
20
 
@@ -63,10 +63,10 @@ class ThetaClientReactNativeModule(
63
63
  * add event listener for [eventName]
64
64
  */
65
65
  @ReactMethod
66
- fun addListener(eventName: String) {
66
+ override fun addListener(eventName: String) {
67
67
  // Set up any upstream listeners or background tasks as necessary
68
68
  if (eventName.equals(EVENT_NAME)) {
69
- listenerCount++;
69
+ listenerCount++
70
70
  }
71
71
  }
72
72
 
@@ -74,23 +74,29 @@ class ThetaClientReactNativeModule(
74
74
  * remove event listener [count]
75
75
  */
76
76
  @ReactMethod
77
- fun removeListeners(count: Int) {
77
+ override fun removeListeners(count: Double) {
78
78
  // Remove upstream listeners, stop unnecessary background tasks
79
- listenerCount -= count
79
+ listenerCount = (listenerCount - count.toInt()).coerceAtLeast(0)
80
80
  }
81
81
 
82
- fun sendNotifyEvent(param: WritableMap) {
82
+ fun emitOnThetaFrameOldEvent(param: WritableMap) {
83
83
  reactApplicationContext
84
84
  .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
85
- .emit(EVENT_NOTIFY, param)
85
+ .emit(EVENT_NAME, param)
86
86
  }
87
87
 
88
- /**
89
- * retrieve constant
90
- */
91
- override fun getConstants(): MutableMap<String, Any> =
92
- hashMapOf("DEFAULT_EVENT_NAME" to EVENT_NAME)
88
+ private fun toFrameEventParam(dataUrl: String, dataSize: Int): WritableMap {
89
+ val param = Arguments.createMap()
90
+ param.putString("data", dataUrl)
91
+ param.putInt("dataSize", dataSize)
92
+ return param
93
+ }
93
94
 
95
+ fun sendNotifyEvent(param: WritableMap) {
96
+ reactApplicationContext
97
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
98
+ .emit(EVENT_NOTIFY, param)
99
+ }
94
100
 
95
101
  val apiLogListener = { message: String ->
96
102
  val params = Arguments.createMap()
@@ -101,7 +107,8 @@ class ThetaClientReactNativeModule(
101
107
  }
102
108
 
103
109
  @ReactMethod
104
- fun setApiLogListener(enabled: Boolean, promise: Promise) {
110
+
111
+ override fun setApiLogListener(enabled: Boolean, promise: Promise) {
105
112
  com.ricoh360.thetaclient.setApiLogListener(if (enabled) apiLogListener else null)
106
113
  promise.resolve(null)
107
114
  }
@@ -112,7 +119,8 @@ class ThetaClientReactNativeModule(
112
119
  * @param promise promise to set initialize result
113
120
  */
114
121
  @ReactMethod
115
- fun initialize(endpoint: String, config: ReadableMap?, timeout: ReadableMap?, promise: Promise) {
122
+
123
+ override fun initialize(endpoint: String, config: ReadableMap?, timeout: ReadableMap?, promise: Promise) {
116
124
  launch {
117
125
  try {
118
126
  theta = null
@@ -166,7 +174,8 @@ class ThetaClientReactNativeModule(
166
174
  * @param promise promise to set result
167
175
  */
168
176
  @ReactMethod
169
- fun isInitialized(promise: Promise) {
177
+
178
+ override fun isInitialized(promise: Promise) {
170
179
  promise.resolve(theta != null)
171
180
  }
172
181
 
@@ -175,7 +184,8 @@ class ThetaClientReactNativeModule(
175
184
  * @param promise promise to set result
176
185
  */
177
186
  @ReactMethod
178
- fun getThetaModel(promise: Promise) {
187
+
188
+ override fun getThetaModel(promise: Promise) {
179
189
  val theta = theta
180
190
  if (theta == null) {
181
191
  promise.reject(Exception(messageNotInit))
@@ -189,7 +199,8 @@ class ThetaClientReactNativeModule(
189
199
  * @param promise promise to set result
190
200
  */
191
201
  @ReactMethod
192
- fun getThetaInfo(promise: Promise) {
202
+
203
+ override fun getThetaInfo(promise: Promise) {
193
204
  val theta = theta
194
205
  if (theta == null) {
195
206
  promise.reject(Exception(messageNotInit))
@@ -234,7 +245,8 @@ class ThetaClientReactNativeModule(
234
245
  * @param promise promise to set result
235
246
  */
236
247
  @ReactMethod
237
- fun getThetaLicense(promise: Promise) {
248
+
249
+ override fun getThetaLicense(promise: Promise) {
238
250
  val theta = theta
239
251
  if (theta == null) {
240
252
  promise.reject(Exception(messageNotInit))
@@ -255,7 +267,8 @@ class ThetaClientReactNativeModule(
255
267
  * @param promise promise to set result
256
268
  */
257
269
  @ReactMethod
258
- fun getThetaState(promise: Promise) {
270
+
271
+ override fun getThetaState(promise: Promise) {
259
272
  val theta = theta
260
273
  if (theta == null) {
261
274
  promise.reject(Exception(messageNotInit))
@@ -281,7 +294,7 @@ class ThetaClientReactNativeModule(
281
294
  * @param promise promise to set result
282
295
  */
283
296
  @ReactMethod
284
- fun listFiles(fileType: String, startPosition: Int, entryCount: Int, storage: String?, promise: Promise) {
297
+ override fun listFiles(fileType: String, startPosition: Double, entryCount: Double, storage: String?, promise: Promise) {
285
298
  val theta = theta
286
299
  if (theta == null) {
287
300
  promise.reject(Exception(messageNotInit))
@@ -291,8 +304,8 @@ class ThetaClientReactNativeModule(
291
304
  try {
292
305
  val (fileList, totalEntries) = theta.listFiles(
293
306
  ThetaRepository.FileTypeEnum.valueOf(fileType),
294
- startPosition,
295
- entryCount,
307
+ startPosition.toInt(),
308
+ entryCount.toInt(),
296
309
  storage?.let { ThetaRepository.StorageEnum.valueOf(it) },
297
310
  )
298
311
  val resultList = Arguments.createArray()
@@ -315,7 +328,8 @@ class ThetaClientReactNativeModule(
315
328
  * @param promise promise to set result
316
329
  */
317
330
  @ReactMethod
318
- fun deleteFiles(fileUrls: ReadableArray, promise: Promise) {
331
+
332
+ override fun deleteFiles(fileUrls: ReadableArray, promise: Promise) {
319
333
  val theta = theta
320
334
  if (theta == null) {
321
335
  promise.reject(Exception(messageNotInit))
@@ -342,7 +356,8 @@ class ThetaClientReactNativeModule(
342
356
  * @param promise promise to set result
343
357
  */
344
358
  @ReactMethod
345
- fun deleteAllFiles(promise: Promise) {
359
+
360
+ override fun deleteAllFiles(promise: Promise) {
346
361
  val theta = theta
347
362
  if (theta == null) {
348
363
  promise.reject(Exception(messageNotInit))
@@ -363,7 +378,8 @@ class ThetaClientReactNativeModule(
363
378
  * @param promise promise to set result
364
379
  */
365
380
  @ReactMethod
366
- fun deleteAllImageFiles(promise: Promise) {
381
+
382
+ override fun deleteAllImageFiles(promise: Promise) {
367
383
  val theta = theta
368
384
  if (theta == null) {
369
385
  promise.reject(Exception(messageNotInit))
@@ -384,7 +400,8 @@ class ThetaClientReactNativeModule(
384
400
  * @param promise promise to set result
385
401
  */
386
402
  @ReactMethod
387
- fun deleteAllVideoFiles(promise: Promise) {
403
+
404
+ override fun deleteAllVideoFiles(promise: Promise) {
388
405
  val theta = theta
389
406
  if (theta == null) {
390
407
  promise.reject(Exception(messageNotInit))
@@ -406,7 +423,8 @@ class ThetaClientReactNativeModule(
406
423
  * @param promise promise to set result
407
424
  */
408
425
  @ReactMethod
409
- fun getOptions(optionNames: ReadableArray, promise: Promise) {
426
+
427
+ override fun getOptions(optionNames: ReadableArray, promise: Promise) {
410
428
  val theta = theta
411
429
  if (theta == null) {
412
430
  promise.reject(Exception(messageNotInit))
@@ -430,7 +448,8 @@ class ThetaClientReactNativeModule(
430
448
  * @param rejecter rejecter for setOptions
431
449
  */
432
450
  @ReactMethod
433
- fun setOptions(options: ReadableMap, promise: Promise) {
451
+
452
+ override fun setOptions(options: ReadableMap, promise: Promise) {
434
453
  val theta = theta
435
454
  if (theta == null) {
436
455
  promise.reject(Exception(messageNotInit))
@@ -452,7 +471,8 @@ class ThetaClientReactNativeModule(
452
471
  * @param promise promise to set result
453
472
  */
454
473
  @ReactMethod
455
- fun getLivePreview(promise: Promise) {
474
+
475
+ override fun getLivePreview(promise: Promise) {
456
476
  if (previewing) {
457
477
  promise.reject(Exception(messageLivePreviewRunning))
458
478
  return
@@ -468,16 +488,13 @@ class ThetaClientReactNativeModule(
468
488
  if (listenerCount == 0) {
469
489
  return stopLivePreviewPromise == null
470
490
  }
471
- val param = Arguments.createMap()
472
- param.putString(
473
- "data",
474
- "data:image/jpeg;base64," +
475
- packet.first.copyOfRange(0, packet.second).toBase64()
476
- )
477
- param.putInt("dataSize", packet.second)
478
- reactApplicationContext
479
- .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
480
- .emit(EVENT_NAME, param)
491
+ val dataSize = packet.second
492
+ val dataUrl =
493
+ "data:image/jpeg;base64," + packet.first.copyOfRange(0, dataSize).toBase64()
494
+
495
+ if (!reactApplicationContext.hasActiveReactInstance()) return false
496
+ emitOnThetaFrameOldEvent(toFrameEventParam(dataUrl, dataSize))
497
+
481
498
  return stopLivePreviewPromise == null
482
499
  }
483
500
 
@@ -504,7 +521,8 @@ class ThetaClientReactNativeModule(
504
521
  * @param promise promise to set result
505
522
  */
506
523
  @ReactMethod
507
- fun stopLivePreview(promise: Promise) {
524
+
525
+ override fun stopLivePreview(promise: Promise) {
508
526
  if (theta == null) {
509
527
  promise.reject(Exception(messageNotInit))
510
528
  return
@@ -528,7 +546,8 @@ class ThetaClientReactNativeModule(
528
546
  * @param promise promise to set result
529
547
  */
530
548
  @ReactMethod
531
- fun getPhotoCaptureBuilder(promise: Promise) {
549
+
550
+ override fun getPhotoCaptureBuilder(promise: Promise) {
532
551
  val theta = theta
533
552
  if (theta == null) {
534
553
  promise.reject(Exception(messageNotInit))
@@ -545,7 +564,8 @@ class ThetaClientReactNativeModule(
545
564
  * @param rejecter rejecter for buildPhotoCapture
546
565
  */
547
566
  @ReactMethod
548
- fun buildPhotoCapture(options: ReadableMap, promise: Promise) {
567
+
568
+ override fun buildPhotoCapture(options: ReadableMap, promise: Promise) {
549
569
  if (theta == null) {
550
570
  promise.reject(Exception(messageNotInit))
551
571
  return
@@ -575,7 +595,8 @@ class ThetaClientReactNativeModule(
575
595
  * @param promise promise to set result
576
596
  */
577
597
  @ReactMethod
578
- fun takePicture(promise: Promise) {
598
+
599
+ override fun takePicture(promise: Promise) {
579
600
  if (theta == null) {
580
601
  promise.reject(Exception(messageNotInit))
581
602
  return
@@ -611,7 +632,8 @@ class ThetaClientReactNativeModule(
611
632
  * getTimeShiftCaptureBuilder - get time-shift builder from repository
612
633
  */
613
634
  @ReactMethod
614
- fun getTimeShiftCaptureBuilder(promise: Promise) {
635
+
636
+ override fun getTimeShiftCaptureBuilder(promise: Promise) {
615
637
  val theta = theta
616
638
  if (theta == null) {
617
639
  promise.reject(Exception(messageNotInit))
@@ -627,7 +649,8 @@ class ThetaClientReactNativeModule(
627
649
  * @param promise Promise for buildTimeShiftCapture
628
650
  */
629
651
  @ReactMethod
630
- fun buildTimeShiftCapture(options: ReadableMap, promise: Promise) {
652
+
653
+ override fun buildTimeShiftCapture(options: ReadableMap, promise: Promise) {
631
654
  if (theta == null) {
632
655
  promise.reject(Exception(messageNotInit))
633
656
  return
@@ -657,7 +680,8 @@ class ThetaClientReactNativeModule(
657
680
  * @param promise promise for startTimeShiftCapture
658
681
  */
659
682
  @ReactMethod
660
- fun startTimeShiftCapture(promise: Promise) {
683
+
684
+ override fun startTimeShiftCapture(promise: Promise) {
661
685
  if (theta == null) {
662
686
  promise.reject(Exception(messageNotInit))
663
687
  return
@@ -707,7 +731,8 @@ class ThetaClientReactNativeModule(
707
731
  * @param promise promise for stopTimeShiftCapture
708
732
  */
709
733
  @ReactMethod
710
- fun cancelTimeShiftCapture(promise: Promise) {
734
+
735
+ override fun cancelTimeShiftCapture(promise: Promise) {
711
736
  if (theta == null) {
712
737
  throw Exception(messageNotInit)
713
738
  }
@@ -718,7 +743,8 @@ class ThetaClientReactNativeModule(
718
743
  * getTimeShiftManualCaptureBuilder - get manual time-shift builder from repository
719
744
  */
720
745
  @ReactMethod
721
- fun getTimeShiftManualCaptureBuilder(promise: Promise) {
746
+
747
+ override fun getTimeShiftManualCaptureBuilder(promise: Promise) {
722
748
  val theta = theta
723
749
  if (theta == null) {
724
750
  promise.reject(Exception(messageNotInit))
@@ -734,7 +760,8 @@ class ThetaClientReactNativeModule(
734
760
  * @param promise Promise for buildTimeShiftManualCapture
735
761
  */
736
762
  @ReactMethod
737
- fun buildTimeShiftManualCapture(options: ReadableMap, promise: Promise) {
763
+
764
+ override fun buildTimeShiftManualCapture(options: ReadableMap, promise: Promise) {
738
765
  if (theta == null) {
739
766
  promise.reject(Exception(messageNotInit))
740
767
  return
@@ -766,7 +793,8 @@ class ThetaClientReactNativeModule(
766
793
  * @param promise promise for startTimeShiftManualCapture
767
794
  */
768
795
  @ReactMethod
769
- fun startTimeShiftManualCapture(promise: Promise) {
796
+
797
+ override fun startTimeShiftManualCapture(promise: Promise) {
770
798
  if (theta == null) {
771
799
  promise.reject(Exception(messageNotInit))
772
800
  return
@@ -816,7 +844,8 @@ class ThetaClientReactNativeModule(
816
844
  * @param promise promise for startTimeShiftManualSecondCapture
817
845
  */
818
846
  @ReactMethod
819
- fun startTimeShiftManualSecondCapture(promise: Promise) {
847
+
848
+ override fun startTimeShiftManualSecondCapture(promise: Promise) {
820
849
  if (theta == null) {
821
850
  throw Exception(messageNotInit)
822
851
  }
@@ -828,7 +857,8 @@ class ThetaClientReactNativeModule(
828
857
  * @param promise promise for cancelTimeShiftManualCapture
829
858
  */
830
859
  @ReactMethod
831
- fun cancelTimeShiftManualCapture(promise: Promise) {
860
+
861
+ override fun cancelTimeShiftManualCapture(promise: Promise) {
832
862
  if (theta == null) {
833
863
  throw Exception(messageNotInit)
834
864
  }
@@ -840,7 +870,8 @@ class ThetaClientReactNativeModule(
840
870
  * @param promise promise to set result
841
871
  */
842
872
  @ReactMethod
843
- fun getVideoCaptureBuilder(promise: Promise) {
873
+
874
+ override fun getVideoCaptureBuilder(promise: Promise) {
844
875
  val theta = theta
845
876
  if (theta == null) {
846
877
  promise.reject(Exception(messageNotInit))
@@ -856,7 +887,8 @@ class ThetaClientReactNativeModule(
856
887
  * @param promise promise to set result
857
888
  */
858
889
  @ReactMethod
859
- fun buildVideoCapture(options: ReadableMap, promise: Promise) {
890
+
891
+ override fun buildVideoCapture(options: ReadableMap, promise: Promise) {
860
892
  if (theta == null) {
861
893
  promise.reject(Exception(messageNotInit))
862
894
  return
@@ -886,7 +918,8 @@ class ThetaClientReactNativeModule(
886
918
  * @param promise promise to set result
887
919
  */
888
920
  @ReactMethod
889
- fun startVideoCapture(promise: Promise) {
921
+
922
+ override fun startVideoCapture(promise: Promise) {
890
923
  if (theta == null) {
891
924
  promise.reject(Exception(messageNotInit))
892
925
  return
@@ -937,11 +970,14 @@ class ThetaClientReactNativeModule(
937
970
  * stopCapture - stop capturing video
938
971
  */
939
972
  @ReactMethod
940
- fun stopVideoCapture() {
973
+
974
+ override fun stopVideoCapture(promise: Promise) {
941
975
  if (theta == null) {
942
- throw Exception(messageNotInit)
976
+ promise.reject(Exception(messageNotInit))
977
+ return
943
978
  }
944
979
  videoCapturing?.stopCapture()
980
+ promise.resolve(null)
945
981
  }
946
982
 
947
983
  /**
@@ -949,7 +985,8 @@ class ThetaClientReactNativeModule(
949
985
  * @param promise promise to set result
950
986
  */
951
987
  @ReactMethod
952
- fun getLimitlessIntervalCaptureBuilder(promise: Promise) {
988
+
989
+ override fun getLimitlessIntervalCaptureBuilder(promise: Promise) {
953
990
  val theta = theta
954
991
  if (theta == null) {
955
992
  promise.reject(Exception(messageNotInit))
@@ -965,7 +1002,8 @@ class ThetaClientReactNativeModule(
965
1002
  * @param promise promise to set result
966
1003
  */
967
1004
  @ReactMethod
968
- fun buildLimitlessIntervalCapture(options: ReadableMap, promise: Promise) {
1005
+
1006
+ override fun buildLimitlessIntervalCapture(options: ReadableMap, promise: Promise) {
969
1007
  if (theta == null) {
970
1008
  promise.reject(Exception(messageNotInit))
971
1009
  return
@@ -995,7 +1033,8 @@ class ThetaClientReactNativeModule(
995
1033
  * @param promise promise to set result
996
1034
  */
997
1035
  @ReactMethod
998
- fun startLimitlessIntervalCapture(promise: Promise) {
1036
+
1037
+ override fun startLimitlessIntervalCapture(promise: Promise) {
999
1038
  if (theta == null) {
1000
1039
  promise.reject(Exception(messageNotInit))
1001
1040
  return
@@ -1049,11 +1088,14 @@ class ThetaClientReactNativeModule(
1049
1088
  * stopCapture - stop capturing limitless interval
1050
1089
  */
1051
1090
  @ReactMethod
1052
- fun stopLimitlessIntervalCapture() {
1091
+
1092
+ override fun stopLimitlessIntervalCapture(promise: Promise) {
1053
1093
  if (theta == null) {
1054
- throw Exception(messageNotInit)
1094
+ promise.reject(Exception(messageNotInit))
1095
+ return
1055
1096
  }
1056
1097
  limitlessIntervalCapturing?.stopCapture()
1098
+ promise.resolve(null)
1057
1099
  }
1058
1100
 
1059
1101
  /**
@@ -1062,13 +1104,14 @@ class ThetaClientReactNativeModule(
1062
1104
  * @param promise Promise for getShotCountSpecifiedIntervalCaptureBuilder
1063
1105
  */
1064
1106
  @ReactMethod
1065
- fun getShotCountSpecifiedIntervalCaptureBuilder(shotCount: Int, promise: Promise) {
1107
+
1108
+ override fun getShotCountSpecifiedIntervalCaptureBuilder(shotCount: Double, promise: Promise) {
1066
1109
  val theta = theta
1067
1110
  if (theta == null) {
1068
1111
  promise.reject(Exception(messageNotInit))
1069
1112
  return
1070
1113
  }
1071
- shotCountSpecifiedIntervalCaptureBuilder = theta.getShotCountSpecifiedIntervalCaptureBuilder(shotCount)
1114
+ shotCountSpecifiedIntervalCaptureBuilder = theta.getShotCountSpecifiedIntervalCaptureBuilder(shotCount.toInt())
1072
1115
  promise.resolve(true)
1073
1116
  }
1074
1117
 
@@ -1078,7 +1121,8 @@ class ThetaClientReactNativeModule(
1078
1121
  * @param promise Promise for buildShotCountSpecifiedIntervalCapture
1079
1122
  */
1080
1123
  @ReactMethod
1081
- fun buildShotCountSpecifiedIntervalCapture(options: ReadableMap, promise: Promise) {
1124
+
1125
+ override fun buildShotCountSpecifiedIntervalCapture(options: ReadableMap, promise: Promise) {
1082
1126
  if (theta == null) {
1083
1127
  promise.reject(Exception(messageNotInit))
1084
1128
  return
@@ -1108,7 +1152,8 @@ class ThetaClientReactNativeModule(
1108
1152
  * @param promise promise for startShotCountSpecifiedIntervalCapture
1109
1153
  */
1110
1154
  @ReactMethod
1111
- fun startShotCountSpecifiedIntervalCapture(promise: Promise) {
1155
+
1156
+ override fun startShotCountSpecifiedIntervalCapture(promise: Promise) {
1112
1157
  if (theta == null) {
1113
1158
  promise.reject(Exception(messageNotInit))
1114
1159
  return
@@ -1170,7 +1215,8 @@ class ThetaClientReactNativeModule(
1170
1215
  * @param promise promise for cancelShotCountSpecifiedIntervalCapture
1171
1216
  */
1172
1217
  @ReactMethod
1173
- fun cancelShotCountSpecifiedIntervalCapture(promise: Promise) {
1218
+
1219
+ override fun cancelShotCountSpecifiedIntervalCapture(promise: Promise) {
1174
1220
  if (theta == null) {
1175
1221
  promise.reject(Exception(messageNotInit))
1176
1222
  return
@@ -1185,13 +1231,14 @@ class ThetaClientReactNativeModule(
1185
1231
  * @param promise Promise for getCompositeIntervalCaptureBuilder
1186
1232
  */
1187
1233
  @ReactMethod
1188
- fun getCompositeIntervalCaptureBuilder(shootingTimeSec: Int, promise: Promise) {
1234
+
1235
+ override fun getCompositeIntervalCaptureBuilder(shootingTimeSec: Double, promise: Promise) {
1189
1236
  val theta = theta
1190
1237
  if (theta == null) {
1191
1238
  promise.reject(Exception(messageNotInit))
1192
1239
  return
1193
1240
  }
1194
- compositeIntervalCaptureBuilder = theta.getCompositeIntervalCaptureBuilder(shootingTimeSec)
1241
+ compositeIntervalCaptureBuilder = theta.getCompositeIntervalCaptureBuilder(shootingTimeSec.toInt())
1195
1242
  promise.resolve(true)
1196
1243
  }
1197
1244
 
@@ -1201,7 +1248,8 @@ class ThetaClientReactNativeModule(
1201
1248
  * @param promise Promise for buildCompositeIntervalCapture
1202
1249
  */
1203
1250
  @ReactMethod
1204
- fun buildCompositeIntervalCapture(options: ReadableMap, promise: Promise) {
1251
+
1252
+ override fun buildCompositeIntervalCapture(options: ReadableMap, promise: Promise) {
1205
1253
  if (theta == null) {
1206
1254
  promise.reject(Exception(messageNotInit))
1207
1255
  return
@@ -1231,7 +1279,8 @@ class ThetaClientReactNativeModule(
1231
1279
  * @param promise promise for startCompositeIntervalCapture
1232
1280
  */
1233
1281
  @ReactMethod
1234
- fun startCompositeIntervalCapture(promise: Promise) {
1282
+
1283
+ override fun startCompositeIntervalCapture(promise: Promise) {
1235
1284
  if (theta == null) {
1236
1285
  promise.reject(Exception(messageNotInit))
1237
1286
  return
@@ -1289,7 +1338,8 @@ class ThetaClientReactNativeModule(
1289
1338
  * @param promise promise for cancelCompositeIntervalCapture
1290
1339
  */
1291
1340
  @ReactMethod
1292
- fun cancelCompositeIntervalCapture(promise: Promise) {
1341
+
1342
+ override fun cancelCompositeIntervalCapture(promise: Promise) {
1293
1343
  if (theta == null) {
1294
1344
  promise.reject(Exception(messageNotInit))
1295
1345
  return
@@ -1310,7 +1360,8 @@ class ThetaClientReactNativeModule(
1310
1360
  * @param promise Promise for getBurstCaptureBuilder
1311
1361
  */
1312
1362
  @ReactMethod
1313
- fun getBurstCaptureBuilder(
1363
+
1364
+ override fun getBurstCaptureBuilder(
1314
1365
  burstCaptureNum: String,
1315
1366
  burstBracketStep: String,
1316
1367
  burstCompensation: String,
@@ -1342,7 +1393,8 @@ class ThetaClientReactNativeModule(
1342
1393
  * @param promise Promise for buildBurstCapture
1343
1394
  */
1344
1395
  @ReactMethod
1345
- fun buildBurstCapture(options: ReadableMap, promise: Promise) {
1396
+
1397
+ override fun buildBurstCapture(options: ReadableMap, promise: Promise) {
1346
1398
  if (theta == null) {
1347
1399
  promise.reject(Exception(messageNotInit))
1348
1400
  return
@@ -1372,7 +1424,8 @@ class ThetaClientReactNativeModule(
1372
1424
  * @param promise promise for startBurstCapture
1373
1425
  */
1374
1426
  @ReactMethod
1375
- fun startBurstCapture(promise: Promise) {
1427
+
1428
+ override fun startBurstCapture(promise: Promise) {
1376
1429
  if (theta == null) {
1377
1430
  promise.reject(Exception(messageNotInit))
1378
1431
  return
@@ -1430,7 +1483,8 @@ class ThetaClientReactNativeModule(
1430
1483
  * @param promise promise for cancelBurstCapture
1431
1484
  */
1432
1485
  @ReactMethod
1433
- fun cancelBurstCapture(promise: Promise) {
1486
+
1487
+ override fun cancelBurstCapture(promise: Promise) {
1434
1488
  if (theta == null) {
1435
1489
  promise.reject(Exception(messageNotInit))
1436
1490
  return
@@ -1444,7 +1498,8 @@ class ThetaClientReactNativeModule(
1444
1498
  * @param promise Promise for getMultiBracketCaptureBuilder
1445
1499
  */
1446
1500
  @ReactMethod
1447
- fun getMultiBracketCaptureBuilder(promise: Promise) {
1501
+
1502
+ override fun getMultiBracketCaptureBuilder(promise: Promise) {
1448
1503
  val theta = theta
1449
1504
  if (theta == null) {
1450
1505
  promise.reject(Exception(messageNotInit))
@@ -1460,7 +1515,8 @@ class ThetaClientReactNativeModule(
1460
1515
  * @param promise Promise for buildMultiBracketCapture
1461
1516
  */
1462
1517
  @ReactMethod
1463
- fun buildMultiBracketCapture(options: ReadableMap, promise: Promise) {
1518
+
1519
+ override fun buildMultiBracketCapture(options: ReadableMap, promise: Promise) {
1464
1520
  if (theta == null) {
1465
1521
  promise.reject(Exception(messageNotInit))
1466
1522
  return
@@ -1490,7 +1546,8 @@ class ThetaClientReactNativeModule(
1490
1546
  * @param promise promise for startMultiBracketCapture
1491
1547
  */
1492
1548
  @ReactMethod
1493
- fun startMultiBracketCapture(promise: Promise) {
1549
+
1550
+ override fun startMultiBracketCapture(promise: Promise) {
1494
1551
  if (theta == null) {
1495
1552
  promise.reject(Exception(messageNotInit))
1496
1553
  return
@@ -1548,7 +1605,8 @@ class ThetaClientReactNativeModule(
1548
1605
  * @param promise promise for cancelMultiBracketCapture
1549
1606
  */
1550
1607
  @ReactMethod
1551
- fun cancelMultiBracketCapture(promise: Promise) {
1608
+
1609
+ override fun cancelMultiBracketCapture(promise: Promise) {
1552
1610
  if (theta == null) {
1553
1611
  promise.reject(Exception(messageNotInit))
1554
1612
  return
@@ -1563,7 +1621,8 @@ class ThetaClientReactNativeModule(
1563
1621
  * @param promise Promise for getContinuousCaptureBuilder
1564
1622
  */
1565
1623
  @ReactMethod
1566
- fun getContinuousCaptureBuilder(promise: Promise) {
1624
+
1625
+ override fun getContinuousCaptureBuilder(promise: Promise) {
1567
1626
  val theta = theta
1568
1627
  if (theta == null) {
1569
1628
  promise.reject(Exception(messageNotInit))
@@ -1580,7 +1639,8 @@ class ThetaClientReactNativeModule(
1580
1639
  * @param promise Promise for buildContinuousCapture
1581
1640
  */
1582
1641
  @ReactMethod
1583
- fun buildContinuousCapture(options: ReadableMap, promise: Promise) {
1642
+
1643
+ override fun buildContinuousCapture(options: ReadableMap, promise: Promise) {
1584
1644
  if (theta == null) {
1585
1645
  promise.reject(Exception(messageNotInit))
1586
1646
  return
@@ -1610,7 +1670,8 @@ class ThetaClientReactNativeModule(
1610
1670
  * @param promise promise for startContinuousCapture
1611
1671
  */
1612
1672
  @ReactMethod
1613
- fun startContinuousCapture(promise: Promise) {
1673
+
1674
+ override fun startContinuousCapture(promise: Promise) {
1614
1675
  if (theta == null) {
1615
1676
  promise.reject(Exception(messageNotInit))
1616
1677
  return
@@ -1659,7 +1720,8 @@ class ThetaClientReactNativeModule(
1659
1720
  * @param promise promise to set result
1660
1721
  */
1661
1722
  @ReactMethod
1662
- fun getMetadata(fileUrl: String, promise: Promise) {
1723
+
1724
+ override fun getMetadata(fileUrl: String, promise: Promise) {
1663
1725
  val theta = theta
1664
1726
  if (theta == null) {
1665
1727
  promise.reject(Exception(messageNotInit))
@@ -1698,7 +1760,8 @@ class ThetaClientReactNativeModule(
1698
1760
  * @param promise promise to set result
1699
1761
  */
1700
1762
  @ReactMethod
1701
- fun reboot(promise: Promise) {
1763
+
1764
+ override fun reboot(promise: Promise) {
1702
1765
  val theta = theta
1703
1766
  if (theta == null) {
1704
1767
  promise.reject(Exception(messageNotInit))
@@ -1719,7 +1782,8 @@ class ThetaClientReactNativeModule(
1719
1782
  * @param promise promise to set result
1720
1783
  */
1721
1784
  @ReactMethod
1722
- fun reset(promise: Promise) {
1785
+
1786
+ override fun reset(promise: Promise) {
1723
1787
  val theta = theta
1724
1788
  if (theta == null) {
1725
1789
  promise.reject(Exception(messageNotInit))
@@ -1740,7 +1804,8 @@ class ThetaClientReactNativeModule(
1740
1804
  * @param promise promise to set result
1741
1805
  */
1742
1806
  @ReactMethod
1743
- fun restoreSettings(promise: Promise) {
1807
+
1808
+ override fun restoreSettings(promise: Promise) {
1744
1809
  val theta = theta
1745
1810
  if (theta == null) {
1746
1811
  promise.reject(Exception(messageNotInit))
@@ -1761,7 +1826,8 @@ class ThetaClientReactNativeModule(
1761
1826
  * @param promise promise to set result
1762
1827
  */
1763
1828
  @ReactMethod
1764
- fun stopSelfTimer(promise: Promise) {
1829
+
1830
+ override fun stopSelfTimer(promise: Promise) {
1765
1831
  val theta = theta
1766
1832
  if (theta == null) {
1767
1833
  promise.reject(Exception(messageNotInit))
@@ -1780,14 +1846,15 @@ class ThetaClientReactNativeModule(
1780
1846
  /**
1781
1847
  * convertVideoFormats - convert video format in THETA
1782
1848
  * @param fileUrl file url to convert
1783
- * @param is4k 4k or not
1849
+ * @param toLowResolution true to convert to low resolution, false to keep original
1784
1850
  * @param applyTopBottomCorrection apply top bottom correction
1785
1851
  * @param promise promise to set result
1786
1852
  */
1787
1853
  @ReactMethod
1788
- fun convertVideoFormats(
1854
+
1855
+ override fun convertVideoFormats(
1789
1856
  fileUrl: String,
1790
- is4k: Boolean,
1857
+ toLowResolution: Boolean,
1791
1858
  applyTopBottomCorrection: Boolean,
1792
1859
  promise: Promise,
1793
1860
  ) {
@@ -1799,7 +1866,7 @@ class ThetaClientReactNativeModule(
1799
1866
  launch {
1800
1867
  try {
1801
1868
  val convertedUrl =
1802
- theta.convertVideoFormats(fileUrl, is4k, applyTopBottomCorrection) { completion ->
1869
+ theta.convertVideoFormats(fileUrl, toLowResolution, applyTopBottomCorrection) { completion ->
1803
1870
  sendNotifyEvent(
1804
1871
  toNotify(
1805
1872
  NOTIFY_CONVERT_VIDEO_FORMATS_PROGRESS,
@@ -1820,7 +1887,8 @@ class ThetaClientReactNativeModule(
1820
1887
  * @param promise promise to set result
1821
1888
  */
1822
1889
  @ReactMethod
1823
- fun cancelVideoConvert(promise: Promise) {
1890
+
1891
+ override fun cancelVideoConvert(promise: Promise) {
1824
1892
  val theta = theta
1825
1893
  if (theta == null) {
1826
1894
  promise.reject(Exception(messageNotInit))
@@ -1841,7 +1909,8 @@ class ThetaClientReactNativeModule(
1841
1909
  * @param promise promise to set result
1842
1910
  */
1843
1911
  @ReactMethod
1844
- fun finishWlan(promise: Promise) {
1912
+
1913
+ override fun finishWlan(promise: Promise) {
1845
1914
  val theta = theta
1846
1915
  if (theta == null) {
1847
1916
  promise.reject(Exception(messageNotInit))
@@ -1862,7 +1931,8 @@ class ThetaClientReactNativeModule(
1862
1931
  * @param promise promise to set result
1863
1932
  */
1864
1933
  @ReactMethod
1865
- fun listAccessPoints(promise: Promise) {
1934
+
1935
+ override fun listAccessPoints(promise: Promise) {
1866
1936
  val theta = theta
1867
1937
  if (theta == null) {
1868
1938
  promise.reject(Exception(messageNotInit))
@@ -1884,7 +1954,8 @@ class ThetaClientReactNativeModule(
1884
1954
  * @param promise promise to set result
1885
1955
  */
1886
1956
  @ReactMethod
1887
- fun setAccessPointDynamically(
1957
+
1958
+ override fun setAccessPointDynamically(
1888
1959
  params: ReadableMap,
1889
1960
  promise: Promise
1890
1961
  ) {
@@ -1917,7 +1988,8 @@ class ThetaClientReactNativeModule(
1917
1988
  * @param promise promise to set result
1918
1989
  */
1919
1990
  @ReactMethod
1920
- fun setAccessPointStatically(
1991
+
1992
+ override fun setAccessPointStatically(
1921
1993
  params: ReadableMap,
1922
1994
  promise: Promise
1923
1995
  ) {
@@ -1958,9 +2030,10 @@ class ThetaClientReactNativeModule(
1958
2030
  * @param promise promise to set result
1959
2031
  */
1960
2032
  @ReactMethod
1961
- fun setAccessPointConnectionPriority(
2033
+
2034
+ override fun setAccessPointConnectionPriority(
1962
2035
  ssid: String,
1963
- connectionPriority: Int,
2036
+ connectionPriority: Double,
1964
2037
  ssidStealth: Boolean,
1965
2038
  promise: Promise
1966
2039
  ) {
@@ -1971,7 +2044,7 @@ class ThetaClientReactNativeModule(
1971
2044
  }
1972
2045
  launch {
1973
2046
  try {
1974
- theta.setAccessPointConnectionPriority(ssid, connectionPriority, ssidStealth)
2047
+ theta.setAccessPointConnectionPriority(ssid, connectionPriority.toInt(), ssidStealth)
1975
2048
  promise.resolve(true)
1976
2049
  } catch (t: Throwable) {
1977
2050
  promise.reject(t)
@@ -1985,7 +2058,8 @@ class ThetaClientReactNativeModule(
1985
2058
  * @param promise promise to set result
1986
2059
  */
1987
2060
  @ReactMethod
1988
- fun deleteAccessPoint(ssid: String, promise: Promise) {
2061
+
2062
+ override fun deleteAccessPoint(ssid: String, promise: Promise) {
1989
2063
  val theta = theta
1990
2064
  if (theta == null) {
1991
2065
  promise.reject(Exception(messageNotInit))
@@ -2007,7 +2081,8 @@ class ThetaClientReactNativeModule(
2007
2081
  * @param promise promise to set result
2008
2082
  */
2009
2083
  @ReactMethod
2010
- fun setBluetoothDevice(uuid: String, promise: Promise) {
2084
+
2085
+ override fun setBluetoothDevice(uuid: String, promise: Promise) {
2011
2086
  val theta = theta
2012
2087
  if (theta == null) {
2013
2088
  promise.reject(Exception(messageNotInit))
@@ -2030,7 +2105,8 @@ class ThetaClientReactNativeModule(
2030
2105
  * @param promise promise to set result
2031
2106
  */
2032
2107
  @ReactMethod
2033
- fun getMySetting(captureMode: String, promise: Promise) {
2108
+
2109
+ override fun getMySetting(captureMode: String, promise: Promise) {
2034
2110
  val theta = theta
2035
2111
  if (theta == null) {
2036
2112
  promise.reject(Exception(messageNotInit))
@@ -2053,7 +2129,8 @@ class ThetaClientReactNativeModule(
2053
2129
  * @param promise promise to set result
2054
2130
  */
2055
2131
  @ReactMethod
2056
- fun getMySettingFromOldModel(optionNames: ReadableArray, promise: Promise) {
2132
+
2133
+ override fun getMySettingFromOldModel(optionNames: ReadableArray, promise: Promise) {
2057
2134
  val theta = theta
2058
2135
  if (theta == null) {
2059
2136
  promise.reject(Exception(messageNotInit))
@@ -2082,7 +2159,8 @@ class ThetaClientReactNativeModule(
2082
2159
  * @param Promise of bolean result, always true
2083
2160
  */
2084
2161
  @ReactMethod
2085
- fun setMySetting(captureMode: String, options: ReadableMap, promise: Promise) {
2162
+
2163
+ override fun setMySetting(captureMode: String, options: ReadableMap, promise: Promise) {
2086
2164
  val theta = theta
2087
2165
  if (theta == null) {
2088
2166
  promise.reject(Exception(messageNotInit))
@@ -2105,7 +2183,8 @@ class ThetaClientReactNativeModule(
2105
2183
  * @param promise promise to set result, always true
2106
2184
  */
2107
2185
  @ReactMethod
2108
- fun deleteMySetting(captureMode: String, promise: Promise) {
2186
+
2187
+ override fun deleteMySetting(captureMode: String, promise: Promise) {
2109
2188
  val theta = theta
2110
2189
  if (theta == null) {
2111
2190
  promise.reject(Exception(messageNotInit))
@@ -2126,7 +2205,8 @@ class ThetaClientReactNativeModule(
2126
2205
  * @param promise promise to set result
2127
2206
  */
2128
2207
  @ReactMethod
2129
- fun listPlugins(promise: Promise) {
2208
+
2209
+ override fun listPlugins(promise: Promise) {
2130
2210
  val theta = theta
2131
2211
  if (theta == null) {
2132
2212
  promise.reject(Exception(messageNotInit))
@@ -2162,7 +2242,8 @@ class ThetaClientReactNativeModule(
2162
2242
  * @param promise promise to set result
2163
2243
  */
2164
2244
  @ReactMethod
2165
- fun setPlugin(packageName: String, promise: Promise) {
2245
+
2246
+ override fun setPlugin(packageName: String, promise: Promise) {
2166
2247
  val theta = theta
2167
2248
  if (theta == null) {
2168
2249
  promise.reject(Exception(messageNotInit))
@@ -2184,7 +2265,8 @@ class ThetaClientReactNativeModule(
2184
2265
  * @param promise promise to set result
2185
2266
  */
2186
2267
  @ReactMethod
2187
- fun startPlugin(packageName: String, promise: Promise) {
2268
+
2269
+ override fun startPlugin(packageName: String, promise: Promise) {
2188
2270
  val theta = theta
2189
2271
  if (theta == null) {
2190
2272
  promise.reject(Exception(messageNotInit))
@@ -2205,7 +2287,8 @@ class ThetaClientReactNativeModule(
2205
2287
  * @param promise promise to set result
2206
2288
  */
2207
2289
  @ReactMethod
2208
- fun stopPlugin(promise: Promise) {
2290
+
2291
+ override fun stopPlugin(promise: Promise) {
2209
2292
  val theta = theta
2210
2293
  if (theta == null) {
2211
2294
  promise.reject(Exception(messageNotInit))
@@ -2227,7 +2310,8 @@ class ThetaClientReactNativeModule(
2227
2310
  * @param promise promise to set result
2228
2311
  */
2229
2312
  @ReactMethod
2230
- fun getPluginLicense(packageName: String, promise: Promise) {
2313
+
2314
+ override fun getPluginLicense(packageName: String, promise: Promise) {
2231
2315
  val theta = theta
2232
2316
  if (theta == null) {
2233
2317
  promise.reject(Exception(messageNotInit))
@@ -2248,7 +2332,8 @@ class ThetaClientReactNativeModule(
2248
2332
  * @param promise promise to set result, list of package names of plugins.
2249
2333
  */
2250
2334
  @ReactMethod
2251
- fun getPluginOrders(promise: Promise) {
2335
+
2336
+ override fun getPluginOrders(promise: Promise) {
2252
2337
  val theta = theta
2253
2338
  if (theta == null) {
2254
2339
  promise.reject(Exception(messageNotInit))
@@ -2274,7 +2359,8 @@ class ThetaClientReactNativeModule(
2274
2359
  * @param promise promise to set result
2275
2360
  */
2276
2361
  @ReactMethod
2277
- fun setPluginOrders(plugins: ReadableArray, promise: Promise) {
2362
+
2363
+ override fun setPluginOrders(plugins: ReadableArray, promise: Promise) {
2278
2364
  val theta = theta
2279
2365
  if (theta == null) {
2280
2366
  promise.reject(Exception(messageNotInit))
@@ -2297,7 +2383,8 @@ class ThetaClientReactNativeModule(
2297
2383
  }
2298
2384
 
2299
2385
  @ReactMethod
2300
- fun getEventWebSocket(promise: Promise) {
2386
+
2387
+ override fun getEventWebSocket(promise: Promise) {
2301
2388
  val theta = this.theta
2302
2389
  if (theta == null) {
2303
2390
  promise.reject(Exception(messageNotInit))
@@ -2311,7 +2398,8 @@ class ThetaClientReactNativeModule(
2311
2398
  }
2312
2399
 
2313
2400
  @ReactMethod
2314
- fun eventWebSocketStart(promise: Promise) {
2401
+
2402
+ override fun eventWebSocketStart(promise: Promise) {
2315
2403
  val theta = this.theta
2316
2404
  if (theta == null) {
2317
2405
  promise.reject(Exception(messageNotInit))
@@ -2346,7 +2434,8 @@ class ThetaClientReactNativeModule(
2346
2434
  }
2347
2435
 
2348
2436
  @ReactMethod
2349
- fun eventWebSocketStop(promise: Promise) {
2437
+
2438
+ override fun eventWebSocketStop(promise: Promise) {
2350
2439
  val theta = this.theta
2351
2440
  if (theta == null) {
2352
2441
  promise.reject(Exception(messageNotInit))