Saltar al contenido

Empezar

Ventana de terminal
bun add @capgo/ricoh360
bunx cap sync
import { Ricoh360Camera } from '@capgo/ricoh360';

Inicia la SDK con la URL de la cámara

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

Obtiene un recurso de cámara desde una URL y lo devuelve como base64

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

Lista archivos almacenados en la cámara

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

Captura una imagen

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

Captura un video

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

Inicia visor en vivo

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

Detiene visor en vivo

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

Lee configuración de la cámara

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

Establece configuración de la cámara

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

Envía comando bruto a la cámara

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;
}

Esta página se genera desde el plugin’s src/definitions.tsRe-ejecutar la sincronización cuando el público API cambia en la fuente