Verwendung von @capgo/capacitor-video-thumbnails
Capacitor-Video-Thumbnails-Plugin-Interface zur Erstellung von Videobildern.
Installieren
bun add @capgo/capacitor-video-thumbnails
bunx cap sync
bunx cap sync kopiert die native code-Implementierung des Plugins in Ihre native Projekte. Führen Sie es erneut aus, nachdem Sie das Plugin aktualisiert haben.
Importieren
import { CapgoVideoThumbnails } from '@capgo/capacitor-video-thumbnails';
API im Überblick
| Methode | Beschreibung |
|---|---|
getThumbnail |
Erstelle ein Vorschaubild aus einem Videodatei an einer bestimmten Zeitposition. |
Beispiele
getThumbnail()
Erstelle ein Vorschaubild aus einem Videodatei an einer bestimmten Zeitposition.
import { CapgoVideoThumbnails } from '@capgo/capacitor-video-thumbnails';
const result = await CapgoVideoThumbnails.getThumbnail({
sourceUri: 'file:///path/to/video.mp4',
time: 5000,
quality: 0.8
});
console.log('Thumbnail URI:', result.uri);
console.log('Dimensions:', result.width, 'x', result.height);
Vollständige Referenz
Weitermachen von Using @capgo/capacitor-video-thumbnails
Wenn Sie @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-video-thumbnails verwenden Verwenden Sie @capgo/capacitor-video-thumbnails Um native Medien und Schnittstellenverhalten zu planen, verbinden Sie es mit @capgo/capacitor-Video-Vorschaubilder für die Implementierungsdetails in @capgo/capacitor-Video-Vorschaubilder Getting Started für die Implementierungsdetails in Einstieg Mit @capgo/capacitor-Live-Aktivitäten für die native Fähigkeit in Mit @capgo/capacitor-Live-Aktivitäten @capgo/capacitor-Live-Aktivitäten für die Implementierungsdetails in @capgo/capacitor-Live-Aktivitäten und Mit @capgo/capacitor-Video-Player für die native Fähigkeit in Mit @capgo/capacitor-Video-Player.