__CAPGO_KEEP_2__

Getting Started

GitHub

AI-Assisted セットアップを使用してプラグインをインストールできます。次のコマンドを使用して、AI ツールに Capgo スキルを追加します。

ターミナル画面
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.

Manual セットアップを使用する場合は、次のコマンドを実行して、以下のプラットフォーム固有の指示に従ってください。

ターミナル画面
npm install @capgo/capacitor-ricoh360
npx cap sync
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';

API オーバービュー

API の概要

各例では、スニペットを単独でコピーできるように、import を繰り返します。

Initializes the SDK with camera URL

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.initialize({} as InitializeOptions);

コピーする

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.getCameraAsset({} as GetCameraAssetOptions);

コピーする

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.listFiles();

capturePicture

__CAPGO_KEEP_0__

写真を撮る

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.capturePicture();

動画を撮る

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.captureVideo({} as VideoCaptureOptions);

ライブプレビューを開始

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.livePreview({} as LivePreviewOptions);

ライブプレビューを停止

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.stopLivePreview();

カメラ設定を読み取ります

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.readSettings({} as { options: string[] });

カメラ設定を設定します

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.setSettings({} as { options: Record<string, any> });

カメラにRAWコマンドを送信します

import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
await Ricoh360Camera.sendCommand({} as { endpoint: string; payload: Record<string, any> });
export interface InitializeOptions {
url: string;
}
export interface CommandResponse {
session?: string;
info?: string;
preview?: string;
picture?: string;
settings?: string;
}
export interface GetCameraAssetOptions {
url: string;
saveToFile?: boolean;
}
export interface GetCameraAssetResponse {
statusCode: number;
data: string; // base64 encoded data
filePath?: string;
}
export interface ListFilesOptions {
fileType?: 'all' | 'image' | 'video';
startPosition?: number;
entryCount?: number;
maxThumbSize?: number;
_detail?: boolean;
}
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;
};
}
export interface VideoCaptureOptions {
// Define any specific options needed for capturing a video
resolution?: '4K' | '2K';
frameRate?: number;
bitrate?: number;
}
export interface LivePreviewOptions {
displayInFront?: boolean;
cropPreview?: boolean;
}

このページはプラグインの src/definitions.tsAPIの公開バージョンがアップストリームで変更されたときに、再度Syncを実行してください。

Getting Startedから続けてください

Keep going from Getting Startedのセクション

あなたが Getting Started ネイティブメディアとインターフェイスの動作を計画する場合、 Using @capgo/capacitor-live-activities for the native capability in Using @capgo/capacitor-live-activities, @capgo/capacitor-live-activities for the implementation detail in @capgo/capacitor-live-activities, Using @capgo/capacitor-video-player for the native capability in Using @capgo/capacitor-video-player, @capgo/capacitor-video-player for the implementation detail in @capgo/capacitor-video-player, and Using @capgo/capacitor-native-navigation for the native capability in Using @capgo/capacitor-native-navigation.