theta-client-react-native 1.1.0 → 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/android/build.gradle +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +375 -0
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +391 -17
- package/ios/ThetaClientReactNative.h +6 -0
- package/ios/ThetaClientReactNative.mm +1125 -132
- package/lib/commonjs/capture/index.js +11 -0
- package/lib/commonjs/capture/index.js.map +1 -1
- package/lib/commonjs/capture/notify.js +12 -0
- package/lib/commonjs/capture/notify.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/theta-repository/access-point.js.map +1 -1
- 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 +37 -4
- package/lib/commonjs/theta-repository/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/index.js +110 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- 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-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 +30 -2
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- 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 +13 -1
- package/lib/commonjs/theta-repository/theta-files.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +39 -8
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- 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/index.js +1 -0
- package/lib/module/capture/index.js.map +1 -1
- package/lib/module/capture/notify.js +6 -0
- package/lib/module/capture/notify.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/theta-repository/access-point.js.map +1 -1
- 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 +4 -1
- package/lib/module/theta-repository/index.js.map +1 -1
- package/lib/module/theta-repository/options/index.js +10 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- 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-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 +30 -2
- package/lib/module/theta-repository/options/options.js.map +1 -1
- 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 +12 -0
- package/lib/module/theta-repository/theta-files.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +38 -9
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- 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/index.d.ts +1 -0
- package/lib/typescript/capture/index.d.ts.map +1 -1
- package/lib/typescript/capture/notify.d.ts +13 -0
- package/lib/typescript/capture/notify.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/theta-repository/access-point.d.ts +4 -1
- package/lib/typescript/theta-repository/access-point.d.ts.map +1 -1
- 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 +4 -1
- package/lib/typescript/theta-repository/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/index.d.ts +10 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- 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 +1 -1
- package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts.map +1 -1
- 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 +73 -6
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- 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 +14 -1
- package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +28 -7
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- 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/index.ts +1 -0
- package/src/capture/notify.ts +27 -0
- package/src/capture/time-shift-capture.ts +99 -0
- package/src/theta-repository/access-point.ts +5 -1
- package/src/theta-repository/digest-auth.ts +16 -0
- package/src/theta-repository/index.ts +4 -1
- package/src/theta-repository/options/index.ts +11 -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 +1 -1
- package/src/theta-repository/options/option-wlan-frequency.ts +16 -0
- package/src/theta-repository/options/options.ts +74 -6
- package/src/theta-repository/theta-config.ts +20 -0
- package/src/theta-repository/theta-files.ts +16 -1
- package/src/theta-repository/theta-repository.ts +68 -17
- package/src/theta-repository/theta-timeout.ts +21 -0
- package/theta-client-react-native.podspec +1 -1
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { AccessPoint, AuthModeEnum } from './access-point';
|
|
2
|
-
import type { FileTypeEnum, ThetaFiles } from './theta-files';
|
|
2
|
+
import type { FileTypeEnum, StorageEnum, ThetaFiles } from './theta-files';
|
|
3
3
|
import type { ThetaState } from './theta-state';
|
|
4
4
|
import type { ThetaInfo } from './theta-info';
|
|
5
5
|
import type { MetaInfo } from './theta-meta';
|
|
6
6
|
import type { PluginInfo } from './theta-plugin';
|
|
7
7
|
|
|
8
8
|
import { NativeModules } from 'react-native';
|
|
9
|
-
import type {
|
|
10
|
-
|
|
9
|
+
import type {
|
|
10
|
+
OptionNameEnum,
|
|
11
|
+
Options,
|
|
12
|
+
CaptureModeEnum,
|
|
13
|
+
Proxy,
|
|
14
|
+
} from './options';
|
|
15
|
+
import {
|
|
16
|
+
PhotoCaptureBuilder,
|
|
17
|
+
VideoCaptureBuilder,
|
|
18
|
+
TimeShiftCaptureBuilder,
|
|
19
|
+
} from '../capture';
|
|
20
|
+
import type { ThetaConfig } from './theta-config';
|
|
21
|
+
import type { ThetaTimeout } from './theta-timeout';
|
|
11
22
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
12
23
|
|
|
13
24
|
/**
|
|
@@ -15,13 +26,26 @@ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
|
15
26
|
*
|
|
16
27
|
* @function initialize
|
|
17
28
|
* @param {string} endPoint optional endpoint of camera
|
|
29
|
+
* @param {ThetaConfig} config Configuration of initialize. If null, get from THETA.
|
|
30
|
+
* @param {ThetaTimeout} timeout Timeout of HTTP call.
|
|
18
31
|
* @return promise of boolean result
|
|
19
32
|
**/
|
|
20
|
-
export function initialize(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
export function initialize(
|
|
34
|
+
endPoint: string = 'http://192.168.1.1',
|
|
35
|
+
config?: ThetaConfig,
|
|
36
|
+
timeout?: ThetaTimeout
|
|
37
|
+
): Promise<boolean> {
|
|
38
|
+
return ThetaClientReactNative.initialize(endPoint, config, timeout);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns whether it is initialized or not.
|
|
43
|
+
*
|
|
44
|
+
* @function isInitialized
|
|
45
|
+
* @return promise of boolean result
|
|
46
|
+
**/
|
|
47
|
+
export function isInitialized(): Promise<boolean> {
|
|
48
|
+
return ThetaClientReactNative.isInitialized();
|
|
25
49
|
}
|
|
26
50
|
|
|
27
51
|
/**
|
|
@@ -46,6 +70,17 @@ export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
|
|
|
46
70
|
return new PhotoCaptureBuilder();
|
|
47
71
|
}
|
|
48
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Get TimeShiftCaptureBuilder for time-shift.
|
|
75
|
+
*
|
|
76
|
+
* @function getTimeShiftCaptureBuilder
|
|
77
|
+
* @return created TimeShiftCaptureBuilder
|
|
78
|
+
*/
|
|
79
|
+
export function getTimeShiftCaptureBuilder(): TimeShiftCaptureBuilder {
|
|
80
|
+
ThetaClientReactNative.getTimeShiftCaptureBuilder();
|
|
81
|
+
return new TimeShiftCaptureBuilder();
|
|
82
|
+
}
|
|
83
|
+
|
|
49
84
|
/**
|
|
50
85
|
* Get PhotoCapture.Builder for capture video.
|
|
51
86
|
*
|
|
@@ -186,18 +221,21 @@ export function getThetaState(): Promise<ThetaState> {
|
|
|
186
221
|
* @param {number} entryCount Desired number of entries to return. If
|
|
187
222
|
* entryCount is more than the number of remaining files, just
|
|
188
223
|
* return entries of actual remaining files.
|
|
224
|
+
* @param {StorageEnum} storage Desired storage. If omitted, return current storage. (RICOH THETA X Version 2.00.0 or later)
|
|
189
225
|
* @return promise with a list of file information and number of totalEntries.
|
|
190
226
|
* see [camera.listFiles](https://github.com/ricohapi/theta-api-specs/blob/main/theta-web-api-v2.1/commands/camera.list_files.md).
|
|
191
227
|
*/
|
|
192
228
|
export function listFiles(
|
|
193
229
|
fileTypeEnum: FileTypeEnum,
|
|
194
230
|
startPosition: number = 0,
|
|
195
|
-
entryCount: number
|
|
231
|
+
entryCount: number,
|
|
232
|
+
storage?: StorageEnum
|
|
196
233
|
): Promise<ThetaFiles> {
|
|
197
234
|
return ThetaClientReactNative.listFiles(
|
|
198
235
|
fileTypeEnum,
|
|
199
236
|
startPosition,
|
|
200
|
-
entryCount
|
|
237
|
+
entryCount,
|
|
238
|
+
storage
|
|
201
239
|
);
|
|
202
240
|
}
|
|
203
241
|
|
|
@@ -295,6 +333,7 @@ export function listAccessPoints(): Promise<AccessPoint[]> {
|
|
|
295
333
|
* @param {AuthModeEnum} authMode Authentication mode.
|
|
296
334
|
* @param {string} password Password. If authMode is "NONE", pass empty String.
|
|
297
335
|
* @param {number} connectionPriority Connection priority 1 to 5.
|
|
336
|
+
* @param {Proxy} proxy Proxy information to be used for the access point.
|
|
298
337
|
* @return promise of boolean result
|
|
299
338
|
*/
|
|
300
339
|
export function setAccessPointDynamically(
|
|
@@ -302,14 +341,16 @@ export function setAccessPointDynamically(
|
|
|
302
341
|
ssidStealth: boolean = false,
|
|
303
342
|
authMode: AuthModeEnum = AuthModeEnum.NONE,
|
|
304
343
|
password: string = '',
|
|
305
|
-
connectionPriority: number = 1
|
|
344
|
+
connectionPriority: number = 1,
|
|
345
|
+
proxy?: Proxy
|
|
306
346
|
): Promise<boolean> {
|
|
307
347
|
return ThetaClientReactNative.setAccessPointDynamically(
|
|
308
348
|
ssid,
|
|
309
349
|
ssidStealth,
|
|
310
350
|
authMode,
|
|
311
351
|
password,
|
|
312
|
-
connectionPriority
|
|
352
|
+
connectionPriority,
|
|
353
|
+
proxy
|
|
313
354
|
);
|
|
314
355
|
}
|
|
315
356
|
|
|
@@ -325,6 +366,7 @@ export function setAccessPointDynamically(
|
|
|
325
366
|
* @param {string} ipAddress IP address assigns to Theta.
|
|
326
367
|
* @param {string} subnetMask Subnet mask.
|
|
327
368
|
* @param {string} defaultGateway Default gateway.
|
|
369
|
+
* @param {Proxy} proxy Proxy information to be used for the access point.
|
|
328
370
|
* @return promise of boolean result
|
|
329
371
|
*/
|
|
330
372
|
export function setAccessPointStatically(
|
|
@@ -335,7 +377,8 @@ export function setAccessPointStatically(
|
|
|
335
377
|
connectionPriority: number = 1,
|
|
336
378
|
ipAddress: string,
|
|
337
379
|
subnetMask: string,
|
|
338
|
-
defaultGateway: string
|
|
380
|
+
defaultGateway: string,
|
|
381
|
+
proxy?: Proxy
|
|
339
382
|
): Promise<boolean> {
|
|
340
383
|
return ThetaClientReactNative.setAccessPointStatically(
|
|
341
384
|
ssid,
|
|
@@ -345,7 +388,8 @@ export function setAccessPointStatically(
|
|
|
345
388
|
connectionPriority,
|
|
346
389
|
ipAddress,
|
|
347
390
|
subnetMask,
|
|
348
|
-
defaultGateway
|
|
391
|
+
defaultGateway,
|
|
392
|
+
proxy
|
|
349
393
|
);
|
|
350
394
|
}
|
|
351
395
|
|
|
@@ -380,7 +424,9 @@ export function getMySetting(captureMode: CaptureModeEnum): Promise<Options> {
|
|
|
380
424
|
* @param optionNames List of option names to acquire
|
|
381
425
|
* @returns Options of my setting
|
|
382
426
|
*/
|
|
383
|
-
export function getMySettingFromOldModel(
|
|
427
|
+
export function getMySettingFromOldModel(
|
|
428
|
+
optionNames: OptionNameEnum[]
|
|
429
|
+
): Promise<Options> {
|
|
384
430
|
return ThetaClientReactNative.getMySettingFromOldModel(optionNames);
|
|
385
431
|
}
|
|
386
432
|
|
|
@@ -391,7 +437,10 @@ export function getMySettingFromOldModel(optionNames: OptionNameEnum[]): Promise
|
|
|
391
437
|
* @param options registered to My Settings
|
|
392
438
|
* @returns Promise of boolean result, always true
|
|
393
439
|
*/
|
|
394
|
-
export function setMySetting(
|
|
440
|
+
export function setMySetting(
|
|
441
|
+
captureMode: CaptureModeEnum,
|
|
442
|
+
options: Options
|
|
443
|
+
): Promise<boolean> {
|
|
395
444
|
return ThetaClientReactNative.setMySetting(captureMode, options);
|
|
396
445
|
}
|
|
397
446
|
|
|
@@ -400,7 +449,9 @@ export function setMySetting(captureMode: CaptureModeEnum, options: Options): Pr
|
|
|
400
449
|
* @param captureMode The target shooting mode
|
|
401
450
|
* @returns Promise of boolean result, always true
|
|
402
451
|
*/
|
|
403
|
-
export function deleteMySetting(
|
|
452
|
+
export function deleteMySetting(
|
|
453
|
+
captureMode: CaptureModeEnum
|
|
454
|
+
): Promise<boolean> {
|
|
404
455
|
return ThetaClientReactNative.deleteMySetting(captureMode);
|
|
405
456
|
}
|
|
406
457
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timeout of HTTP call.
|
|
3
|
+
*/
|
|
4
|
+
export type ThetaTimeout = {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies a time period (in milliseconds) in
|
|
7
|
+
* which a client should establish a connection with a server.
|
|
8
|
+
*/
|
|
9
|
+
connectTimeout: number;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies a time period (in milliseconds) required to process an HTTP call:
|
|
12
|
+
* from sending a request to receiving first response bytes.
|
|
13
|
+
* To disable this timeout, set its value to 0.
|
|
14
|
+
*/
|
|
15
|
+
requestTimeout: number;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies a maximum time (in milliseconds) of inactivity between two data packets
|
|
18
|
+
* when exchanging data with a server.
|
|
19
|
+
*/
|
|
20
|
+
socketTimeout: number;
|
|
21
|
+
};
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "THETAClient", "1.
|
|
20
|
+
s.dependency "THETAClient", "1.2.0"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
23
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|