开始
复制一个包含安装步骤和本插件的完整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 sync导入
标题为“导入”import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';API概述
标题为“API概述”每个示例都重复了导入语句,以便可以单独复制代码片段。
initialize
标题:初始化初始化SDK以摄像头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
标题:列出文件列出摄像头存储的文件
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.listFiles();capturePicture
标题:捕获图片捕获图片
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.capturePicture();captureVideo
标题:捕获视频捕获视频
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.captureVideo({} as VideoCaptureOptions);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
标题:列出文件选项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
标题:直播预览选项export 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-video-player的实现细节,以及 使用@capgo/capacitor-native-navigation 了解@capgo/capacitor-native-navigation的原生能力