开始使用
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/ricoh360`, `@capgo/capacitor-ricoh360-camera-plugin`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/ricoh360-camera/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
安装
标题为“安装”bun add @capgo/ricoh360bunx cap sync导入
标题为“导入”import { Ricoh360Camera } from '@capgo/ricoh360';API 介绍
标题:API 介绍initialize
标题:初始化初始化SDK并使用摄像头URL
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.initialize({} as InitializeOptions);getCameraAsset
标题:获取摄像头资产从URL中检索摄像头资产并以base64返回
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.getCameraAsset({} as GetCameraAssetOptions);listFiles
标题:列出文件列出摄像头存储的文件
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.listFiles();capturePicture
标题:捕获图片捕捉图片
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.capturePicture();captureVideo
标题:捕捉视频捕捉视频
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.captureVideo({} as VideoCaptureOptions);livePreview
标题:实时预览开始实时预览
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.livePreview({} as LivePreviewOptions);stopLivePreview
标题:停止实时预览停止实时预览
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.stopLivePreview();readSettings
标题:读取设置读取相机设置
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.readSettings({} as { options: string[] });setSettings
设置相机设置设置相机设置
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.setSettings({} as { options: Record<string, any> });sendCommand
发送原始命令到相机复制到剪贴板
import { Ricoh360Camera } from '@capgo/ricoh360';
await Ricoh360Camera.sendCommand({} as { endpoint: string; payload: Record<string, any> });设置
初始化选项InitializeOptions
复制到剪贴板export interface InitializeOptions { url: string;}CommandResponse
命令响应export interface CommandResponse { session?: string; info?: string; preview?: string; picture?: string; settings?: string;}GetCameraAssetOptions
获取摄像头资产选项export interface GetCameraAssetOptions { url: string; saveToFile?: boolean;}GetCameraAssetResponse
获取摄像头资产响应export interface GetCameraAssetResponse { statusCode: number; data: string; // base64 encoded data filePath?: string;}ListFilesOptions
列出文件选项export interface ListFilesOptions { fileType?: 'all' | 'image' | 'video'; startPosition?: number; entryCount?: number; maxThumbSize?: number; _detail?: boolean;}ListFilesResponse
列出文件响应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; };}VideoCaptureOptions
视频捕获选项export interface VideoCaptureOptions { // Define any specific options needed for capturing a video resolution?: '4K' | '2K'; frameRate?: number; bitrate?: number;}LivePreviewOptions
LivePreviewOptionsexport interface LivePreviewOptions { displayInFront?: boolean; cropPreview?: boolean;}真实来源
真实来源本页面是由插件生成的。 src/definitions.ts. 当公共 API 上游更改时,请重新运行同步。