{"id":23557108,"url":"https://github.com/bechstein/capacitor-media","last_synced_at":"2025-07-20T07:13:45.650Z","repository":{"id":217699006,"uuid":"744476012","full_name":"bechstein/capacitor-media","owner":"bechstein","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-22T09:05:34.000Z","size":3125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-17T14:29:17.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bechstein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-17T11:29:25.000Z","updated_at":"2024-05-03T10:06:37.000Z","dependencies_parsed_at":"2024-01-22T11:12:41.422Z","dependency_job_id":"e87e5927-6106-44db-ae2a-46b08d1f1750","html_url":"https://github.com/bechstein/capacitor-media","commit_stats":null,"previous_names":["cbechstein-digital/capacitor-media","bechstein/capacitor-media"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bechstein%2Fcapacitor-media","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bechstein%2Fcapacitor-media/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bechstein%2Fcapacitor-media/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bechstein%2Fcapacitor-media/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bechstein","download_url":"https://codeload.github.com/bechstein/capacitor-media/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436950,"owners_count":22070947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-26T14:19:40.474Z","updated_at":"2025-05-15T23:08:54.377Z","avatar_url":"https://github.com/bechstein.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @cbechstein-digital/capacitor-media\n\nA capacitor plugin for interacting with the media library\n\n## Install\n\n```bash\nnpm install @cbechstein-digital/capacitor-media\nnpx cap sync\n```\n\n## Setup\n\n#### Angular:\nTo get a dummy response on the web, add the following to your `angular.json` under `projects.\u003cPROJECT_NAME\u003e.architect.build.options.assets`:\n```angular2html\n{\n    \"glob\": \"**/*.png\",\n    \"input\": \"node_modules/@cbechstein-digital/capacitor-media/src/assets/web/\",\n    \"output\": \"./assets/plugins/capacitor-media/web\"\n}\n```\n\n## Permissions\nThe required permissions for the plugin are as follows:\n\nOn `Android`, add the following two permissions to your `androidManifest.xml` inside the `manifest` tag:\n```\n\u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"\n      android:maxSdkVersion=\"32\" /\u003e\n\u003cuses-permission android:name=\"android.permission.READ_MEDIA_VIDEO\" /\u003e\n```\n\nOn `iOS`, add the following key to your `Info.plist` file with a description about why does your app needs this permission:\n```\n\u003cdict\u003e\n    .\n    .\n    .\n    \u003ckey\u003eNSPhotoLibraryUsageDescription\u003c/key\u003e\n    \u003cstring\u003eTo show the thumbnail of the latest recorded video in the app\u003c/string\u003e\n    .\n    .\n    .\n\u003c/dict\u003e\n```\nReplace the description between `string` based on your need.\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`getLatestVideoThumbnailFromAlbum(...)`](#getlatestvideothumbnailfromalbum)\n* [`openPhotosApp()`](#openphotosapp)\n* [Interfaces](#interfaces)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### getLatestVideoThumbnailFromAlbum(...)\n\n```typescript\ngetLatestVideoThumbnailFromAlbum(options: GetLatestVideoThumbnailFromAlbumOptions) =\u003e Promise\u003cGetLatestVideoThumbnailFromAlbumResults\u003e\n```\n\nReturns a thumbnail from the newest video in a specific album\n\n| Param         | Type                                                                                                        | Description                                                                                                               |\n| ------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#getlatestvideothumbnailfromalbumoptions\"\u003eGetLatestVideoThumbnailFromAlbumOptions\u003c/a\u003e\u003c/code\u003e | – The album name and the size of the resulting thumbnail. The album name is not supported and will be ignored on Android. |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getlatestvideothumbnailfromalbumresults\"\u003eGetLatestVideoThumbnailFromAlbumResults\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### openPhotosApp()\n\n```typescript\nopenPhotosApp() =\u003e Promise\u003cvoid\u003e\n```\n\nOpens the photos app of the phone\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetLatestVideoThumbnailFromAlbumResults\n\n| Prop        | Type                |\n| ----------- | ------------------- |\n| **`value`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### GetLatestVideoThumbnailFromAlbumOptions\n\n| Prop            | Type                                                    |\n| --------------- | ------------------------------------------------------- |\n| **`albumName`** | \u003ccode\u003estring\u003c/code\u003e                                     |\n| **`size`**      | \u003ccode\u003e\u003ca href=\"#thumbnailsize\"\u003eThumbnailSize\u003c/a\u003e\u003c/code\u003e |\n\n\n#### ThumbnailSize\n\n| Prop         | Type                |\n| ------------ | ------------------- |\n| **`width`**  | \u003ccode\u003enumber\u003c/code\u003e |\n| **`height`** | \u003ccode\u003enumber\u003c/code\u003e |\n\n\u003c/docgen-api\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbechstein%2Fcapacitor-media","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbechstein%2Fcapacitor-media","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbechstein%2Fcapacitor-media/lists"}