Getting Started
复制一个包含安装步骤和完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-ricoh360`
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.
您可以使用我们的 AI 助手设置来安装插件。使用以下命令将 Capgo 技能添加到您的 AI 工具中:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins然后使用以下提示:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-ricoh360` plugin in my project.如果您prefer Manual Setup,安装插件并运行以下命令并遵循以下平台特定的说明:
npm install @capgo/capacitor-ricoh360npx cap sync导入
导入import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';初始化
initialize
初始化__CAPGO_KEEP_0__Initializes the SDK with camera URL
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.initialize({} as InitializeOptions);getCameraAsset
获取摄像头资产从 URL 中检索摄像头资产并以 base64 返回
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.getCameraAsset({} as GetCameraAssetOptions);listFiles
标题:“listFiles”列出存储在摄像头中的文件
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.listFiles();capturePicture
标题:“capturePicture”捕获图片
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.capturePicture();captureVideo
标题:“captureVideo”捕获视频
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.captureVideo({} as VideoCaptureOptions);livePreview
标题:“livePreview”开始实时预览
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.livePreview({} as LivePreviewOptions);stopLivePreview
标题:停止实时预览停止实时预览
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.stopLivePreview();readSettings
标题:读取设置读取相机设置
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.readSettings({} as { options: string[] });setSettings
标题:设置设置设置相机设置
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.setSettings({} as { options: Record<string, any> });sendCommand
标题:发送命令发送原始命令到相机
import { Ricoh360Camera } from '@capgo/capacitor-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
ListFilesOptionsexport interface ListFilesOptions { fileType?: 'all' | 'image' | 'video'; startPosition?: number; entryCount?: number; maxThumbSize?: number; _detail?: boolean;}ListFilesResponse
ListFilesResponseexport 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
VideoCaptureOptionsexport 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在上游发生变化时,请重新同步
继续从 Getting Started
标题:继续从 Getting Started如果您正在使用 Getting Started 来规划原生媒体和界面行为,连接它与 使用 @capgo/capacitor-live-activities 为原生能力在使用 @capgo/capacitor-live-activities 中 @capgo/capacitor-live-activities 为在 @capgo/capacitor-live-activities 中的实现细节 使用 @capgo/capacitor-video-player 为原生能力在使用 @capgo/capacitor-video-player 中 @capgo/capacitor-video-player 对于 @capgo/capacitor-视频播放器 的实现细节,以及 使用 @capgo/capacitor-原生导航 对于在使用 @capgo/capacitor-原生导航 中的原生能力