Passer au contenu

Getting Started

Ce contenu n'est pas encore disponible dans votre langue.

Terminal window
bun add @capgo/ricoh360
bunx cap sync
import { Ricoh360Camera } from '@capgo/ricoh360';

Initializes the SDK with camera URL

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.initialize({} as InitializeOptions);

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

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.getCameraAsset({} as GetCameraAssetOptions);

Lists files stored on the camera

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.listFiles();

Captures a picture

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.capturePicture();

Captures a video

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.captureVideo({} as VideoCaptureOptions);

Starts live preview

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.livePreview({} as LivePreviewOptions);

Stops live preview

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.stopLivePreview();

Reads camera settings

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.readSettings({} as { options: string[] });

Sets camera settings

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.setSettings({} as { options: Record<string, any> });

Send raw command to camera

import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.sendCommand({} as { endpoint: string; payload: Record<string, any> });
export interface InitializeOptions {
url: string;
}
export interface CommandResponse {
session?: string;
info?: string;
preview?: string;
picture?: string;
settings?: string;
}
export interface GetCameraAssetOptions {
url: string;
saveToFile?: boolean;
}
export interface GetCameraAssetResponse {
statusCode: number;
data: string; // base64 encoded data
filePath?: string;
}
export interface ListFilesOptions {
fileType?: 'all' | 'image' | 'video';
startPosition?: number;
entryCount?: number;
maxThumbSize?: number;
_detail?: boolean;
}
export interface ListFilesResponse {
results: {
entries: {
name: string;
fileUrl: string;
size: number;
dateTimeZone: string;
width?: number;
height?: number;
previewUrl?: string;
_projectionType?: string;
isProcessed?: boolean;
_thumbSize?: number;
}[];
totalEntries: number;
};
}
export interface VideoCaptureOptions {
// Define any specific options needed for capturing a video
resolution?: '4K' | '2K';
frameRate?: number;
bitrate?: number;
}
export interface LivePreviewOptions {
displayInFront?: boolean;
cropPreview?: boolean;
}

This page is generated from the plugin’s src/definitions.ts. Re-run the sync when the public API changes upstream.