theta-client-react-native 1.3.0 → 1.4.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 +84 -0
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +55 -19
- package/ios/ConvertUtil.swift +989 -0
- package/ios/ThetaClientReactNative-Bridging-Header.h +3 -0
- package/ios/ThetaClientReactNative.m +201 -0
- package/ios/ThetaClientReactNative.swift +1337 -0
- package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +15 -57
- package/lib/commonjs/capture/photo-capture.js +19 -1
- package/lib/commonjs/capture/photo-capture.js.map +1 -1
- package/lib/commonjs/capture/time-shift-capture.js +27 -23
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/capture/video-capture.js +33 -5
- package/lib/commonjs/capture/video-capture.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/notify-controller.js +40 -0
- package/lib/commonjs/theta-repository/notify-controller.js.map +1 -0
- package/lib/commonjs/theta-repository/options/index.js +44 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-face-detect.js +22 -0
- package/lib/commonjs/theta-repository/options/option-face-detect.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-function.js +27 -0
- package/lib/commonjs/theta-repository/options/option-function.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-gain.js +26 -0
- package/lib/commonjs/theta-repository/options/option-gain.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-image-stitching.js +38 -0
- package/lib/commonjs/theta-repository/options/option-image-stitching.js.map +1 -0
- package/lib/commonjs/theta-repository/options/options.js +8 -0
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-files.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +2 -3
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state.js +1 -13
- package/lib/commonjs/theta-repository/theta-state.js.map +1 -1
- package/lib/module/capture/photo-capture.js +19 -1
- package/lib/module/capture/photo-capture.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +27 -23
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/capture/video-capture.js +33 -5
- package/lib/module/capture/video-capture.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/theta-repository/notify-controller.js +33 -0
- package/lib/module/theta-repository/notify-controller.js.map +1 -0
- package/lib/module/theta-repository/options/index.js +4 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-face-detect.js +15 -0
- package/lib/module/theta-repository/options/option-face-detect.js.map +1 -0
- package/lib/module/theta-repository/options/option-function.js +20 -0
- package/lib/module/theta-repository/options/option-function.js.map +1 -0
- package/lib/module/theta-repository/options/option-gain.js +19 -0
- package/lib/module/theta-repository/options/option-gain.js.map +1 -0
- package/lib/module/theta-repository/options/option-image-stitching.js +31 -0
- package/lib/module/theta-repository/options/option-image-stitching.js.map +1 -0
- package/lib/module/theta-repository/options/options.js +8 -0
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-files.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +2 -3
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/theta-repository/theta-state.js +0 -12
- package/lib/module/theta-repository/theta-state.js.map +1 -1
- package/lib/typescript/capture/photo-capture.d.ts +7 -1
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts +4 -7
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/capture/video-capture.d.ts +5 -1
- package/lib/typescript/capture/video-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/notify-controller.d.ts +17 -0
- package/lib/typescript/theta-repository/notify-controller.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/index.d.ts +4 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-face-detect.d.ts +15 -0
- package/lib/typescript/theta-repository/options/option-face-detect.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-function.d.ts +20 -0
- package/lib/typescript/theta-repository/options/option-function.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-gain.d.ts +19 -0
- package/lib/typescript/theta-repository/options/option-gain.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-image-stitching.d.ts +30 -0
- package/lib/typescript/theta-repository/options/option-image-stitching.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/options.d.ts +20 -0
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-files.d.ts +2 -0
- package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state.d.ts +1 -11
- package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -1
- package/package.json +14 -8
- package/src/capture/photo-capture.ts +20 -3
- package/src/capture/time-shift-capture.ts +40 -33
- package/src/capture/video-capture.ts +49 -6
- package/src/theta-repository/notify-controller.ts +50 -0
- package/src/theta-repository/options/index.ts +4 -0
- package/src/theta-repository/options/option-face-detect.ts +16 -0
- package/src/theta-repository/options/option-function.ts +21 -0
- package/src/theta-repository/options/option-gain.ts +19 -0
- package/src/theta-repository/options/option-image-stitching.ts +32 -0
- package/src/theta-repository/options/options.ts +20 -0
- package/src/theta-repository/theta-files.ts +2 -0
- package/src/theta-repository/theta-repository.ts +3 -3
- package/src/theta-repository/theta-state.ts +2 -14
- package/theta-client-react-native.podspec +2 -2
- package/ios/ThetaClientReactNative.h +0 -34
- package/ios/ThetaClientReactNative.mm +0 -4084
- package/lib/commonjs/capture/notify.js +0 -12
- package/lib/commonjs/capture/notify.js.map +0 -1
- package/lib/module/capture/notify.js +0 -6
- package/lib/module/capture/notify.js.map +0 -1
- package/lib/typescript/capture/notify.d.ts +0 -13
- package/lib/typescript/capture/notify.d.ts.map +0 -1
- package/src/capture/notify.ts +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theta-files.d.ts","sourceRoot":"","sources":["../../../src/theta-repository/theta-files.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,MAAM,MAAM,QAAQ,GAAG;IACrB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iBAAiB;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qEAAqE;IACrE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,gEAAgE;IAChE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,iEAAiE;IACjE,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,4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,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,eAAe,EACf,KAAK,EACN,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"theta-repository.d.ts","sourceRoot":"","sources":["../../../src/theta-repository/theta-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,eAAe,EACf,KAAK,EACN,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE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AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAErE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAEnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAEnE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ShootingFunctionEnum } from './options/option-function';
|
|
1
2
|
/** Battery charging state constants */
|
|
2
3
|
export declare const ChargingStateEnum: {
|
|
3
4
|
/** Charging */
|
|
@@ -30,17 +31,6 @@ export declare const CaptureStatusEnum: {
|
|
|
30
31
|
};
|
|
31
32
|
/** type definition of CaptureStatusEnum */
|
|
32
33
|
export type CaptureStatusEnum = (typeof CaptureStatusEnum)[keyof typeof CaptureStatusEnum];
|
|
33
|
-
/** Shooting function status constants */
|
|
34
|
-
export declare const ShootingFunctionEnum: {
|
|
35
|
-
/** normal */
|
|
36
|
-
readonly NORMAL: "NORMAL";
|
|
37
|
-
/** selfTimer */
|
|
38
|
-
readonly SELF_TIMER: "SELF_TIMER";
|
|
39
|
-
/** mySetting */
|
|
40
|
-
readonly MY_SETTING: "MY_SETTING";
|
|
41
|
-
};
|
|
42
|
-
/** type definition of ShootingFunctionEnum */
|
|
43
|
-
export type ShootingFunctionEnum = (typeof ShootingFunctionEnum)[keyof typeof ShootingFunctionEnum];
|
|
44
34
|
/** Microphone option constants */
|
|
45
35
|
export declare const MicrophoneOptionEnum: {
|
|
46
36
|
/** auto */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theta-state.d.ts","sourceRoot":"","sources":["../../../src/theta-repository/theta-state.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,eAAO,MAAM,iBAAiB;IAC5B,eAAe;;IAEf,yBAAyB;;IAEzB,mBAAmB;;CAEX,C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AM,CAAC;IACnB,yDAAyD;IACzD,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,+DAA+D;IAC/D,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,8BAA8B;IAC9B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,+BAA+B;IAC/B,kBAAkB,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,2DAA2D;IAC3D,iBAAiB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC/C,gCAAgC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IAC3C,0DAA0D;IAC1D,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;CACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "theta-client-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "This library provides a way to control RICOH THETA using.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"ios",
|
|
15
15
|
"cpp",
|
|
16
16
|
"*.podspec",
|
|
17
|
-
"!lib/typescript/
|
|
17
|
+
"!lib/typescript/verification-tool",
|
|
18
18
|
"!ios/build",
|
|
19
19
|
"!android/build",
|
|
20
20
|
"!android/gradle",
|
|
@@ -28,11 +28,13 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"test": "jest",
|
|
31
|
-
"
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
32
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
-
"
|
|
33
|
+
"prepack": "bob build",
|
|
34
34
|
"release": "release-it",
|
|
35
|
-
"
|
|
35
|
+
"verification-tool": "yarn --cwd verification-tool",
|
|
36
|
+
"bootstrap": "yarn verification-tool && yarn install && yarn verification-tool pods",
|
|
37
|
+
"clean": "del-cli android/build verification-tool/android/build verification-tool/android/app/build verification-tool/ios/build"
|
|
36
38
|
},
|
|
37
39
|
"keywords": [
|
|
38
40
|
"react-native",
|
|
@@ -51,8 +53,7 @@
|
|
|
51
53
|
"registry": "https://registry.npmjs.org/"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@commitlint/config-conventional": "^17.3.0",
|
|
56
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
56
57
|
"@react-native-community/eslint-config": "^3.0.2",
|
|
57
58
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
58
59
|
"@types/jest": "^29.2.4",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"pod-install": "^0.1.0",
|
|
68
69
|
"prettier": "^2.8.1",
|
|
69
70
|
"react": "18.2.0",
|
|
70
|
-
"react-native": "0.
|
|
71
|
+
"react-native": "0.71.7",
|
|
71
72
|
"react-native-builder-bob": "^0.20.3",
|
|
72
73
|
"release-it": "^15.5.1",
|
|
73
74
|
"typescript": "^4.9.4"
|
|
@@ -79,9 +80,14 @@
|
|
|
79
80
|
"react": "*",
|
|
80
81
|
"react-native": "*"
|
|
81
82
|
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">= 16.0.0"
|
|
85
|
+
},
|
|
86
|
+
"packageManager": "^yarn@1.22.15",
|
|
82
87
|
"jest": {
|
|
83
88
|
"preset": "react-native",
|
|
84
89
|
"modulePathIgnorePatterns": [
|
|
90
|
+
"<rootDir>/verification-tool/node_modules",
|
|
85
91
|
"<rootDir>/lib/"
|
|
86
92
|
]
|
|
87
93
|
},
|
|
@@ -2,6 +2,7 @@ import { CaptureBuilder } from './capture';
|
|
|
2
2
|
import type {
|
|
3
3
|
FilterEnum,
|
|
4
4
|
PhotoFileFormatEnum,
|
|
5
|
+
PresetEnum,
|
|
5
6
|
} from '../theta-repository/options';
|
|
6
7
|
|
|
7
8
|
import { NativeModules } from 'react-native';
|
|
@@ -48,6 +49,16 @@ export class PhotoCaptureBuilder extends CaptureBuilder<PhotoCaptureBuilder> {
|
|
|
48
49
|
return this;
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Set preset mode of Theta SC2 and Theta SC2 for business.
|
|
54
|
+
* @param {FilterEnum} preset Preset mode to set
|
|
55
|
+
* @return PhotoCaptureBuilder
|
|
56
|
+
*/
|
|
57
|
+
setPreset(preset: PresetEnum): PhotoCaptureBuilder {
|
|
58
|
+
this.options.preset = preset;
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
/**
|
|
52
63
|
* Builds an instance of a PhotoCapture that has all the combined
|
|
53
64
|
* parameters of the Options that have been added to the Builder.
|
|
@@ -55,8 +66,14 @@ export class PhotoCaptureBuilder extends CaptureBuilder<PhotoCaptureBuilder> {
|
|
|
55
66
|
* @return promise of PhotoCapture instance
|
|
56
67
|
*/
|
|
57
68
|
build(): Promise<PhotoCapture> {
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
return new Promise<PhotoCapture>(async (resolve, reject) => {
|
|
70
|
+
try {
|
|
71
|
+
await ThetaClientReactNative.getPhotoCaptureBuilder();
|
|
72
|
+
await ThetaClientReactNative.buildPhotoCapture(this.options);
|
|
73
|
+
resolve(new PhotoCapture());
|
|
74
|
+
} catch (error) {
|
|
75
|
+
reject(error);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
61
78
|
}
|
|
62
79
|
}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import type { EmitterSubscription } from 'react-native';
|
|
2
1
|
import { CaptureBuilder } from './capture';
|
|
3
2
|
import { NativeModules } from 'react-native';
|
|
4
|
-
import { BaseNotify, CaptureProgressNotify, addNotifyListener } from './notify';
|
|
5
3
|
import type { TimeShiftIntervalEnum } from '../theta-repository/options';
|
|
4
|
+
import {
|
|
5
|
+
BaseNotify,
|
|
6
|
+
NotifyController,
|
|
7
|
+
} from '../theta-repository/notify-controller';
|
|
6
8
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
7
9
|
|
|
10
|
+
const NOTIFY_NAME = 'TIME-SHIFT-PROGRESS';
|
|
11
|
+
|
|
12
|
+
interface CaptureProgressNotify extends BaseNotify {
|
|
13
|
+
params?: {
|
|
14
|
+
completion: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
/**
|
|
9
19
|
* TimeShiftCapture class
|
|
10
20
|
*/
|
|
11
21
|
export class TimeShiftCapture {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
notify: NotifyController;
|
|
23
|
+
constructor(notify: NotifyController) {
|
|
24
|
+
this.notify = notify;
|
|
25
|
+
}
|
|
15
26
|
/**
|
|
16
27
|
* start time-shift
|
|
17
28
|
* @param onProgress the block for time-shift onProgress
|
|
@@ -19,27 +30,23 @@ export class TimeShiftCapture {
|
|
|
19
30
|
*/
|
|
20
31
|
async startCapture(
|
|
21
32
|
onProgress?: (completion?: number) => void
|
|
22
|
-
): Promise<string> {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
onProgress(event.params?.completion);
|
|
29
|
-
}
|
|
30
|
-
: undefined
|
|
31
|
-
);
|
|
33
|
+
): Promise<string | undefined> {
|
|
34
|
+
if (onProgress) {
|
|
35
|
+
this.notify.addNotify(NOTIFY_NAME, (event: CaptureProgressNotify) => {
|
|
36
|
+
onProgress(event.params?.completion);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
32
39
|
|
|
33
|
-
return new Promise<string>(async (resolve, reject) => {
|
|
40
|
+
return new Promise<string | undefined>(async (resolve, reject) => {
|
|
34
41
|
await ThetaClientReactNative.startTimeShiftCapture()
|
|
35
|
-
.then((result
|
|
36
|
-
resolve(result);
|
|
42
|
+
.then((result?: string) => {
|
|
43
|
+
resolve(result ?? undefined);
|
|
37
44
|
})
|
|
38
45
|
.catch((error: any) => {
|
|
39
46
|
reject(error);
|
|
40
47
|
})
|
|
41
48
|
.finally(() => {
|
|
42
|
-
this.
|
|
49
|
+
this.notify.removeNotify(NOTIFY_NAME);
|
|
43
50
|
});
|
|
44
51
|
});
|
|
45
52
|
}
|
|
@@ -50,16 +57,6 @@ export class TimeShiftCapture {
|
|
|
50
57
|
async cancelCapture(): Promise<any> {
|
|
51
58
|
return await ThetaClientReactNative.cancelTimeShiftCapture();
|
|
52
59
|
}
|
|
53
|
-
|
|
54
|
-
async initNotify() {
|
|
55
|
-
this.eventListener = addNotifyListener((notify: BaseNotify) => {
|
|
56
|
-
this.notifyList.get(notify.name)?.(notify as BaseNotify);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
releaseNotify() {
|
|
61
|
-
this.eventListener?.remove();
|
|
62
|
-
}
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
/**
|
|
@@ -137,9 +134,19 @@ export class TimeShiftCaptureBuilder extends CaptureBuilder<TimeShiftCaptureBuil
|
|
|
137
134
|
* @return promise of TimeShiftCapture instance
|
|
138
135
|
*/
|
|
139
136
|
build(): Promise<TimeShiftCapture> {
|
|
140
|
-
|
|
141
|
-
this.options,
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
let params = {
|
|
138
|
+
...this.options,
|
|
139
|
+
// Cannot pass negative values in IOS, use objects
|
|
140
|
+
_capture_interval: this.interval ?? -1,
|
|
141
|
+
};
|
|
142
|
+
return new Promise<TimeShiftCapture>(async (resolve, reject) => {
|
|
143
|
+
try {
|
|
144
|
+
await ThetaClientReactNative.getTimeShiftCaptureBuilder();
|
|
145
|
+
await ThetaClientReactNative.buildTimeShiftCapture(params);
|
|
146
|
+
resolve(new TimeShiftCapture(NotifyController.instance));
|
|
147
|
+
} catch (error) {
|
|
148
|
+
reject(error);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
144
151
|
}
|
|
145
152
|
}
|
|
@@ -5,24 +5,61 @@ import type {
|
|
|
5
5
|
} from '../theta-repository/options';
|
|
6
6
|
|
|
7
7
|
import { NativeModules } from 'react-native';
|
|
8
|
+
import {
|
|
9
|
+
BaseNotify,
|
|
10
|
+
NotifyController,
|
|
11
|
+
} from '../theta-repository/notify-controller';
|
|
8
12
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
9
13
|
|
|
14
|
+
const NOTIFY_NAME = 'VIDEO-CAPTURE-STOP-ERROR';
|
|
15
|
+
|
|
16
|
+
interface CaptureStopErrorNotify extends BaseNotify {
|
|
17
|
+
params?: {
|
|
18
|
+
message: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
10
22
|
/**
|
|
11
23
|
* VideoCapture class
|
|
12
24
|
*/
|
|
13
25
|
export class VideoCapture {
|
|
26
|
+
notify: NotifyController;
|
|
27
|
+
constructor(notify: NotifyController) {
|
|
28
|
+
this.notify = notify;
|
|
29
|
+
}
|
|
30
|
+
|
|
14
31
|
/**
|
|
15
32
|
* start video capture
|
|
33
|
+
* @param onStopFailed the block for error of stopCapture
|
|
16
34
|
* @return promise of captured file url
|
|
17
35
|
*/
|
|
18
|
-
startCapture(
|
|
19
|
-
|
|
36
|
+
startCapture(
|
|
37
|
+
onStopFailed?: (error: any) => void
|
|
38
|
+
): Promise<string | undefined> {
|
|
39
|
+
if (onStopFailed) {
|
|
40
|
+
this.notify.addNotify(NOTIFY_NAME, (event: CaptureStopErrorNotify) => {
|
|
41
|
+
onStopFailed(event.params);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return new Promise<string | undefined>(async (resolve, reject) => {
|
|
45
|
+
await ThetaClientReactNative.startVideoCapture()
|
|
46
|
+
.then((result?: string) => {
|
|
47
|
+
resolve(result ?? undefined);
|
|
48
|
+
})
|
|
49
|
+
.catch((error: any) => {
|
|
50
|
+
reject(error);
|
|
51
|
+
})
|
|
52
|
+
.finally(() => {
|
|
53
|
+
this.notify.removeNotify(NOTIFY_NAME);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
20
56
|
}
|
|
57
|
+
|
|
21
58
|
/**
|
|
22
59
|
* stop video capture
|
|
23
60
|
*/
|
|
24
61
|
stopCapture() {
|
|
25
|
-
ThetaClientReactNative.
|
|
62
|
+
ThetaClientReactNative.stopVideoCapture();
|
|
26
63
|
}
|
|
27
64
|
}
|
|
28
65
|
|
|
@@ -62,8 +99,14 @@ export class VideoCaptureBuilder extends CaptureBuilder<VideoCaptureBuilder> {
|
|
|
62
99
|
* @return promise of VideoCapture instance
|
|
63
100
|
*/
|
|
64
101
|
build(): Promise<VideoCapture> {
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
102
|
+
return new Promise<VideoCapture>(async (resolve, reject) => {
|
|
103
|
+
try {
|
|
104
|
+
await ThetaClientReactNative.getVideoCaptureBuilder();
|
|
105
|
+
await ThetaClientReactNative.buildVideoCapture(this.options);
|
|
106
|
+
resolve(new VideoCapture(NotifyController.instance));
|
|
107
|
+
} catch (error) {
|
|
108
|
+
reject(error);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
68
111
|
}
|
|
69
112
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NativeEventEmitter,
|
|
3
|
+
type EmitterSubscription,
|
|
4
|
+
NativeModules,
|
|
5
|
+
} from 'react-native';
|
|
6
|
+
|
|
7
|
+
export interface BaseNotify {
|
|
8
|
+
name: string;
|
|
9
|
+
params?: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class NotifyController {
|
|
13
|
+
static _instance = new NotifyController();
|
|
14
|
+
static get instance(): NotifyController {
|
|
15
|
+
return NotifyController._instance;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
eventListener?: EmitterSubscription = undefined;
|
|
19
|
+
notifyList = new Map<string, ((notify: BaseNotify) => void) | undefined>();
|
|
20
|
+
|
|
21
|
+
init() {
|
|
22
|
+
this.release();
|
|
23
|
+
this.eventListener = this.addNotifyListener((notify: BaseNotify) => {
|
|
24
|
+
this.notifyList.get(notify.name)?.(notify as BaseNotify);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
release() {
|
|
29
|
+
this.eventListener?.remove();
|
|
30
|
+
this.eventListener = undefined;
|
|
31
|
+
this.notifyList.clear();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
addNotify(name: string, callback: (notify: BaseNotify) => void) {
|
|
35
|
+
this.notifyList.set(name, callback);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
removeNotify(name: string) {
|
|
39
|
+
this.notifyList.delete(name);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private addNotifyListener(
|
|
43
|
+
callback: (event: BaseNotify) => void
|
|
44
|
+
): EmitterSubscription {
|
|
45
|
+
const eventEmitter = new NativeEventEmitter(
|
|
46
|
+
NativeModules.ThetaClientReactNative
|
|
47
|
+
);
|
|
48
|
+
return eventEmitter.addListener('ThetaNotify', callback);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -7,7 +7,11 @@ export * from './option-camera-control-source';
|
|
|
7
7
|
export * from './option-camera-mode';
|
|
8
8
|
export * from './option-capture-mode';
|
|
9
9
|
export * from './option-continuous-number';
|
|
10
|
+
export * from './option-face-detect';
|
|
10
11
|
export * from './option-filter';
|
|
12
|
+
export * from './option-function';
|
|
13
|
+
export * from './option-gain';
|
|
14
|
+
export * from './option-image-stitching';
|
|
11
15
|
export * from './option-network-type';
|
|
12
16
|
export * from './option-power-saving';
|
|
13
17
|
export * from './option-preset';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Face detection
|
|
3
|
+
*
|
|
4
|
+
* For
|
|
5
|
+
* - RICOH THETA X
|
|
6
|
+
*/
|
|
7
|
+
export const FaceDetectEnum = {
|
|
8
|
+
/** Face detection ON */
|
|
9
|
+
ON: 'ON',
|
|
10
|
+
/** Face detection OFF */
|
|
11
|
+
OFF: 'OFF',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
/** type definition of FaceDetectEnum */
|
|
15
|
+
export type FaceDetectEnum =
|
|
16
|
+
(typeof FaceDetectEnum)[keyof typeof FaceDetectEnum];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shooting function.
|
|
3
|
+
* Shooting settings are retained separately for both the Still image shooting mode and Video shooting mode.
|
|
4
|
+
* Setting them at the same time as exposureDelay will result in an error.
|
|
5
|
+
*
|
|
6
|
+
* For
|
|
7
|
+
* - RICOH THETA X
|
|
8
|
+
* - RICOH THETA Z1
|
|
9
|
+
*/
|
|
10
|
+
export const ShootingFunctionEnum = {
|
|
11
|
+
/** Normal shooting function */
|
|
12
|
+
NORMAL: 'NORMAL',
|
|
13
|
+
/** Self-timer shooting function(RICOH THETA X is not supported.) */
|
|
14
|
+
SELF_TIMER: 'SELF_TIMER',
|
|
15
|
+
/** My setting shooting function */
|
|
16
|
+
MY_SETTING: 'MY_SETTING',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
/** type definition of ShootingFunctionEnum */
|
|
20
|
+
export type ShootingFunctionEnum =
|
|
21
|
+
(typeof ShootingFunctionEnum)[keyof typeof ShootingFunctionEnum];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Microphone gain.
|
|
3
|
+
*
|
|
4
|
+
* For
|
|
5
|
+
* - RICOH THETA X
|
|
6
|
+
* - RICOH THETA Z1
|
|
7
|
+
* - RICOH THETA V
|
|
8
|
+
*/
|
|
9
|
+
export const GainEnum = {
|
|
10
|
+
/** Normal mode */
|
|
11
|
+
NORMAL: 'NORMAL',
|
|
12
|
+
/** Loud volume mode */
|
|
13
|
+
MEGA_VOLUME: 'MEGA_VOLUME',
|
|
14
|
+
/** Mute mode (RICOH THETA V firmware v2.50.1 or later, RICOH THETA X is not supported.) */
|
|
15
|
+
MUTE: 'MUTE',
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
/** type definition of GainEnum */
|
|
19
|
+
export type GainEnum = (typeof GainEnum)[keyof typeof GainEnum];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Still image stitching setting during shooting.
|
|
3
|
+
*
|
|
4
|
+
* For Theta X, Z1 and V.
|
|
5
|
+
**/
|
|
6
|
+
|
|
7
|
+
export const ImageStitchingEnum = {
|
|
8
|
+
/** Refer to stitching when shooting with "auto" */
|
|
9
|
+
AUTO: 'AUTO',
|
|
10
|
+
/** Performs static stitching */
|
|
11
|
+
STATIC: 'STATIC',
|
|
12
|
+
/** Performs dynamic stitching(RICOH THETA X or later) */
|
|
13
|
+
DYNAMIC: 'DYNAMIC',
|
|
14
|
+
/** For Normal shooting, performs dynamic stitching,
|
|
15
|
+
* for Interval shooting, saves dynamic distortion correction parameters for the first image
|
|
16
|
+
* and then uses them for the 2nd and subsequent images(RICOH THETA X is not supported) */
|
|
17
|
+
DYNAMIC_AUTO: 'DYNAMIC_AUTO',
|
|
18
|
+
/** Performs semi-dynamic stitching
|
|
19
|
+
* Saves dynamic distortion correction parameters for the first image
|
|
20
|
+
* and then uses them for the 2nd and subsequent images(RICOH THETA X or later) */
|
|
21
|
+
DYNAMIC_SEMI_AUTO: 'DYNAMIC_SEMI_AUTO',
|
|
22
|
+
/** Performs dynamic stitching and then saves distortion correction parameters */
|
|
23
|
+
DYNAMIC_SAVE: 'DYNAMIC_SAVE',
|
|
24
|
+
/** Performs stitching using the saved distortion correction parameters */
|
|
25
|
+
DYNAMIC_LOAD: 'DYNAMIC_LOAD',
|
|
26
|
+
/** Does not perform stitching */
|
|
27
|
+
NONE: 'NONE',
|
|
28
|
+
} as const;
|
|
29
|
+
|
|
30
|
+
/** Type definition of ImageStitchingEnum */
|
|
31
|
+
export type ImageStitchingEnum =
|
|
32
|
+
(typeof ImageStitchingEnum)[keyof typeof ImageStitchingEnum];
|
|
@@ -6,7 +6,11 @@ import type { CameraControlSourceEnum } from './option-camera-control-source';
|
|
|
6
6
|
import type { CameraModeEnum } from './option-camera-mode';
|
|
7
7
|
import type { CaptureModeEnum } from './option-capture-mode';
|
|
8
8
|
import type { ContinuousNumberEnum } from './option-continuous-number';
|
|
9
|
+
import type { FaceDetectEnum } from './option-face-detect';
|
|
9
10
|
import type { FilterEnum } from './option-filter';
|
|
11
|
+
import type { ShootingFunctionEnum } from './option-function';
|
|
12
|
+
import type { GainEnum } from './option-gain';
|
|
13
|
+
import type { ImageStitchingEnum } from './option-image-stitching';
|
|
10
14
|
import type { NetworkTypeEnum } from './option-network-type';
|
|
11
15
|
import type { PowerSavingEnum } from './option-power-saving';
|
|
12
16
|
import type { PresetEnum } from './option-preset';
|
|
@@ -477,12 +481,20 @@ export const OptionNameEnum = {
|
|
|
477
481
|
ExposureDelay: 'ExposureDelay',
|
|
478
482
|
/** exposureProgram */
|
|
479
483
|
ExposureProgram: 'ExposureProgram',
|
|
484
|
+
/** _faceDetect */
|
|
485
|
+
FaceDetect: 'FaceDetect',
|
|
480
486
|
/** fileFormat */
|
|
481
487
|
FileFormat: 'FileFormat',
|
|
482
488
|
/** filter */
|
|
483
489
|
Filter: 'Filter',
|
|
490
|
+
/** _function */
|
|
491
|
+
Function: 'Function',
|
|
492
|
+
/** _gain */
|
|
493
|
+
Gain: 'Gain',
|
|
484
494
|
/** gpsInfo */
|
|
485
495
|
GpsInfo: 'GpsInfo',
|
|
496
|
+
/** imageStitching */
|
|
497
|
+
ImageStitching: 'ImageStitching',
|
|
486
498
|
/** isGpsOn */
|
|
487
499
|
IsGpsOn: 'IsGpsOn',
|
|
488
500
|
/** iso */
|
|
@@ -630,12 +642,20 @@ export type Options = {
|
|
|
630
642
|
exposureDelay?: ExposureDelayEnum;
|
|
631
643
|
/** Exposure program. The exposure settings that take priority can be selected. */
|
|
632
644
|
exposureProgram?: ExposureProgramEnum;
|
|
645
|
+
/** Face detection */
|
|
646
|
+
faceDetect?: FaceDetectEnum;
|
|
633
647
|
/** Image format used in shooting. */
|
|
634
648
|
fileFormat?: PhotoFileFormatEnum | VideoFileFormatEnum;
|
|
635
649
|
/** Image processing filter. */
|
|
636
650
|
filter?: FilterEnum;
|
|
651
|
+
/** Shooting function. */
|
|
652
|
+
function?: ShootingFunctionEnum;
|
|
653
|
+
/** Microphone gain. */
|
|
654
|
+
gain?: GainEnum;
|
|
637
655
|
/** GPS location information. */
|
|
638
656
|
gpsInfo?: GpsInfo;
|
|
657
|
+
/** Still image stitching setting during shooting. */
|
|
658
|
+
imageStitching?: ImageStitchingEnum;
|
|
639
659
|
/** Turns position information assigning ON/OFF. */
|
|
640
660
|
isGpsOn?: boolean;
|
|
641
661
|
/** ISO sensitivity */
|
|
@@ -6,6 +6,8 @@ export type FileInfo = {
|
|
|
6
6
|
fileUrl: string;
|
|
7
7
|
/** File size in bytes. */
|
|
8
8
|
size: number;
|
|
9
|
+
/** File creation or update time with the time zone in the format "YYYY:MM:DD hh:mm:ss+(-)hh:mm". */
|
|
10
|
+
dateTimeZone: string;
|
|
9
11
|
/** File creation time in the format "YYYY:MM:DD HH:MM:SS". */
|
|
10
12
|
dateTime: string;
|
|
11
13
|
/** Latitude. */
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
} from '../capture';
|
|
20
20
|
import type { ThetaConfig } from './theta-config';
|
|
21
21
|
import type { ThetaTimeout } from './theta-timeout';
|
|
22
|
+
import { NotifyController } from './notify-controller';
|
|
22
23
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -35,6 +36,8 @@ export function initialize(
|
|
|
35
36
|
config?: ThetaConfig,
|
|
36
37
|
timeout?: ThetaTimeout
|
|
37
38
|
): Promise<boolean> {
|
|
39
|
+
NotifyController.instance.init();
|
|
40
|
+
|
|
38
41
|
return ThetaClientReactNative.initialize(endPoint, config, timeout);
|
|
39
42
|
}
|
|
40
43
|
|
|
@@ -66,7 +69,6 @@ export function reset(): Promise<boolean> {
|
|
|
66
69
|
* @return created PhotoCaptureBuilder
|
|
67
70
|
*/
|
|
68
71
|
export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
|
|
69
|
-
ThetaClientReactNative.getPhotoCaptureBuilder();
|
|
70
72
|
return new PhotoCaptureBuilder();
|
|
71
73
|
}
|
|
72
74
|
|
|
@@ -77,7 +79,6 @@ export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
|
|
|
77
79
|
* @return created TimeShiftCaptureBuilder
|
|
78
80
|
*/
|
|
79
81
|
export function getTimeShiftCaptureBuilder(): TimeShiftCaptureBuilder {
|
|
80
|
-
ThetaClientReactNative.getTimeShiftCaptureBuilder();
|
|
81
82
|
return new TimeShiftCaptureBuilder();
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -88,7 +89,6 @@ export function getTimeShiftCaptureBuilder(): TimeShiftCaptureBuilder {
|
|
|
88
89
|
* @return created VideoCaptureBuilder instance
|
|
89
90
|
*/
|
|
90
91
|
export function getVideoCaptureBuilder(): VideoCaptureBuilder {
|
|
91
|
-
ThetaClientReactNative.getVideoCaptureBuilder();
|
|
92
92
|
return new VideoCaptureBuilder();
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ShootingFunctionEnum } from './options/option-function';
|
|
2
|
+
|
|
1
3
|
/** Battery charging state constants */
|
|
2
4
|
export const ChargingStateEnum = {
|
|
3
5
|
/** Charging */
|
|
@@ -36,20 +38,6 @@ export const CaptureStatusEnum = {
|
|
|
36
38
|
export type CaptureStatusEnum =
|
|
37
39
|
(typeof CaptureStatusEnum)[keyof typeof CaptureStatusEnum];
|
|
38
40
|
|
|
39
|
-
/** Shooting function status constants */
|
|
40
|
-
export const ShootingFunctionEnum = {
|
|
41
|
-
/** normal */
|
|
42
|
-
NORMAL: 'NORMAL',
|
|
43
|
-
/** selfTimer */
|
|
44
|
-
SELF_TIMER: 'SELF_TIMER',
|
|
45
|
-
/** mySetting */
|
|
46
|
-
MY_SETTING: 'MY_SETTING',
|
|
47
|
-
} as const;
|
|
48
|
-
|
|
49
|
-
/** type definition of ShootingFunctionEnum */
|
|
50
|
-
export type ShootingFunctionEnum =
|
|
51
|
-
(typeof ShootingFunctionEnum)[keyof typeof ShootingFunctionEnum];
|
|
52
|
-
|
|
53
41
|
/** Microphone option constants */
|
|
54
42
|
export const MicrophoneOptionEnum = {
|
|
55
43
|
/** auto */
|