{"id":18303542,"url":"https://github.com/sina-byn/re-audio","last_synced_at":"2025-04-05T15:31:03.781Z","repository":{"id":256741966,"uuid":"838290927","full_name":"sina-byn/re-audio","owner":"sina-byn","description":"A highly customizable React audio player library with support for modern web audio features and seamless integration into any React application.","archived":false,"fork":false,"pushed_at":"2025-01-17T12:54:33.000Z","size":37746,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T06:33:24.245Z","etag":null,"topics":["audio","audio-player","javascript","media-player","music-player","re-audio","react","react-component","react-hooks","typescript"],"latest_commit_sha":null,"homepage":"https://sina-byn.github.io/re-audio/","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/sina-byn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-05T10:45:17.000Z","updated_at":"2025-02-19T09:27:28.000Z","dependencies_parsed_at":"2024-11-05T15:42:47.144Z","dependency_job_id":null,"html_url":"https://github.com/sina-byn/re-audio","commit_stats":null,"previous_names":["sina-byn/re-audio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fre-audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fre-audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fre-audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sina-byn%2Fre-audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sina-byn","download_url":"https://codeload.github.com/sina-byn/re-audio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"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":["audio","audio-player","javascript","media-player","music-player","re-audio","react","react-component","react-hooks","typescript"],"created_at":"2024-11-05T15:25:58.932Z","updated_at":"2025-04-05T15:30:58.767Z","avatar_url":"https://github.com/sina-byn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# re-audio [![NPM version](https://img.shields.io/npm/v/@sina_byn/re-audio.svg?style=flat)](https://www.npmjs.com/package/@sina_byn/re-audio) [![NPM monthly downloads](https://img.shields.io/npm/dm/@sina_byn/re-audio.svg?style=flat)](https://npmjs.org/package/@sina_byn/re-audio) [![NPM total downloads](https://img.shields.io/npm/dt/@sina_byn/re-audio.svg?style=flat)](https://npmjs.org/package/@sina_byn/re-audio)\n\n\u003e Creating audio players in React has never been easier\n\n![re-audio banner](/public/banner.png)\n\n\u003e Make sure to visit the documentation website at [https://sina-byn.github.io/re-audio/](https://sina-byn.github.io/re-audio/)\n\n- Built with TypeScript for seamless integration in TypeScript projects\n- Fully customizable with a headless component architecture\n- Developer-friendly with an intuitive API\n- Includes custom React hooks for easily creating audio visualizers\n\n## Installation\n\n```bash\nnpm i --save @sina_byn/re-audio\n```\n\n## Usage\n\n```tsx\n// * AudioPlayer.tsx\n\nimport { Audio, formatTime } from '@sina_byn/re-audio';\n\n// * components\nimport PlayBackControls from './PlayBackControls';\n\nconst AudioPlayer = () =\u003e {\n  return () =\u003e (\n    \u003cAudio\n      playlist={[\n        { id: 1, src: '/audio/1.mp3', name: 'for-her-chill' },\n        { id: 2, src: '/audio/2.mp3', name: 'trap-type-beat-rap-instrumental-riff' },\n        { id: 3, src: '/audio/3.mp3', name: 'whip-afro-dancehall' },\n      ]}\n    \u003e\n      {audioContext =\u003e (\n        \u003cdiv\u003e\n          \u003cheader style={{ display: 'flex', gap: '1rem' }}\u003e\n            \u003cspan\u003e{formatTime(audioContext.currentTime)}\u003c/span\u003e\n            \u003cspan\u003e/\u003c/span\u003e\n            \u003cspan\u003e{formatTime(audioContext.duration)}\u003c/span\u003e\n          \u003c/header\u003e\n\n          \u003cfooter style={{ display: 'flex', gap: '1rem' }}\u003e\n            \u003cPlayBackControls /\u003e\n          \u003c/footer\u003e\n        \u003c/div\u003e\n      )}\n    \u003c/Audio\u003e\n  );\n};\n\nexport default AudioPlayer;\n```\n\n```tsx\n// * PlayBackControls.tsx\n\nimport { useAudio } from '@sina_byn/re-audio';\n\nconst PlayBackControls = () =\u003e {\n  const { playing, togglePlay, prevTrack, nextTrack } = useAudio();\n\n  return (\n    \u003c\u003e\n      \u003cbutton type='button' onClick={prevTrack}\u003e\n        prev\n      \u003c/button\u003e\n\n      \u003cbutton type='button' onClick={togglePlay}\u003e\n        {playing ? 'pause' : 'play'}\n      \u003c/button\u003e\n\n      \u003cbutton type='button' onClick={nextTrack}\u003e\n        next\n      \u003c/button\u003e\n    \u003c/\u003e\n  );\n};\n\nexport default PlayBackControls;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsina-byn%2Fre-audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsina-byn%2Fre-audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsina-byn%2Fre-audio/lists"}