开始
复制一个包含安装步骤和本插件的完整 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.如果您更喜欢手动设置,请按照以下命令安装插件并遵循以下平台特定的说明:
npm install @capgo/capacitor-ricoh360npx cap syncimport { Ricoh360Camera } from '@capgo/capacitor-ricoh360';API Overview
Section titled “API Overview”每个示例都重复导入,以便可以单独复制代码片段。
initialize
Section titled “初始化”使用摄像头 URL 初始化 SDK
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.initialize({} as InitializeOptions);getCameraAsset
Section titled “获取摄像头资产”从 URL 中检索摄像头资产并以 base64 格式返回
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.getCameraAsset({} as GetCameraAssetOptions);listFiles
Section titled “列出文件”列表显示摄像头存储的文件
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
标题: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
列出文件选项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
名为“VideoCaptureOptions”的部分export interface VideoCaptureOptions { // Define any specific options needed for capturing a video resolution?: '4K' | '2K'; frameRate?: number; bitrate?: number;}LivePreviewOptions
名为“LivePreviewOptions”的部分export interface LivePreviewOptions { displayInFront?: boolean; cropPreview?: boolean;}真实数据来源
名为“真实数据来源”的部分本页面是由插件生成的 src/definitions.ts当公共 API 在上游发生变化时,重新运行同步。
从 Getting Started 继续
名为“从 Getting Started 继续”的部分如果您正在使用 Getting Started 为native媒体和界面行为打算,连接它 使用@Capacitor/capgo/capacitor-live-activities 为使用@Capacitor/capgo/capacitor-live-activities的native能力 @Capacitor/capgo/capacitor-live-activities 为@Capacitor/capgo/capacitor-live-activities的实现细节 使用@Capacitor/capgo/capacitor-video-player 为使用@Capacitor/capgo/capacitor-video-player的native能力 @Capacitor/capgo/capacitor-video-player 为@Capacitor/capgo/capacitor-video-player的实现细节, 使用@Capacitor/capgo/capacitor-native-navigation 为使用@Capacitor/capgo/capacitor-native-navigation的native能力