Verwendung von @capgo/capacitor-photo-library
Capacitor-Plugin: Anzeigt eine Fotogalerie als Web-Seite oder eine native, nicht modifizierbare Bildschirmanzeige, die keine Autorisierung erfordert.
Installieren
bun add @capgo/capacitor-photo-library
bunx cap sync
Was dieses Plugin bereitstellt
checkAuthorization- Gibt den aktuellen Autorisierungsstatus ohne Benutzeranfrage zurück.requestAuthorization- Fordert Zugriff auf die Fotobibliothek an, wenn erforderlich.getAlbums- Holt die verfügbaren Alben ab.getLibrary- Holt Bibliotheksassets zusammen mit URLs ab, die in der Webansicht angezeigt werden können.
Beispielanwendung
checkAuthorization
Gibt den aktuellen Autorisierungsstatus ohne das Anfragen des Benutzers zurück.
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.checkAuthorization();
requestAuthorization
Bittet um Zugriff auf die Fotobibliothek, wenn erforderlich.
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.requestAuthorization();
getAlbums
Ruft die verfügbaren Alben ab.
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.getAlbums();
getLibrary
Ruft Bibliotheksassets zusammen mit URLs ab, die in der Webansicht angezeigt werden können.
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.getLibrary();
Vollständige Referenz
- GitHub: https://github.com/Cap-go/capacitor-photo-library/
- Dokumentation: /docs/plugins/photo-library/
Fahren Sie mit der Verwendung von @capgo/capacitor-photo-library fort.
Wenn Sie @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-photo-library verwenden https://capgo.com/Cap-go/capacitor-photo-library/ um native Medien und Schnittstellenverhalten zu planen, verbinden Sie es mit @capgo/capacitor-photobibliothek für die Implementierungsdetails in @capgo/capacitor-photobibliothek Anleitung zum Starten für die Implementierungsdetails in Anleitung zum Starten Verwendung von @capgo/capacitor-live-Aktivitäten für die native Fähigkeit in Verwendung von @capgo/capacitor-live-Aktivitäten @capgo/capacitor-live-Aktivitäten für die Implementierungsdetails in @capgo/capacitor-live-Aktivitäten und Verwendung von @capgo/capacitor-video-Player für die native Fähigkeit in Verwendung von @capgo/capacitor-video-Player