theta-client-react-native 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +27 -0
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +94 -0
- package/ios/ConvertUtil.swift +22 -0
- package/ios/ThetaClientReactNative.m +3 -0
- package/ios/ThetaClientReactNative.swift +133 -9
- package/lib/commonjs/capture/burst-capture.js +13 -1
- package/lib/commonjs/capture/burst-capture.js.map +1 -1
- package/lib/commonjs/capture/capture.js +24 -1
- package/lib/commonjs/capture/capture.js.map +1 -1
- package/lib/commonjs/capture/composite-interval-capture.js +13 -1
- package/lib/commonjs/capture/composite-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/continuous-capture.js +12 -1
- package/lib/commonjs/capture/continuous-capture.js.map +1 -1
- package/lib/commonjs/capture/limitless-interval-capture.js +29 -2
- package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/multi-bracket-capture.js +13 -1
- package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -1
- package/lib/commonjs/capture/photo-capture.js +34 -10
- package/lib/commonjs/capture/photo-capture.js.map +1 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js +12 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/time-shift-capture.js +12 -1
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/capture/video-capture.js +29 -2
- package/lib/commonjs/capture/video-capture.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-file-format.js +20 -0
- package/lib/commonjs/theta-repository/options/option-file-format.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +11 -0
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state/capture-status.js +32 -0
- package/lib/commonjs/theta-repository/theta-state/capture-status.js.map +1 -0
- package/lib/commonjs/theta-repository/theta-state/index.js +11 -0
- package/lib/commonjs/theta-repository/theta-state/index.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state/theta-state.js +1 -23
- package/lib/commonjs/theta-repository/theta-state/theta-state.js.map +1 -1
- package/lib/module/capture/burst-capture.js +13 -1
- package/lib/module/capture/burst-capture.js.map +1 -1
- package/lib/module/capture/capture.js +22 -0
- package/lib/module/capture/capture.js.map +1 -1
- package/lib/module/capture/composite-interval-capture.js +13 -1
- package/lib/module/capture/composite-interval-capture.js.map +1 -1
- package/lib/module/capture/continuous-capture.js +12 -1
- package/lib/module/capture/continuous-capture.js.map +1 -1
- package/lib/module/capture/limitless-interval-capture.js +29 -2
- package/lib/module/capture/limitless-interval-capture.js.map +1 -1
- package/lib/module/capture/multi-bracket-capture.js +13 -1
- package/lib/module/capture/multi-bracket-capture.js.map +1 -1
- package/lib/module/capture/photo-capture.js +35 -11
- package/lib/module/capture/photo-capture.js.map +1 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js +12 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +12 -1
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/capture/video-capture.js +29 -2
- package/lib/module/capture/video-capture.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-file-format.js +20 -0
- package/lib/module/theta-repository/options/option-file-format.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +10 -0
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/theta-repository/theta-state/capture-status.js +26 -0
- package/lib/module/theta-repository/theta-state/capture-status.js.map +1 -0
- package/lib/module/theta-repository/theta-state/index.js +1 -0
- package/lib/module/theta-repository/theta-state/index.js.map +1 -1
- package/lib/module/theta-repository/theta-state/theta-state.js +0 -22
- package/lib/module/theta-repository/theta-state/theta-state.js.map +1 -1
- package/lib/typescript/capture/burst-capture.d.ts +4 -2
- package/lib/typescript/capture/burst-capture.d.ts.map +1 -1
- package/lib/typescript/capture/capture.d.ts +18 -1
- package/lib/typescript/capture/capture.d.ts.map +1 -1
- package/lib/typescript/capture/composite-interval-capture.d.ts +4 -2
- package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/continuous-capture.d.ts +3 -2
- package/lib/typescript/capture/continuous-capture.d.ts.map +1 -1
- package/lib/typescript/capture/limitless-interval-capture.d.ts +10 -2
- package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/multi-bracket-capture.d.ts +5 -3
- package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -1
- package/lib/typescript/capture/photo-capture.d.ts +15 -8
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts +3 -2
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts +3 -2
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/capture/video-capture.d.ts +10 -2
- package/lib/typescript/capture/video-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-file-format.d.ts +30 -0
- package/lib/typescript/theta-repository/options/option-file-format.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +7 -0
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state/capture-status.d.ts +26 -0
- package/lib/typescript/theta-repository/theta-state/capture-status.d.ts.map +1 -0
- package/lib/typescript/theta-repository/theta-state/index.d.ts +1 -0
- package/lib/typescript/theta-repository/theta-state/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state/theta-state.d.ts +1 -21
- package/lib/typescript/theta-repository/theta-state/theta-state.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/capture/burst-capture.ts +20 -2
- package/src/capture/capture.ts +27 -0
- package/src/capture/composite-interval-capture.ts +20 -2
- package/src/capture/continuous-capture.ts +19 -2
- package/src/capture/limitless-interval-capture.ts +40 -5
- package/src/capture/multi-bracket-capture.ts +21 -3
- package/src/capture/photo-capture.ts +50 -15
- package/src/capture/shot-count-specified-interval-capture.ts +19 -2
- package/src/capture/time-shift-capture.ts +19 -2
- package/src/capture/video-capture.ts +38 -3
- package/src/theta-repository/options/option-file-format.ts +20 -0
- package/src/theta-repository/theta-repository.ts +10 -0
- package/src/theta-repository/theta-state/capture-status.ts +27 -0
- package/src/theta-repository/theta-state/index.ts +1 -0
- package/src/theta-repository/theta-state/theta-state.ts +1 -24
- package/theta-client-react-native.podspec +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CaptureBuilder } from './capture';
|
|
1
|
+
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
2
|
import type {
|
|
3
3
|
MaxRecordableTimeEnum,
|
|
4
4
|
VideoFileFormatEnum,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
13
13
|
|
|
14
14
|
const NOTIFY_NAME = 'VIDEO-CAPTURE-STOP-ERROR';
|
|
15
|
+
const NOTIFY_CAPTURING = 'VIDEO-CAPTURE-CAPTURING';
|
|
15
16
|
|
|
16
17
|
interface CaptureStopErrorNotify extends BaseNotify {
|
|
17
18
|
params?: {
|
|
@@ -19,6 +20,12 @@ interface CaptureStopErrorNotify extends BaseNotify {
|
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
interface CapturingNotify extends BaseNotify {
|
|
24
|
+
params?: {
|
|
25
|
+
status: CapturingStatusEnum;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
/**
|
|
23
30
|
* VideoCapture class
|
|
24
31
|
*/
|
|
@@ -31,16 +38,25 @@ export class VideoCapture {
|
|
|
31
38
|
/**
|
|
32
39
|
* start video capture
|
|
33
40
|
* @param onStopFailed the block for error of stopCapture
|
|
41
|
+
* @param onCapturing Called when change capture status
|
|
34
42
|
* @return promise of captured file url
|
|
35
43
|
*/
|
|
36
44
|
startCapture(
|
|
37
|
-
onStopFailed?: (error: any) => void
|
|
45
|
+
onStopFailed?: (error: any) => void,
|
|
46
|
+
onCapturing?: (status: CapturingStatusEnum) => void
|
|
38
47
|
): Promise<string | undefined> {
|
|
39
48
|
if (onStopFailed) {
|
|
40
49
|
this.notify.addNotify(NOTIFY_NAME, (event: CaptureStopErrorNotify) => {
|
|
41
50
|
onStopFailed(event.params);
|
|
42
51
|
});
|
|
43
52
|
}
|
|
53
|
+
if (onCapturing) {
|
|
54
|
+
this.notify.addNotify(NOTIFY_CAPTURING, (event: CapturingNotify) => {
|
|
55
|
+
if (event.params?.status) {
|
|
56
|
+
onCapturing(event.params.status);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
44
60
|
return new Promise<string | undefined>(async (resolve, reject) => {
|
|
45
61
|
await ThetaClientReactNative.startVideoCapture()
|
|
46
62
|
.then((result?: string) => {
|
|
@@ -51,6 +67,7 @@ export class VideoCapture {
|
|
|
51
67
|
})
|
|
52
68
|
.finally(() => {
|
|
53
69
|
this.notify.removeNotify(NOTIFY_NAME);
|
|
70
|
+
this.notify.removeNotify(NOTIFY_CAPTURING);
|
|
54
71
|
});
|
|
55
72
|
});
|
|
56
73
|
}
|
|
@@ -67,9 +84,22 @@ export class VideoCapture {
|
|
|
67
84
|
* VideoCaptureBuilder class
|
|
68
85
|
*/
|
|
69
86
|
export class VideoCaptureBuilder extends CaptureBuilder<VideoCaptureBuilder> {
|
|
87
|
+
interval?: number;
|
|
88
|
+
|
|
70
89
|
/** construct VideoCaptureBuilder instance */
|
|
71
90
|
constructor() {
|
|
72
91
|
super();
|
|
92
|
+
this.interval = undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* set interval of checking continuous shooting status command
|
|
97
|
+
* @param timeMillis interval
|
|
98
|
+
* @returns VideoCaptureBuilder
|
|
99
|
+
*/
|
|
100
|
+
setCheckStatusCommandInterval(timeMillis: number): VideoCaptureBuilder {
|
|
101
|
+
this.interval = timeMillis;
|
|
102
|
+
return this;
|
|
73
103
|
}
|
|
74
104
|
|
|
75
105
|
/**
|
|
@@ -99,10 +129,15 @@ export class VideoCaptureBuilder extends CaptureBuilder<VideoCaptureBuilder> {
|
|
|
99
129
|
* @return promise of VideoCapture instance
|
|
100
130
|
*/
|
|
101
131
|
build(): Promise<VideoCapture> {
|
|
132
|
+
let params = {
|
|
133
|
+
...this.options,
|
|
134
|
+
// Cannot pass negative values in IOS, use objects
|
|
135
|
+
_capture_interval: this.interval ?? -1,
|
|
136
|
+
};
|
|
102
137
|
return new Promise<VideoCapture>(async (resolve, reject) => {
|
|
103
138
|
try {
|
|
104
139
|
await ThetaClientReactNative.getVideoCaptureBuilder();
|
|
105
|
-
await ThetaClientReactNative.buildVideoCapture(
|
|
140
|
+
await ThetaClientReactNative.buildVideoCapture(params);
|
|
106
141
|
resolve(new VideoCapture(NotifyController.instance));
|
|
107
142
|
} catch (error) {
|
|
108
143
|
reject(error);
|
|
@@ -38,12 +38,24 @@ export const VideoFileFormatEnum = {
|
|
|
38
38
|
VIDEO_FULL_HD: 'VIDEO_FULL_HD',
|
|
39
39
|
/** mp4 1920 x 960 */
|
|
40
40
|
VIDEO_2K: 'VIDEO_2K',
|
|
41
|
+
/** mp4 1920 x 960 no codec */
|
|
42
|
+
VIDEO_2K_NO_CODEC: 'VIDEO_2K_NO_CODEC',
|
|
41
43
|
/** mp4 3840 x 1920 */
|
|
42
44
|
VIDEO_4K: 'VIDEO_4K',
|
|
45
|
+
/** mp4 3840 x 1920 no codec */
|
|
46
|
+
VIDEO_4K_NO_CODEC: 'VIDEO_4K_NO_CODEC',
|
|
43
47
|
/** mp4 1920 x 960 30fps */
|
|
44
48
|
VIDEO_2K_30F: 'VIDEO_2K_30F',
|
|
45
49
|
/** mp4 1920 x 960 60fps */
|
|
46
50
|
VIDEO_2K_60F: 'VIDEO_2K_60F',
|
|
51
|
+
/** mp4 2752 x 2752 2fps */
|
|
52
|
+
VIDEO_2_7K_2752_2F: 'VIDEO_2_7K_2752_2F',
|
|
53
|
+
/** mp4 2752 x 2752 5fps */
|
|
54
|
+
VIDEO_2_7K_2752_5F: 'VIDEO_2_7K_2752_5F',
|
|
55
|
+
/** mp4 2752 x 2752 10fps */
|
|
56
|
+
VIDEO_2_7K_2752_10F: 'VIDEO_2_7K_2752_10F',
|
|
57
|
+
/** mp4 2752 x 2752 30fps */
|
|
58
|
+
VIDEO_2_7K_2752_30F: 'VIDEO_2_7K_2752_30F',
|
|
47
59
|
/** mp4 2688 x 2688 1fps */
|
|
48
60
|
VIDEO_2_7K_1F: 'VIDEO_2_7K_1F',
|
|
49
61
|
/** mp4 2688 x 2688 2fps */
|
|
@@ -52,6 +64,10 @@ export const VideoFileFormatEnum = {
|
|
|
52
64
|
VIDEO_3_6K_1F: 'VIDEO_3_6K_1F',
|
|
53
65
|
/** mp4 3648 x 3648 2fps */
|
|
54
66
|
VIDEO_3_6K_2F: 'VIDEO_3_6K_2F',
|
|
67
|
+
/** mp4 3840 x 1920 10fps */
|
|
68
|
+
VIDEO_4K_10F: 'VIDEO_4K_10F',
|
|
69
|
+
/** mp4 3840 x 1920 15fps */
|
|
70
|
+
VIDEO_4K_15F: 'VIDEO_4K_15F',
|
|
55
71
|
/** mp4 3840 x 1920 30fps */
|
|
56
72
|
VIDEO_4K_30F: 'VIDEO_4K_30F',
|
|
57
73
|
/** mp4 3840 x 1920 60fps */
|
|
@@ -60,6 +76,10 @@ export const VideoFileFormatEnum = {
|
|
|
60
76
|
VIDEO_5_7K_2F: 'VIDEO_5_7K_2F',
|
|
61
77
|
/** mp4 5760 x 2880 5fps */
|
|
62
78
|
VIDEO_5_7K_5F: 'VIDEO_5_7K_5F',
|
|
79
|
+
/** mp4 5760 x 2880 10fps */
|
|
80
|
+
VIDEO_5_7K_10F: 'VIDEO_5_7K_10F',
|
|
81
|
+
/** mp4 5760 x 2880 15fps */
|
|
82
|
+
VIDEO_5_7K_15F: 'VIDEO_5_7K_15F',
|
|
63
83
|
/** mp4 5760 x 2880 30fps */
|
|
64
84
|
VIDEO_5_7K_30F: 'VIDEO_5_7K_30F',
|
|
65
85
|
/** mp4 7680 x 3840 2fps */
|
|
@@ -311,6 +311,16 @@ export function getThetaInfo(): Promise<ThetaInfo> {
|
|
|
311
311
|
return ThetaClientReactNative.getThetaInfo();
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
/**
|
|
315
|
+
* Acquires open source license information related to the camera.
|
|
316
|
+
*
|
|
317
|
+
* @function getThetaLicense
|
|
318
|
+
* @return Promise of string result, HTML string of the license.
|
|
319
|
+
*/
|
|
320
|
+
export function getThetaLicense(): Promise<string> {
|
|
321
|
+
return ThetaClientReactNative.getThetaLicense();
|
|
322
|
+
}
|
|
323
|
+
|
|
314
324
|
/**
|
|
315
325
|
* Get current state of Theta.
|
|
316
326
|
*
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Capture Status constants */
|
|
2
|
+
export const CaptureStatusEnum = {
|
|
3
|
+
/** Undefined value */
|
|
4
|
+
UNKNOWN: 'UNKNOWN',
|
|
5
|
+
/** Performing continuously shoot */
|
|
6
|
+
SHOOTING: 'SHOOTING',
|
|
7
|
+
/** In standby */
|
|
8
|
+
IDLE: 'IDLE',
|
|
9
|
+
/** Self-timer is operating */
|
|
10
|
+
SELF_TIMER_COUNTDOWN: 'SELF_TIMER_COUNTDOWN',
|
|
11
|
+
/** Performing multi bracket shooting */
|
|
12
|
+
BRACKET_SHOOTING: 'BRACKET_SHOOTING',
|
|
13
|
+
/** Converting post file... */
|
|
14
|
+
CONVERTING: 'CONVERTING',
|
|
15
|
+
/** Performing timeShift shooting */
|
|
16
|
+
TIME_SHIFT_SHOOTING: 'TIME_SHIFT_SHOOTING',
|
|
17
|
+
/** Performing continuous shooting */
|
|
18
|
+
CONTINUOUS_SHOOTING: 'CONTINUOUS_SHOOTING',
|
|
19
|
+
/** Waiting for retrospective video... */
|
|
20
|
+
RETROSPECTIVE_IMAGE_RECORDING: 'RETROSPECTIVE_IMAGE_RECORDING',
|
|
21
|
+
/** Performing burst shooting */
|
|
22
|
+
BURST_SHOOTING: 'BURST_SHOOTING',
|
|
23
|
+
} as const;
|
|
24
|
+
|
|
25
|
+
/** type definition of CaptureStatusEnum */
|
|
26
|
+
export type CaptureStatusEnum =
|
|
27
|
+
(typeof CaptureStatusEnum)[keyof typeof CaptureStatusEnum];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ShootingFunctionEnum } from '../options/option-function';
|
|
2
2
|
import type { CameraErrorEnum } from './camera-error';
|
|
3
|
+
import type { CaptureStatusEnum } from './capture-status';
|
|
3
4
|
import type { StateGpsInfo } from './state-gps-info';
|
|
4
5
|
|
|
5
6
|
/** Battery charging state constants */
|
|
@@ -16,30 +17,6 @@ export const ChargingStateEnum = {
|
|
|
16
17
|
export type ChargingStateEnum =
|
|
17
18
|
(typeof ChargingStateEnum)[keyof typeof ChargingStateEnum];
|
|
18
19
|
|
|
19
|
-
/** Capture Status constants */
|
|
20
|
-
export const CaptureStatusEnum = {
|
|
21
|
-
/** Performing continuously shoot */
|
|
22
|
-
SHOOTING: 'SHOOTING',
|
|
23
|
-
/** In standby */
|
|
24
|
-
IDLE: 'IDLE',
|
|
25
|
-
/** Self-timer is operating */
|
|
26
|
-
SELF_TIMER_COUNTDOWN: 'SELF_TIMER_COUNTDOWN',
|
|
27
|
-
/** Performing multi bracket shooting */
|
|
28
|
-
BRACKET_SHOOTING: 'BRACKET_SHOOTING',
|
|
29
|
-
/** Converting post file... */
|
|
30
|
-
CONVERTING: 'CONVERTING',
|
|
31
|
-
/** Performing timeShift shooting */
|
|
32
|
-
TIME_SHIFT_SHOOTING: 'TIME_SHIFT_SHOOTING',
|
|
33
|
-
/** Performing continuous shooting */
|
|
34
|
-
CONTINUOUS_SHOOTING: 'CONTINUOUS_SHOOTING',
|
|
35
|
-
/** Waiting for retrospective video... */
|
|
36
|
-
RETROSPECTIVE_IMAGE_RECORDING: 'RETROSPECTIVE_IMAGE_RECORDING',
|
|
37
|
-
} as const;
|
|
38
|
-
|
|
39
|
-
/** type definition of CaptureStatusEnum */
|
|
40
|
-
export type CaptureStatusEnum =
|
|
41
|
-
(typeof CaptureStatusEnum)[keyof typeof CaptureStatusEnum];
|
|
42
|
-
|
|
43
20
|
/** Microphone option constants */
|
|
44
21
|
export const MicrophoneOptionEnum = {
|
|
45
22
|
/** auto */
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "THETAClient", "1.
|
|
20
|
+
s.dependency "THETAClient", "1.10.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
|