An open API service indexing awesome lists of open source software.

https://github.com/cap-go/capacitor-ricoh360-camera-plugin

Capacitor Plugin for ricoh camera 360
https://github.com/cap-go/capacitor-ricoh360-camera-plugin

capacitor capacitor-plugin plugin

Last synced: 4 months ago
JSON representation

Capacitor Plugin for ricoh camera 360

Awesome Lists containing this project

README

          

# ricoh360-camera

Capgo - Instant updates for capacitor


➡️ Get Instant updates for your App with Capgo


Missing a feature? We’ll build the plugin for you 💪


Provides an SDK for the Ricoh360 cameras for Capacitor

## Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/ricoh360-camera-plugin/

## Compatibility

| Plugin version | Capacitor compatibility | Maintained |
| -------------- | ----------------------- | ---------- |
| v8.\*.\* | v8.\*.\* | ✅ |
| v7.\*.\* | v7.\*.\* | On demand |
| v6.\*.\* | v6.\*.\* | ❌ |
| v5.\*.\* | v5.\*.\* | ❌ |

> **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.

## Install

```bash
npm install ricoh360-camera
npx cap sync
```

## API

* [`initialize(...)`](#initialize)
* [`getCameraAsset(...)`](#getcameraasset)
* [`listFiles(...)`](#listfiles)
* [`capturePicture()`](#capturepicture)
* [`captureVideo(...)`](#capturevideo)
* [`livePreview(...)`](#livepreview)
* [`stopLivePreview()`](#stoplivepreview)
* [`readSettings(...)`](#readsettings)
* [`setSettings(...)`](#setsettings)
* [`sendCommand(...)`](#sendcommand)
* [`getPluginVersion()`](#getpluginversion)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

### initialize(...)

```typescript
initialize(options: InitializeOptions) => Promise
```

Initializes the SDK with camera URL

| Param | Type |
| ------------- | --------------------------------------------------------------- |
| **`options`** | InitializeOptions |

**Returns:** Promise<CommandResponse>

--------------------

### getCameraAsset(...)

```typescript
getCameraAsset(options: GetCameraAssetOptions) => Promise
```

Retrieves a camera asset from a URL and returns it as base64

| Param | Type | Description |
| ------------- | ----------------------------------------------------------------------- | ------------------------------------------------- |
| **`options`** | GetCameraAssetOptions | Object containing the URL to fetch the asset from |

**Returns:** Promise<GetCameraAssetResponse>

--------------------

### listFiles(...)

```typescript
listFiles(options?: ListFilesOptions | undefined) => Promise
```

Lists files stored on the camera

| Param | Type | Description |
| ------------- | ------------------------------------------------------------- | -------------------------------------------------- |
| **`options`** | ListFilesOptions | Optional parameters to filter and paginate results |

**Returns:** Promise<ListFilesResponse>

--------------------

### capturePicture()

```typescript
capturePicture() => Promise
```

Captures a picture

**Returns:** Promise<CommandResponse>

--------------------

### captureVideo(...)

```typescript
captureVideo(options: VideoCaptureOptions) => Promise
```

Captures a video

| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| **`options`** | VideoCaptureOptions |

**Returns:** Promise<CommandResponse>

--------------------

### livePreview(...)

```typescript
livePreview(options: LivePreviewOptions) => Promise
```

Starts live preview

| Param | Type |
| ------------- | ----------------------------------------------------------------- |
| **`options`** | LivePreviewOptions |

**Returns:** Promise<CommandResponse>

--------------------

### stopLivePreview()

```typescript
stopLivePreview() => Promise
```

Stops live preview

**Returns:** Promise<CommandResponse>

--------------------

### readSettings(...)

```typescript
readSettings(options: { options: string[]; }) => Promise
```

Reads camera settings

| Param | Type | Description |
| ------------- | ----------------------------------- | ----------------------------------------- |
| **`options`** | { options: string[]; } | Array of option names to read from camera |

**Returns:** Promise<CommandResponse>

--------------------

### setSettings(...)

```typescript
setSettings(options: { options: Record; }) => Promise
```

Sets camera settings

| Param | Type | Description |
| ------------- | -------------------------------------------------------------------------- | ---------------------------------------- |
| **`options`** | { options: Record<string, any>; } | Object containing camera settings to set |

**Returns:** Promise<CommandResponse>

--------------------

### sendCommand(...)

```typescript
sendCommand(options: { endpoint: string; payload: Record; }) => Promise
```

Send raw command to camera

| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------- |
| **`options`** | { endpoint: string; payload: Record<string, any>; } |

**Returns:** Promise<CommandResponse>

--------------------

### getPluginVersion()

```typescript
getPluginVersion() => Promise<{ version: string; }>
```

Get the native Capacitor plugin version

**Returns:** Promise<{ version: string; }>

--------------------

### Interfaces

#### CommandResponse

| Prop | Type |
| -------------- | ------------------- |
| **`session`** | string |
| **`info`** | string |
| **`preview`** | string |
| **`picture`** | string |
| **`settings`** | string |

#### InitializeOptions

| Prop | Type |
| --------- | ------------------- |
| **`url`** | string |

#### GetCameraAssetResponse

| Prop | Type |
| ---------------- | ------------------- |
| **`statusCode`** | number |
| **`data`** | string |
| **`filePath`** | string |

#### GetCameraAssetOptions

| Prop | Type |
| ---------------- | -------------------- |
| **`url`** | string |
| **`saveToFile`** | boolean |

#### ListFilesResponse

| Prop | Type |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`results`** | { entries: { name: string; fileUrl: string; size: number; dateTimeZone: string; width?: number; height?: number; previewUrl?: string; _projectionType?: string; isProcessed?: boolean; _thumbSize?: number; }[]; totalEntries: number; } |

#### ListFilesOptions

| Prop | Type |
| ------------------- | ---------------------------------------- |
| **`fileType`** | 'all' \| 'image' \| 'video' |
| **`startPosition`** | number |
| **`entryCount`** | number |
| **`maxThumbSize`** | number |
| **`_detail`** | boolean |

#### VideoCaptureOptions

| Prop | Type |
| ---------------- | ------------------------- |
| **`resolution`** | '4K' \| '2K' |
| **`frameRate`** | number |
| **`bitrate`** | number |

#### LivePreviewOptions

| Prop | Type |
| -------------------- | -------------------- |
| **`displayInFront`** | boolean |
| **`cropPreview`** | boolean |

### Type Aliases

#### Record

Construct a type with a set of properties K of type T

{
[P in K]: T;
}