スタートガイド
インストール手順と、このプラグインの完全な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アシストによるセットアップでプラグインをインストールできます。以下のコマンドを使用して、お使いのAIツールに Capgo のスキルを追加してください:
bunx 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.手動セットアップを希望する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム別の手順に従ってください:
bun add @capgo/capacitor-ricoh360bunx cap syncインポート
「インポート」セクションimport { Ricoh360Camera } from '@capgo/capacitor-ricoh360';クイックスタート
「クイックスタート」セクションimport { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.initialize({ url: 'https://example.com' });console.log(result);例: getCameraAsset
セクション「Example: getCameraAsset」import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.getCameraAsset({ url: 'https://example.com' });console.log(result);例: listFiles
セクション「Example: listFiles」import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.listFiles();console.log(result);よくある落とし穴
「よくある落とし穴」セクション- 一度だけ初期化: アプリの起動時にセットアップを実行します。
- ネイティブ同期: 実行
bunx cap syncプラグインのアップグレード後。 - 信頼できる情報源: 信頼
src/definitions.tsGitHub リポジトリ内。
API の概要
「API 概要」セクション各例はインポートを繰り返しており、スニペットを単独でコピーできるようにしています。
initialize
「initialize」セクションカメラURLでSDKを初期化します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.initialize({ url: 'https://example.com' });console.log(result);getCameraAsset
「getCameraAsset」セクションURLからカメラアセットを取得し、base64として返します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.getCameraAsset({ url: 'https://example.com' });console.log(result);listFiles
「listFiles」セクションカメラに保存されているファイルをリスト表示します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.listFiles();console.log(result);capturePicture
「capturePicture」セクション写真を撮影します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.capturePicture();console.log(result);captureVideo
セクション「captureVideo」動画を撮影します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.captureVideo({ resolution: '4K', frameRate: 1, bitrate: 1,});console.log(result);livePreview
セクション「livePreview」ライブプレビューを開始します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.livePreview({ displayInFront: false, cropPreview: false,});console.log(result);stopLivePreview
セクション「stopLivePreview」ライブプレビューを停止します
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.stopLivePreview();console.log(result);readSettings
セクション「readSettings」カメラ設定を読み取る
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.readSettings({ options: ['option'] });console.log(result);setSettings
「setSettings」セクションカメラ設定を設定する
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.setSettings({ options: {} });console.log(result);sendCommand
「sendCommand」セクションカメラに生コマンドを送信する
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.sendCommand({ endpoint: 'https://example.com', payload: {},});console.log(result);型リファレンス
「型リファレンス」セクションInitializeOptions
「InitializeOptions」セクションexport interface InitializeOptions { url: string;}CommandResponse
「CommandResponse」セクションexport interface CommandResponse { session?: string; info?: string; preview?: string; picture?: string; settings?: string;}GetCameraAssetOptions
「GetCameraAssetOptions」セクションexport interface GetCameraAssetOptions { url: string; saveToFile?: boolean;}GetCameraAssetResponse
「GetCameraAssetResponse」セクションexport interface GetCameraAssetResponse { statusCode: number; data: string; // base64 encoded data filePath?: string;}ListFilesOptions
「ListFilesOptions」セクションexport interface ListFilesOptions { fileType?: 'all' | 'image' | 'video'; startPosition?: number; entryCount?: number; maxThumbSize?: number; _detail?: boolean;}ListFilesResponse
「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;}Source of Truth
「Source Of Truth」セクションこのページはプラグインの src/definitions.tsから生成されています。upstream で公開 API が変更されたら、再度 sync を実行してください。
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. の使い方におけるネイティブ機能については