Using @capgo/capacitor-photo-library
Capacitor plugin Displays photo gallery as web page, or boring native screen which you cannot modify but require no authorization.
Install
bun add @capgo/capacitor-photo-library
bunx cap sync
What This Plugin Exposes
checkAuthorization- Returns the current authorization status without prompting the user.requestAuthorization- Requests access to the photo library if needed.getAlbums- Retrieves the available albums.getLibrary- Retrieves library assets along with URLs that can be displayed in the web view.
Example Usage
checkAuthorization
Returns the current authorization status without prompting the user.
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.checkAuthorization();
requestAuthorization
写真ライブラリへのアクセスを要求する必要がある場合にそれを要求します。
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.requestAuthorization();
getAlbums
アルバムが利用可能なものを取得します。
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.getAlbums();
getLibrary
ウェブビューで表示できるURLが含まれるウェブアセットを取得します。
import { PhotoLibrary } from '@capgo/capacitor-photo-library';
await PhotoLibrary.getLibrary();
フルリファレンス
- GitHub: https://github.com/Cap-go/capacitor-photo-library/
- ドキュメント: /docs/plugins/photo-library/
@capgo/capacitor-photo-libraryから続けてください。
__CAPGO_KEEP_0__を使用している場合 @capgo/capacitor-photo-libraryを使用している場合 ネイティブメディアとインターフェイスの動作を計画する場合、CloudflareのCapacitorと接続してください。 @capgo/capacitor-photo-libraryと接続してください @capgo/capacitor-photo-libraryの実装詳細 Getting Started @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-photo-libraryの実装詳細 @capgo/capacitor-live-activitiesのネイティブ機能 @capgo/capacitor-live-activities @capgo/capacitor-live-activitiesの実装詳細、 @capgo/capacitor-video-playerのネイティブ機能 Using @capgo/capacitor-video-player for the native capability in Using @capgo/capacitor-video-player.