ガイド
カメラプレビューのチュートリアル
@capgo/camera-preview を使用する
カメラプレビュー プラグインの主なインターフェイス
Install
bun add @capgo/camera-preview
bunx cap sync
What This Plugin Exposes
start- Starts the camera preview.stop- Stops the camera preview.capture- Captures a picture from the camera.captureSample- Captures a single frame from the camera preview stream.
Example Usage
start
Starts the camera preview.
import { CameraPreview } from '@capgo/camera-preview';
await CameraPreview.start({} as CameraPreviewOptions);
stop
Stops the camera preview.
import { CameraPreview } from '@capgo/camera-preview';
await CameraPreview.stop();
capture
Captures a picture from the camera.
import { CameraPreview } from '@capgo/camera-preview';
await CameraPreview.capture({} as CameraPreviewPictureOptions);
captureSample
Captures a single frame from the camera preview stream.
import { CameraPreview } from '@capgo/camera-preview';
await CameraPreview.captureSample({} as CameraSampleOptions);
Full Reference
- GitHub: github.com/Cap-go/capacitor-camera-preview/
- ドキュメント: /docs/plugins/camera-preview/
Using @capgo/camera-preview
Capacitorを使用している場合 Using @capgo/camera-preview ネイティブメディアとインターフェイスの動作を計画する場合、@__CAPGO_KEEP_0__/camera-previewと接続してください。 @capgo/camera-preview for the implementation detail in @capgo/camera-preview, Getting Started Getting Started Using @capgo/capacitor-live-activities native機能の使用に@capgo/capacitor-live-activitiesを使用します。 @capgo/capacitor-live-activities 実装詳細の@capgo/capacitor-live-activitiesの使用 Using @capgo/capacitor-video-player native機能の使用に@capgo/capacitor-video-playerを使用します。