@capgo/capacitor-ricoh360 8.0.12
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/CapgoCapacitorRicoh360.podspec +18 -0
- package/LICENSE +373 -0
- package/Package.swift +30 -0
- package/README.md +314 -0
- package/android/build.gradle +59 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/ee/forgr/capacitor/ricoh/camera/Ricoh360CameraPlugin.java +453 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +496 -0
- package/dist/esm/definitions.d.ts +146 -0
- package/dist/esm/definitions.js +5 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +17 -0
- package/dist/esm/web.js +37 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +51 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +54 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/Ricoh360CameraPlugin/Ricoh360CameraPlugin.swift +580 -0
- package/ios/Tests/Ricoh360CameraPluginTests/Ricoh360CameraPluginTests.swift +15 -0
- package/package.json +94 -0
package/README.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# @capgo/capacitor-ricoh360
|
|
2
|
+
|
|
3
|
+
<a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-ricoh360-camera-plugin" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
6
|
+
<h2><a href="https://capgo.app/?ref=plugin_ricoh360_camera_plugin"> ➡️ Get Instant updates for your App with Capgo</a></h2>
|
|
7
|
+
<h2><a href="https://capgo.app/consulting/?ref=plugin_ricoh360_camera_plugin"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
Provides an SDK for the Ricoh360 cameras for Capacitor
|
|
11
|
+
|
|
12
|
+
## Documentation
|
|
13
|
+
|
|
14
|
+
The most complete doc is available here: https://capgo.app/docs/plugins/ricoh360-camera-plugin/
|
|
15
|
+
|
|
16
|
+
## Compatibility
|
|
17
|
+
|
|
18
|
+
| Plugin version | Capacitor compatibility | Maintained |
|
|
19
|
+
| -------------- | ----------------------- | ---------- |
|
|
20
|
+
| v8.\*.\* | v8.\*.\* | ✅ |
|
|
21
|
+
| v7.\*.\* | v7.\*.\* | On demand |
|
|
22
|
+
| v6.\*.\* | v6.\*.\* | ❌ |
|
|
23
|
+
| v5.\*.\* | v5.\*.\* | ❌ |
|
|
24
|
+
|
|
25
|
+
> **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @capgo/capacitor-ricoh360
|
|
31
|
+
npx cap sync
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## API
|
|
35
|
+
|
|
36
|
+
<docgen-index>
|
|
37
|
+
|
|
38
|
+
* [`initialize(...)`](#initialize)
|
|
39
|
+
* [`getCameraAsset(...)`](#getcameraasset)
|
|
40
|
+
* [`listFiles(...)`](#listfiles)
|
|
41
|
+
* [`capturePicture()`](#capturepicture)
|
|
42
|
+
* [`captureVideo(...)`](#capturevideo)
|
|
43
|
+
* [`livePreview(...)`](#livepreview)
|
|
44
|
+
* [`stopLivePreview()`](#stoplivepreview)
|
|
45
|
+
* [`readSettings(...)`](#readsettings)
|
|
46
|
+
* [`setSettings(...)`](#setsettings)
|
|
47
|
+
* [`sendCommand(...)`](#sendcommand)
|
|
48
|
+
* [`getPluginVersion()`](#getpluginversion)
|
|
49
|
+
* [Interfaces](#interfaces)
|
|
50
|
+
* [Type Aliases](#type-aliases)
|
|
51
|
+
|
|
52
|
+
</docgen-index>
|
|
53
|
+
|
|
54
|
+
<docgen-api>
|
|
55
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
56
|
+
|
|
57
|
+
### initialize(...)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
initialize(options: InitializeOptions) => Promise<CommandResponse>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Initializes the SDK with camera URL
|
|
64
|
+
|
|
65
|
+
| Param | Type |
|
|
66
|
+
| ------------- | --------------------------------------------------------------- |
|
|
67
|
+
| **`options`** | <code><a href="#initializeoptions">InitializeOptions</a></code> |
|
|
68
|
+
|
|
69
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
70
|
+
|
|
71
|
+
--------------------
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### getCameraAsset(...)
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
getCameraAsset(options: GetCameraAssetOptions) => Promise<GetCameraAssetResponse>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Retrieves a camera asset from a URL and returns it as base64
|
|
81
|
+
|
|
82
|
+
| Param | Type | Description |
|
|
83
|
+
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------- |
|
|
84
|
+
| **`options`** | <code><a href="#getcameraassetoptions">GetCameraAssetOptions</a></code> | Object containing the URL to fetch the asset from |
|
|
85
|
+
|
|
86
|
+
**Returns:** <code>Promise<<a href="#getcameraassetresponse">GetCameraAssetResponse</a>></code>
|
|
87
|
+
|
|
88
|
+
--------------------
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### listFiles(...)
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
listFiles(options?: ListFilesOptions | undefined) => Promise<ListFilesResponse>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Lists files stored on the camera
|
|
98
|
+
|
|
99
|
+
| Param | Type | Description |
|
|
100
|
+
| ------------- | ------------------------------------------------------------- | -------------------------------------------------- |
|
|
101
|
+
| **`options`** | <code><a href="#listfilesoptions">ListFilesOptions</a></code> | Optional parameters to filter and paginate results |
|
|
102
|
+
|
|
103
|
+
**Returns:** <code>Promise<<a href="#listfilesresponse">ListFilesResponse</a>></code>
|
|
104
|
+
|
|
105
|
+
--------------------
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### capturePicture()
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
capturePicture() => Promise<CommandResponse>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Captures a picture
|
|
115
|
+
|
|
116
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
117
|
+
|
|
118
|
+
--------------------
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### captureVideo(...)
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
captureVideo(options: VideoCaptureOptions) => Promise<CommandResponse>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Captures a video
|
|
128
|
+
|
|
129
|
+
| Param | Type |
|
|
130
|
+
| ------------- | ------------------------------------------------------------------- |
|
|
131
|
+
| **`options`** | <code><a href="#videocaptureoptions">VideoCaptureOptions</a></code> |
|
|
132
|
+
|
|
133
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
134
|
+
|
|
135
|
+
--------------------
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### livePreview(...)
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
livePreview(options: LivePreviewOptions) => Promise<CommandResponse>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Starts live preview
|
|
145
|
+
|
|
146
|
+
| Param | Type |
|
|
147
|
+
| ------------- | ----------------------------------------------------------------- |
|
|
148
|
+
| **`options`** | <code><a href="#livepreviewoptions">LivePreviewOptions</a></code> |
|
|
149
|
+
|
|
150
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
151
|
+
|
|
152
|
+
--------------------
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### stopLivePreview()
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
stopLivePreview() => Promise<CommandResponse>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Stops live preview
|
|
162
|
+
|
|
163
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
164
|
+
|
|
165
|
+
--------------------
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### readSettings(...)
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
readSettings(options: { options: string[]; }) => Promise<CommandResponse>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Reads camera settings
|
|
175
|
+
|
|
176
|
+
| Param | Type | Description |
|
|
177
|
+
| ------------- | ----------------------------------- | ----------------------------------------- |
|
|
178
|
+
| **`options`** | <code>{ options: string[]; }</code> | Array of option names to read from camera |
|
|
179
|
+
|
|
180
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
181
|
+
|
|
182
|
+
--------------------
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### setSettings(...)
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
setSettings(options: { options: Record<string, any>; }) => Promise<CommandResponse>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Sets camera settings
|
|
192
|
+
|
|
193
|
+
| Param | Type | Description |
|
|
194
|
+
| ------------- | -------------------------------------------------------------------------- | ---------------------------------------- |
|
|
195
|
+
| **`options`** | <code>{ options: <a href="#record">Record</a><string, any>; }</code> | Object containing camera settings to set |
|
|
196
|
+
|
|
197
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
198
|
+
|
|
199
|
+
--------------------
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### sendCommand(...)
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
sendCommand(options: { endpoint: string; payload: Record<string, any>; }) => Promise<CommandResponse>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Send raw command to camera
|
|
209
|
+
|
|
210
|
+
| Param | Type |
|
|
211
|
+
| ------------- | -------------------------------------------------------------------------------------------- |
|
|
212
|
+
| **`options`** | <code>{ endpoint: string; payload: <a href="#record">Record</a><string, any>; }</code> |
|
|
213
|
+
|
|
214
|
+
**Returns:** <code>Promise<<a href="#commandresponse">CommandResponse</a>></code>
|
|
215
|
+
|
|
216
|
+
--------------------
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### getPluginVersion()
|
|
220
|
+
|
|
221
|
+
```typescript
|
|
222
|
+
getPluginVersion() => Promise<{ version: string; }>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Get the native Capacitor plugin version
|
|
226
|
+
|
|
227
|
+
**Returns:** <code>Promise<{ version: string; }></code>
|
|
228
|
+
|
|
229
|
+
--------------------
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### Interfaces
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
#### CommandResponse
|
|
236
|
+
|
|
237
|
+
| Prop | Type |
|
|
238
|
+
| -------------- | ------------------- |
|
|
239
|
+
| **`session`** | <code>string</code> |
|
|
240
|
+
| **`info`** | <code>string</code> |
|
|
241
|
+
| **`preview`** | <code>string</code> |
|
|
242
|
+
| **`picture`** | <code>string</code> |
|
|
243
|
+
| **`settings`** | <code>string</code> |
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
#### InitializeOptions
|
|
247
|
+
|
|
248
|
+
| Prop | Type |
|
|
249
|
+
| --------- | ------------------- |
|
|
250
|
+
| **`url`** | <code>string</code> |
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
#### GetCameraAssetResponse
|
|
254
|
+
|
|
255
|
+
| Prop | Type |
|
|
256
|
+
| ---------------- | ------------------- |
|
|
257
|
+
| **`statusCode`** | <code>number</code> |
|
|
258
|
+
| **`data`** | <code>string</code> |
|
|
259
|
+
| **`filePath`** | <code>string</code> |
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
#### GetCameraAssetOptions
|
|
263
|
+
|
|
264
|
+
| Prop | Type |
|
|
265
|
+
| ---------------- | -------------------- |
|
|
266
|
+
| **`url`** | <code>string</code> |
|
|
267
|
+
| **`saveToFile`** | <code>boolean</code> |
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
#### ListFilesResponse
|
|
271
|
+
|
|
272
|
+
| Prop | Type |
|
|
273
|
+
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
274
|
+
| **`results`** | <code>{ entries: { name: string; fileUrl: string; size: number; dateTimeZone: string; width?: number; height?: number; previewUrl?: string; _projectionType?: string; isProcessed?: boolean; _thumbSize?: number; }[]; totalEntries: number; }</code> |
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
#### ListFilesOptions
|
|
278
|
+
|
|
279
|
+
| Prop | Type |
|
|
280
|
+
| ------------------- | ---------------------------------------- |
|
|
281
|
+
| **`fileType`** | <code>'all' \| 'image' \| 'video'</code> |
|
|
282
|
+
| **`startPosition`** | <code>number</code> |
|
|
283
|
+
| **`entryCount`** | <code>number</code> |
|
|
284
|
+
| **`maxThumbSize`** | <code>number</code> |
|
|
285
|
+
| **`_detail`** | <code>boolean</code> |
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
#### VideoCaptureOptions
|
|
289
|
+
|
|
290
|
+
| Prop | Type |
|
|
291
|
+
| ---------------- | ------------------------- |
|
|
292
|
+
| **`resolution`** | <code>'4K' \| '2K'</code> |
|
|
293
|
+
| **`frameRate`** | <code>number</code> |
|
|
294
|
+
| **`bitrate`** | <code>number</code> |
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
#### LivePreviewOptions
|
|
298
|
+
|
|
299
|
+
| Prop | Type |
|
|
300
|
+
| -------------------- | -------------------- |
|
|
301
|
+
| **`displayInFront`** | <code>boolean</code> |
|
|
302
|
+
| **`cropPreview`** | <code>boolean</code> |
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
### Type Aliases
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
#### Record
|
|
309
|
+
|
|
310
|
+
Construct a type with a set of properties K of type T
|
|
311
|
+
|
|
312
|
+
<code>{
|
|
313
|
[P in K]: T;
|
|
1
314
|
}</code>
|
|
315
|
+
|
|
316
|
+
</docgen-api>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
repositories {
|
|
10
|
+
google()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
}
|
|
13
|
+
dependencies {
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.13.0'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
apply plugin: 'com.android.library'
|
|
19
|
+
|
|
20
|
+
android {
|
|
21
|
+
namespace = "java.ee.forgr.capacitor.ricoh.camera"
|
|
22
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
|
|
23
|
+
defaultConfig {
|
|
24
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
|
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
26
|
+
versionCode 1
|
|
27
|
+
versionName "1.0"
|
|
28
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
29
|
+
}
|
|
30
|
+
buildTypes {
|
|
31
|
+
release {
|
|
32
|
+
minifyEnabled false
|
|
33
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
lintOptions {
|
|
37
|
+
abortOnError = false
|
|
38
|
+
}
|
|
39
|
+
compileOptions {
|
|
40
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
41
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
repositories {
|
|
46
|
+
google()
|
|
47
|
+
mavenCentral()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
dependencies {
|
|
52
|
+
def work_version = "2.9.1"
|
|
53
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
54
|
+
implementation project(':capacitor-android')
|
|
55
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
56
|
+
testImplementation "junit:junit:$junitVersion"
|
|
57
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
58
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
59
|
+
}
|