Erste Schritte
Kopiere einen Setup-Prompt mit den Installationsschritten und dem vollständigen Markdown-Guide für dieses Plugin.
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.
Installieren
Abschnitt „Installation“Du kannst unser KI-gestütztes Setup nutzen, um das Plugin zu installieren. Füge die Capgo Skills mit dem folgenden Befehl deinem KI-Tool hinzu:
bunx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsNutze dann diesen Prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-ricoh360` plugin in my project.Wenn du ein manuelles Setup bevorzugst, installiere das Plugin mit den folgenden Befehlen und befolge die plattformspezifischen Anweisungen unten:
bun add @capgo/capacitor-ricoh360bunx cap syncImportieren
Abschnitt mit dem Titel „Import“import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';Quickstart
Abschnitt „Quick start“import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.initialize({ url: 'https://example.com' });console.log(result);Beispiel: getCameraAsset
Abschnitt mit dem Titel „Beispiel: getCameraAsset“import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.getCameraAsset({ url: 'https://example.com' });console.log(result);Beispiel: listFiles
Abschnitt mit dem Titel „Beispiel: listFiles“import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.listFiles();console.log(result);Häufige Stolperfallen
Abschnitt „Häufige Fallstricke“- Einmalige Initialisierung: Setup beim App-Bootstrap ausführen.
- Nativer Sync: ausführen
bunx cap syncnach Plugin-Upgrades. - Single Source of Truth: Vertrauen
src/definitions.tsim GitHub Repo.
API Übersicht
Abschnitt „API Übersicht“Jedes Beispiel wiederholt den Import, damit das Snippet allein kopiert werden kann.
initialize
Abschnitt „initialize“Initialisiert SDK mit der Kamera-URL
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.initialize({ url: 'https://example.com' });console.log(result);getCameraAsset
Abschnitt mit dem Titel „getCameraAsset“Ruft ein Kamera-Asset von einer URL ab und gibt es als Base64 zurück
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.getCameraAsset({ url: 'https://example.com' });console.log(result);listFiles
Abschnitt „listFiles“Listet auf der Kamera gespeicherte Dateien auf
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.listFiles();console.log(result);capturePicture
Abschnitt mit dem Titel „capturePicture“Macht ein Foto auf
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.capturePicture();console.log(result);captureVideo
Abschnitt „captureVideo“Nimmt ein Video auf
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.captureVideo({ resolution: '4K', frameRate: 1, bitrate: 1,});console.log(result);livePreview
Abschnitt „livePreview“Startet die Live-Vorschau
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.livePreview({ displayInFront: false, cropPreview: false,});console.log(result);stopLivePreview
Abschnitt „stopLivePreview“Stoppt die Live-Vorschau
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.stopLivePreview();console.log(result);readSettings
Abschnitt „readSettings“Liest Kamera-Einstellungen aus
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.readSettings({ options: ['option'] });console.log(result);setSettings
Abschnitt „setSettings“Kameraeinstellungen festlegen
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.setSettings({ options: {} });console.log(result);sendCommand
Abschnitt „sendCommand“Raw-Befehl an die Kamera senden
import { Ricoh360Camera } from '@capgo/capacitor-ricoh360';
const result = await Ricoh360Camera.sendCommand({ endpoint: 'https://example.com', payload: {},});console.log(result);Typreferenz
Abschnitt mit dem Titel „Typreferenz“InitializeOptions
Abschnitt „InitializeOptions“export interface InitializeOptions { url: string;}CommandResponse
Abschnitt „CommandResponse“export interface CommandResponse { session?: string; info?: string; preview?: string; picture?: string; settings?: string;}GetCameraAssetOptions
Abschnitt „GetCameraAssetOptions“export interface GetCameraAssetOptions { url: string; saveToFile?: boolean;}GetCameraAssetResponse
Abschnitt „GetCameraAssetResponse“export interface GetCameraAssetResponse { statusCode: number; data: string; // base64 encoded data filePath?: string;}ListFilesOptions
Abschnitt „ListFilesOptions“export interface ListFilesOptions { fileType?: 'all' | 'image' | 'video'; startPosition?: number; entryCount?: number; maxThumbSize?: number; _detail?: boolean;}ListFilesResponse
Abschnitt „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
Abschnitt „VideoCaptureOptions“export interface VideoCaptureOptions { // Define any specific options needed for capturing a video resolution?: '4K' | '2K'; frameRate?: number; bitrate?: number;}LivePreviewOptions
Abschnitt „LivePreviewOptions“export interface LivePreviewOptions { displayInFront?: boolean; cropPreview?: boolean;}Source of Truth
Abschnitt mit dem Titel „Source of Truth“Diese Seite wird aus dem Plugin generiert src/definitions.ts. Führe den Sync erneut aus, wenn sich das öffentliche API upstream ändert.
Weiter geht's nach Getting Started
Abschnitt: „Weiter geht’s mit Getting Started“Wenn du es nutzt Erste Schritte , um natives Media- und Interface-Verhalten zu planen, verbinde es mit @capgo/capacitor-live-activities verwenden für die native Funktion in „@capgo/capacitor-live-activities verwenden“, @capgo/capacitor-live-activities für die Implementierungsdetails in @capgo/capacitor-live-activities, Verwendung von @capgo/capacitor-video-player für die native Funktion bei Verwendung von @capgo/capacitor-video-player, @capgo/capacitor-video-player für die Implementierungsdetails in @capgo/capacitor-video-player und Verwendung von @capgo/capacitor-native-navigation für die native Funktion bei Verwendung von @capgo/capacitor-native-navigation.