{"id":21521596,"url":"https://github.com/zzarcon/audio-cover","last_synced_at":"2025-07-27T05:35:32.907Z","repository":{"id":57186612,"uuid":"162431202","full_name":"zzarcon/audio-cover","owner":"zzarcon","description":"Get the cover from an audio file in the browser","archived":false,"fork":false,"pushed_at":"2018-12-24T01:29:49.000Z","size":319,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-22T15:57:43.352Z","etag":null,"topics":["audio","base64","cover","file","filereader","image","preview","promise","tags"],"latest_commit_sha":null,"homepage":"https://zzarcon.github.io/audio-cover","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zzarcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-19T11:59:06.000Z","updated_at":"2022-02-24T05:07:52.000Z","dependencies_parsed_at":"2022-08-28T13:01:24.810Z","dependency_job_id":null,"html_url":"https://github.com/zzarcon/audio-cover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zzarcon/audio-cover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Faudio-cover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Faudio-cover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Faudio-cover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Faudio-cover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zzarcon","download_url":"https://codeload.github.com/zzarcon/audio-cover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zzarcon%2Faudio-cover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267306863,"owners_count":24067038,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["audio","base64","cover","file","filereader","image","preview","promise","tags"],"created_at":"2024-11-24T01:07:39.792Z","updated_at":"2025-07-27T05:35:32.891Z","avatar_url":"https://github.com/zzarcon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# audio-cover [![Build Status](https://travis-ci.org/zzarcon/audio-cover.svg?branch=master)](https://travis-ci.org/zzarcon/audio-cover) [DEMO](https://zzarcon.github.io/audio-cover)\n\u003e Get the cover from an audio file in the browser\n\n### Installation\n\n```\n$ yarn add audio-cover\n```\n\n### Demo\n\n[https://zzarcon.github.io/audio-cover](https://zzarcon.github.io/audio-cover)\n\n### Usage\n\n```javascript\nimport getAudioCover from 'audio-cover';\n\ntry {\n  const coverSrc = await getAudioCover(file);\n  \n  console.log('base64 encoded cover', coverSrc)\n} catch (e) {\n  console.log('no cover available', e)\n}\n```\n\n### Api\n\n```typescript\ngetAudioCover: (file: File) =\u003e Promise\u003cstring\u003e\n```\n\n\u003e given a file, returns a promise with the cover in base64, otherwise will reject if cover is not present\n\n### Example\n\n```jsx\nimport getAudioCover from 'audio-cover';\n\nclass App extends React.Component {\n  state = {}\n\n  onChange = async (e) =\u003e {\n    try {\n      const file = e.target.files[0];\n      const coverSrc = await getAudioCover(file);\n      this.setState({coverSrc});\n    } catch(e) {\n      console.log('error:', e)\n    }\n  }\n\n  render() {\n    const {coverSrc} = this.state;\n\n    return (\n      \u003cdiv\u003e\n        \u003cinput type=\"file\" onChange={this.onChange}/\u003e\n        \u003cimg src={coverSrc} /\u003e\n      \u003c/div\u003e\n    )\n  }\n}\n```\n\n### Author 👶🏼\n\n[@zzarcon](https://twitter.com/zzarcon)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzarcon%2Faudio-cover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzzarcon%2Faudio-cover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzzarcon%2Faudio-cover/lists"}