{"id":26362941,"url":"https://github.com/wiidede/dan-player","last_synced_at":"2026-04-28T07:00:57.966Z","repository":{"id":236594147,"uuid":"772054184","full_name":"wiidede/dan-player","owner":"wiidede","description":"一个基于 Vue 开发的弹幕播放器组件，支持MKV格式，支持ASS、SRT字幕 A bullet screen player component developed based on Vue, supporting MKV format, and supporting ASS, SRT subtitles.","archived":false,"fork":false,"pushed_at":"2026-04-27T13:13:27.000Z","size":1823,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-27T15:14:46.992Z","etag":null,"topics":["ass","danmaku","danmu","mkv","player"],"latest_commit_sha":null,"homepage":"https://dan.wiidede.space","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/wiidede.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-14T12:57:46.000Z","updated_at":"2026-04-27T13:13:24.000Z","dependencies_parsed_at":"2024-04-28T01:12:09.142Z","dependency_job_id":"bf2fb86c-eb95-4a2c-964b-6a6ea3699bb6","html_url":"https://github.com/wiidede/dan-player","commit_stats":null,"previous_names":["wiidede/dan-player"],"tags_count":12,"template":false,"template_full_name":"wiidede/vue-comp-starter","purl":"pkg:github/wiidede/dan-player","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiidede%2Fdan-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiidede%2Fdan-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiidede%2Fdan-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiidede%2Fdan-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiidede","download_url":"https://codeload.github.com/wiidede/dan-player/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiidede%2Fdan-player/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32370030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"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":["ass","danmaku","danmu","mkv","player"],"created_at":"2025-03-16T18:19:56.565Z","updated_at":"2026-04-28T07:00:57.924Z","avatar_url":"https://github.com/wiidede.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![JSDocs][jsdocs-src]][jsdocs-href]\n[![License][license-src]][license-href]\n\n# Dan Player\n\n\u003ca href=\"https://dan.wiidede.space/\" target=\"_blank\" \u003e\n\u003cimg alt=\"Dan Player Logo\" src=\"./playground/public/favicon.svg\" width=\"100px\" height=\"100px\"\u003e\n\u003c/a\u003e\n\nDan Player 是一个基于 Vue 开发的弹幕播放器组件，支持MKV格式，支持ASS、SRT字幕\nDan Player is a bullet screen player component developed based on Vue, supporting MKV format, and supporting ASS, SRT subtitles.\n\n## Features\n\n- 基础功能：播放、控制\n- 弹幕功能（基于Comment Core Library）\n- 键盘快捷键\n- 国际化，支持中文、英文已经自定义\n- 支持 MKV 格式，读取srt、ass字幕 by [@wiidede/ebml](https://github.com/wiidede/ebml)\n- ass字幕显示 by [ASS.js](https://github.com/weizhenye/ASS)\n\n- Basic functions: play, control\n- Danmaku feature (based on Comment Core Library)\n- Keyboard shortcuts\n- Internationalization, supports Chinese, English and customization\n- Supports MKV format, reads srt, ass subtitles by [@wiidede/ebml](https://github.com/wiidede/ebml)\n- ass subtitle display by [ASS.js](https://github.com/weizhenye/ASS)\n\n## Demo\n\n[Online Demo 在线演示](https://dan.wiidede.space)\n\n## Quick Start\n\n### 1. Installation\n\n```bash\npnpm add @wiidede/dan-player\n```\n\n### 2. Usage in Vue\n\n**In Single-File Components (SFC)**\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport DanPlayer from '@wiidede/dan-player'\nimport { ref } from 'vue'\nimport '@wiidede/dan-player/dist/index.css' // Import the component's stylesheet\n\nconst comments = ref([\n  // Fill in your actual comment data here, following the format of ICommentCCL type\n])\nconst additionalFunctions = ref(['loop', 'picture-in-picture'])\nconst locale = ref('en')\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cDanPlayer\n    :comments=\"comments\"\n    autoplay-on-comment-load\n    :additional-functions=\"additionalFunctions\"\n    :locale=\"locale\"\n  /\u003e\n\u003c/template\u003e\n```\n\n**Install Globally**\n\n```ts\nimport DanPlayer from '@wiidede/dan-player'\n// main.ts\nimport { createApp } from 'vue'\nimport '@wiidede/dan-player/dist/index.css'\n\nconst app = createApp(App)\napp.component('DanPlayer', DanPlayer)\napp.mount('#app')\n```\n\n```ts\ndeclare module 'vue' {\n  export interface GlobalComponents {\n    DanPlayer: typeof import('dan-player')['default']\n  }\n}\n```\n\nunplugin-vue-components\n\n```ts\nimport { DanPlayerResolver } from '@wiidede/dan-player/resolver'\n\n// and then add `DanPlayerResolver()` into resolvers\n```\n\n## Props\n\n| Name                  | Type                                 | Description                                                                                                                    | Default     |\n| --------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------- |\n| comments              | `ICommentCCL[]`                      | An array containing the comment data to be displayed as CCL.                                                                   | `undefined` |\n| autoplayOnCommentLoad | `boolean`                            | A boolean flag indicating whether the video should automatically start playing once the comments are loaded.                   | `false`     |\n| additionalFunctions   | `('loop' \\| 'picture-in-picture')[]` | An array specifying additional functions to enable for the player, such as loop playback and Picture-in-Picture mode.          | `[]`        |\n| locale                | `I18nLocale \\| I18nMessages`         | The language setting for internationalization. It determines which language's text content will be displayed in the component. | `'en'`      |\n| src                   | `string \\| Blob`                     | The source URL or Blob object of the video to be played.                                                                       | `undefined` |\n\n## Events\n\n| Name          | Description                                                                                                                                                                           |\n| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| onCommentLoad | This event is emitted when the comment data has been successfully loaded. Parent components can listen to this event to perform additional operations upon comment data availability. |\n\n## Exposed Properties and Methods\n\nThe component exposes several properties and methods via `defineExpose` for external components to interact with and control the video player more precisely:\n\n| Name                        | Type       | Description                                                                                                                     |\n| --------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------- |\n| playing                     | `boolean`  | Indicates whether the video is currently playing or paused.                                                                     |\n| currentTime                 | `number`   | Represents the current playback time of the video in seconds.                                                                   |\n| duration                    | `number`   | Holds the total duration of the video in seconds.                                                                               |\n| (other relevant properties) | (types)    | (describe the types and purposes of other exposed properties like volume, muted, isPictureInPicture, etc., if applicable)       |\n| togglePlay                  | `Function` | A method that can be called to toggle the play/pause state of the video.                                                        |\n| (other relevant methods)    | (Function) | (describe the functionality of other exposed methods such as togglePictureInPicture, toggleFullscreen, etc., if there are more) |\n\n## Styling Customization\n\n与修改element-plus主题保持一致，不过只能修改颜色\n\n## License\n\n[MIT License](./LICENSE) © 2023-PRESENT [wiidede](https://github.com/wiidede)\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/@wiidede/dan-player?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[npm-version-href]: https://npmjs.com/package/@wiidede/dan-player\n[npm-downloads-src]: https://img.shields.io/npm/dm/@wiidede/dan-player?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[npm-downloads-href]: https://npmjs.com/package/@wiidede/dan-player\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/@wiidede/dan-player?style=flat\u0026colorA=080f12\u0026colorB=1fa669\u0026label=minzip\n[bundle-href]: https://bundlephobia.com/result?p=@wiidede/dan-player\n[license-src]: https://img.shields.io/github/license/wiidede/dan-player.svg?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[license-href]: https://github.com/wiidede/dan-player/blob/main/LICENSE\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat\u0026colorA=080f12\u0026colorB=1fa669\n[jsdocs-href]: https://www.jsdocs.io/package/@wiidede/dan-player\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiidede%2Fdan-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiidede%2Fdan-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiidede%2Fdan-player/lists"}