{"id":18483698,"url":"https://github.com/simsv-software/simlrc","last_synced_at":"2025-08-11T15:06:18.297Z","repository":{"id":251760774,"uuid":"838354854","full_name":"Simsv-Software/SimLRC","owner":"Simsv-Software","description":"SimMusic 同款，轻量而美观的 Web 歌词组件","archived":false,"fork":false,"pushed_at":"2025-01-29T15:59:14.000Z","size":2870,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T20:33:12.205Z","etag":null,"topics":["lyric-parser","lyrics"],"latest_commit_sha":null,"homepage":"https://simsv-software.github.io/SimLRC/demo/","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/Simsv-Software.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-05T13:22:30.000Z","updated_at":"2025-03-20T12:36:48.000Z","dependencies_parsed_at":"2025-02-16T21:31:41.547Z","dependency_job_id":"1d3531e1-84cf-4846-bb9c-4aff92ec1cc2","html_url":"https://github.com/Simsv-Software/SimLRC","commit_stats":null,"previous_names":["yanji314/simlrc","simsv-software/simlrc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Simsv-Software/SimLRC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simsv-Software%2FSimLRC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simsv-Software%2FSimLRC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simsv-Software%2FSimLRC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simsv-Software%2FSimLRC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simsv-Software","download_url":"https://codeload.github.com/Simsv-Software/SimLRC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simsv-Software%2FSimLRC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269907344,"owners_count":24494343,"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-08-11T02:00:10.019Z","response_time":75,"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":["lyric-parser","lyrics"],"created_at":"2024-11-06T12:36:58.634Z","updated_at":"2025-08-11T15:06:18.209Z","avatar_url":"https://github.com/Simsv-Software.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimLRC\n轻量而美观的 Web 歌词组件\n \n![simlrc](https://github.com/user-attachments/assets/38a5b970-92a6-4034-8652-150898081794)\n\n## 主要特色\n- CSS + JS 快速引入，无需任何依赖项\n- 支持歌词中同行存在多个时间标签\n- 支持将时间标签相同的歌词作为双语翻译合并输出\n- 界面优雅，支持配置层级模糊，如预览图所示\n- 支持自动去除无关内容和空行\n\n## 在线演示站\nhttps://simsv-software.github.io/SimLRC/demo/\n\n## 基本用法\n1. 引入 SimLRC 的 css 和 js 文件\n   ```html\n   \u003clink rel=\"stylesheet\" href=\"path/to/simlrc.css\"\u003e\n   \u003cscript src=\"path/to/simlrc.js\"\u003e\u003c/script\u003e\n   ```\n2. 准备一个 audio 元素和一个歌词容器\n   ```html\n   \u003caudio src=\"path/to/music.mp3\" controls id=\"audio\"\u003e\u003c/audio\u003e\n   \u003cdiv id=\"container\"\u003e\u003c/div\u003e\n   ```\n3. 构造一个 SimLRC 实例\n   ```javascript\n   const lrc = new SimLRC(\"\u003cLRC 格式的字符串\u003e\");\n   ```\n4. 使用默认配置渲染歌词 \n   ```javascript\n   lrc.render(document.getElementById(\"container\"), document.getElementById(\"audio\"));\n   ```\n\n## 按需求配置\n在「渲染」一步，`lrc.render` 方法支持传入第三个参数用于进行配置。\n```javascript\nlrc.render(document.getElementById(\"container\"), document.getElementById(\"audio\"), options);\n```\n`options` 支持传入以下参数：\n```javascript\nconst options = {\n\tblurStep: 1, // 上下歌词模糊层级，设为 0 以禁用此功能，推荐在移动设备禁用\n\tblurMin: 2, // 最小歌词模糊级别\n\tblurMax: 5, // 最大歌词模糊级别，设为 0 以禁用此功能\n\tnormalColor: \"#00000088\", // 歌词闲置状态字体颜色\n\tactiveColor: \"#000000\", // 歌词聚焦状态字体颜色\n\tclickUpdate: true, // 是否支持用户通过点击歌词调整播放进度\n\tmultiLangSupport: true, // 开启多语言支持，开启后时间标签相同的不同歌词将作为多语言翻译渲染\n\talign: \"center\", // 文字排版方式，支持 left、center、right\n\tinactiveZoom: .8, // 歌词闲置状态缩放大小，设为 1 以禁止缩放\n\tlineSpace: .8, // 歌词行距倍数，设为 0 以使用紧凑布局\n\tscrollTimeout: 3000, // 在用户进行滚动操作后 n 毫秒后恢复自动滚动歌词\n\tcallback: console.log // 在歌词更新时，将调用 callback(text)，用于设置网页标题等需求使用\n};\n```\n\n## 兼容性\n仅兼容各主流内核最新版本，有兼容性需求请自行添加 Polyfill。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimsv-software%2Fsimlrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimsv-software%2Fsimlrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimsv-software%2Fsimlrc/lists"}