{"id":20842868,"url":"https://github.com/leopoldthecoder/react-audio-vision","last_synced_at":"2026-04-09T14:01:56.956Z","repository":{"id":95581546,"uuid":"141882361","full_name":"Leopoldthecoder/react-audio-vision","owner":"Leopoldthecoder","description":"🎧A react component that visualizes audio files","archived":false,"fork":false,"pushed_at":"2018-07-25T11:37:07.000Z","size":286,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T13:21:24.071Z","etag":null,"topics":["audio-visualizer","react"],"latest_commit_sha":null,"homepage":"https://jsfiddle.net/leopoldthecuber/2dovasye/","language":"JavaScript","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/Leopoldthecoder.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":"2018-07-22T09:25:54.000Z","updated_at":"2024-03-16T10:11:33.000Z","dependencies_parsed_at":"2023-06-01T07:47:06.601Z","dependency_job_id":null,"html_url":"https://github.com/Leopoldthecoder/react-audio-vision","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leopoldthecoder%2Freact-audio-vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leopoldthecoder%2Freact-audio-vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leopoldthecoder%2Freact-audio-vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leopoldthecoder%2Freact-audio-vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leopoldthecoder","download_url":"https://codeload.github.com/Leopoldthecoder/react-audio-vision/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243475,"owners_count":21071054,"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-visualizer","react"],"created_at":"2024-11-18T01:25:49.072Z","updated_at":"2026-04-09T14:01:56.833Z","avatar_url":"https://github.com/Leopoldthecoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-audio-vision\n\n\u003e A react component that visualizes audio files\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/10095631/43189043-3f1a72d2-9028-11e8-9504-664febe8c985.gif\" width=\"400\"\u003e\n\u003c/p\u003e\n\n### Demo\nhttps://jsfiddle.net/leopoldthecuber/2dovasye/\n\n### Install\n\n#### npm\n```bash\nnpm install react-audio-vision\n```\n\n#### script tag\n```html\n\u003cscript src=\"https://unpkg.com/react-audio-vision\"\u003e\u003c/script\u003e\n```\n\n### Usage\n\n#### npm\n```jsx\nimport React, { Component } from 'react'\nimport AudioVision from 'react-audio-vision'\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cAudioVision /\u003e\n    )\n  }\n}\n```\n\n#### script tag\n```html\n\u003cscript\u003e\n  class App extends React.Component {\n    render() {\n      return (\n        \u003cAudioVision /\u003e\n      )\n    }\n  }\n  ReactDOM.render(\u003cApp /\u003e, document.querySelector('#app'))\n\u003c/script\u003e\n```\n\n### API\n```jsx\n\u003cAudioVision\n  // audio source, can be a string (a url of an audio file that triggers an XMLHttpRequest) or a blob\n  // 音频源，字符串（音频文件的 url 地址，会触发 XMLHttpRequest 请求）或 Blob 类型\n  src=\"path/to/my.mp3\"\n\n  // canvas width, number\n  // canvas 的宽度，数字类型\n  width={600}\n\n  // canvas height, number\n  // canvas 的高度，数字类型\n  height={300}\n\n  // number of bars, must be a power of two in the range of [16, 16384]\n  // 色块的数量，必须是在 [16, 16384] 范围内的 2 的幂\n  bars={64}\n\n  // color of bars, can be a string or a string array\n  // 色块的颜色，字符串或字符串数组\n  barColor=\"black\"\n  // barColor={['crimson', 'gold']}\n\n  // pause the audio or not, boolean\n  // 是否暂停播放，布尔型\n  pause={false}\n\n  // audio play volume, number between 0 and 1\n  // 音频播放音量，介于 0 和 1 之间的数字\n  volume={0.6} /\u003e\n```\n\n### Reference\nhttps://github.com/loosenRogers/MusicVisualizer-WebAudioAPI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleopoldthecoder%2Freact-audio-vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleopoldthecoder%2Freact-audio-vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleopoldthecoder%2Freact-audio-vision/lists"}