{"id":20350000,"url":"https://github.com/webbestmaster/react-audio-player-pro","last_synced_at":"2025-04-12T01:30:31.286Z","repository":{"id":65251956,"uuid":"292885003","full_name":"webbestmaster/react-audio-player-pro","owner":"webbestmaster","description":"React Audio Player Pro provides: single audio, playlist and playlist provider","archived":false,"fork":false,"pushed_at":"2024-09-24T22:12:03.000Z","size":21189,"stargazers_count":20,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T21:11:40.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://webbestmaster.github.io/react-audio-player-pro","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/webbestmaster.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":"2020-09-04T15:37:41.000Z","updated_at":"2025-02-14T13:01:31.000Z","dependencies_parsed_at":"2023-01-15T22:45:36.073Z","dependency_job_id":"9104c5df-2b25-415b-87e4-387e6cef6da1","html_url":"https://github.com/webbestmaster/react-audio-player-pro","commit_stats":{"total_commits":325,"total_committers":2,"mean_commits":162.5,"dds":0.01538461538461533,"last_synced_commit":"d0f52d9811d4cd131f6f9dfb5d30b5042c6c73b1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Freact-audio-player-pro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Freact-audio-player-pro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Freact-audio-player-pro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Freact-audio-player-pro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbestmaster","download_url":"https://codeload.github.com/webbestmaster/react-audio-player-pro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504179,"owners_count":21115132,"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-11-14T22:28:29.937Z","updated_at":"2025-04-12T01:30:31.270Z","avatar_url":"https://github.com/webbestmaster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Audio Player Pro\n\n[![GitHub license](https://img.shields.io/npm/l/react-audio-player-pro)](https://github.com/webbestmaster/react-audio-player-pro/blob/master/license)\n[![npm version](https://img.shields.io/npm/v/react-audio-player-pro.svg)](https://www.npmjs.com/package/react-audio-player-pro)\n[![Known Vulnerabilities](https://snyk.io/test/github/webbestmaster/react-audio-player-pro/badge.svg)](https://snyk.io/test/github/webbestmaster/react-audio-player-pro)\n[![Dependency count](https://badgen.net/bundlephobia/dependency-count/react-audio-player-pro)](https://libraries.io/npm/react-audio-player-pro)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-audio-player-pro)](https://bundlephobia.com/package/react-audio-player-pro)\n[![nodejs version](https://img.shields.io/node/v/react-audio-player-pro)](https://nodejs.org/en/docs)\n[![Github CI](https://github.com/webbestmaster/react-audio-player-pro/actions/workflows/github-ci.yml/badge.svg)](https://github.com/webbestmaster/react-audio-player-pro/actions/workflows/github-ci.yml)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/webbestmaster/react-audio-player-pro/github-ci.yml)](https://github.com/webbestmaster/react-audio-player-pro/actions/workflows/github-ci.yml)\n[![Type definitions](https://img.shields.io/npm/types/react-audio-player-pro)](https://www.typescriptlang.org)\n[![Website](https://img.shields.io/website?url=https://webbestmaster.github.io/react-audio-player-pro)](https://webbestmaster.github.io/react-audio-player-pro)\n[![CodeFactor](https://www.codefactor.io/repository/github/webbestmaster/react-audio-player-pro/badge)](https://www.codefactor.io/repository/github/webbestmaster/react-audio-player-pro)\n[![Package Quality](https://packagequality.com/shield/react-audio-player-pro.svg)](https://packagequality.com/#?package=react-audio-player-pro)\n[![GitHub stars](https://img.shields.io/github/stars/webbestmaster/react-audio-player-pro?style=social)](https://github.com/webbestmaster/react-audio-player-pro)\n\n\u003c!--\n[![codecov](https://codecov.io/gh/webbestmaster/react-audio-player-pro/branch/master/graph/badge.svg)](https://codecov.io/gh/webbestmaster/react-audio-player-pro)\n[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/webbestmaster/react-audio-player-pro)](https://libraries.io/npm/react-audio-player-pro)\n--\u003e\n\n\nReact Audio Player Pro provides: single audio, playlist and playlist provider.\n\n**[Live demo](https://webbestmaster.github.io/react-audio-player-pro)**\n\n\n## Install\n\n```bash\nnpm i react-audio-player-pro\n```\n\n\n### Typing Flow\n\nUse `./flow-typed/react-audio-player-pro.js`.\n\n\n## Usage example \u0026lt;Audio/\u0026gt;\n\n```javascript\nimport React from 'react';\nimport {AudioPlayerControlSprite, Audio} from 'react-audio-player-pro';\nimport 'react-audio-player-pro/dist/style.css';\n\nconst mediaMetadata = {\n\n    // required\n    title: 'Pure Water',\n\n    // optional\n    artist: 'Meydän',\n\n    // optional\n    album: 'Interplanetary Forest',\n\n    // optional\n    artwork: [\n\n        // src, sizes and type is required\n        {src: '/path/to/image/64px/64px', sizes: '64x64', type: 'image/png'},\n        {src: '/path/to/image/128px/128px', sizes: '128x128', type: 'image/png'},\n    ],\n};\n\nexport function ExampleAudio() {\n    return (\n        \u003c\u003e\n            \u003cAudioPlayerControlSprite/\u003e\n            \u003cAudio\n                // string - path to audio file, required\n                src=\"/path/to/audio/file\"\n\n                // string - 'none' | 'metadata' | 'auto', default: 'auto', optional\n                preload=\"auto\"\n\n                // duration - number, default: 0, optional\n                // will updated automatically when track started or metadata loaded\n                duration={100}\n\n                // MediaMetadata - media meta data, optional\n                // https://developer.mozilla.org/en-US/docs/Web/API/MediaMetadata/MediaMetadata\n                mediaMetadata={mediaMetadata}\n\n                // string - wrapper's class name, optional, deafult: ''\n                className=\"my-class-name\"\n\n                // callback function - called on did mount, optional, default: noop\n                onDidMount={console.log}\n\n                // string - name for download file, optional, deafult: \u003csrc\u003e\n                downloadFileName=\"my-file.mp3\"\n\n                // boolean - show repeat button, optional, deafult: false\n                useRepeatButton={true}\n            /\u003e\n        \u003c/\u003e\n    );\n}\n```\n\n\n## Usage example \u0026lt;AudioPlayer/\u0026gt;\n\n```javascript\nimport React from 'react';\nimport {AudioPlayerControlSprite, AudioPlayer, TrackType} from 'react-audio-player-pro';\nimport 'react-audio-player-pro/dist/style.css';\n\nconst audioTrackList: Array\u003cTrackType\u003e = [\n    {\n        // string - path to audio file, required\n        src: '/path/to/audio/file',\n\n        // string - 'none' | 'metadata' | 'auto', default: 'auto', optional\n        preload: 'auto',\n\n        // duration - number, default: 0, optional\n        // will updated automatically when track started or metadata loaded\n        duration: 100,\n\n        // JSX.Element - custom content instead of title, optional, deafult: \u003ctitle\u003e or \u003csrc\u003e\n        content: \u003cCustomContent/\u003e,\n\n        // MediaMetadata - media meta data, see `mediaMetadata` above\n        // https://developer.mozilla.org/en-US/docs/Web/API/MediaMetadata/MediaMetadata\n        // optional\n        mediaMetadata: {\n            title: 'Lesser Faith',\n            artist: 'J. Syreus Bach',\n            album: 'Ability to Break ~ Energetic Tracks',\n            artwork: [\n                {src: '/path/to/image/64px/64px', sizes: '64x64', type: 'image/png'},\n                {src: '/path/to/image/128px/128px', sizes: '128x128', type: 'image/png'},\n            ],\n        },\n    },\n    // other tracks here...\n];\n\nexport function ExampleAudioPlayer() {\n    return (\n        \u003c\u003e\n            \u003cAudioPlayerControlSprite/\u003e\n            \u003cAudioPlayer\n                // Array\u003cTrackType\u003e - list of track, see `audioTrackList` above, required\n                trackList={audioTrackList}\n\n                // string - wrapper's class name, optional, deafult: ''\n                className=\"my-class-name\"\n\n                // callback function - called on did mount, optional, default: noop\n                onDidMount={console.log}\n\n                // default player state, optional\n                defaultState={{\n                    // boolean - is player muted, optional, default: false\n                    isMuted: false,\n\n                    // number - active song index, optional, default: 0\n                    activeIndex: 0,\n\n                    // boolean - is shuffle on, optional, default: false\n                    isShuffleOn: false,\n\n                    // boolean - is track list open, optional, default: true\n                    isTrackListOpen: true,\n\n                    // string: 'none' | 'all' | 'one' - repeating state, optional, default: 'none'\n                    repeatingState: 'none',\n                }}\n            /\u003e\n        \u003c/\u003e\n    );\n}\n```\n\n## Usage example \u0026lt;PlayListPanel/\u0026gt; and \u0026lt;PlayListProvider/\u0026gt;\n\n```javascript\nimport React from 'react';\nimport {AudioPlayerControlSprite, PlayListPanel, PlayListProvider, AudioPlayer, TrackType} from 'react-audio-player-pro';\nimport 'react-audio-player-pro/dist/style.css';\n\nconst audioTrackList: Array\u003cTrackType\u003e = [\n    {\n        // string - path to audio file, required\n        src: '/path/to/audio/file',\n\n        // JSX.Element - custom content instead of title, optional, deafult: \u003ctitle\u003e or \u003csrc\u003e\n        content: \u003cCustomContent/\u003e,\n\n        // MediaMetadata - media meta data, see `mediaMetadata` above\n        // https://developer.mozilla.org/en-US/docs/Web/API/MediaMetadata/MediaMetadata\n        // optional\n        mediaMetadata: {\n            title: 'Lesser Faith',\n            artist: 'J. Syreus Bach',\n            album: 'Ability to Break ~ Energetic Tracks',\n            artwork: [\n                {src: '/path/to/image/64px/64px', sizes: '64x64', type: 'image/png'},\n                {src: '/path/to/image/128px/128px', sizes: '128x128', type: 'image/png'},\n            ],\n        },\n    },\n    // other tracks here...\n];\n\nexport function PlayListProvider() {\n    return (\n        \u003c\u003e\n            \u003cAudioPlayerControlSprite/\u003e\n\n            // No props\n            \u003cPlayListProvider\u003e\n\n                // PlayListProvider provide a button to add track to play list\n                \u003cAudioPlayer trackList={audioTrackList}/\u003e\n\n                // No props\n                \u003cPlayListPanel/\u003e\n\n            \u003c/PlayListProvider\u003e\n        \u003c/\u003e\n    );\n}\n```\n\n## License\n\nSee [license](license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Freact-audio-player-pro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbestmaster%2Freact-audio-player-pro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Freact-audio-player-pro/lists"}