{"id":26266097,"url":"https://github.com/react-native-studio/react-native-android-danmaku","last_synced_at":"2025-04-30T16:46:43.034Z","repository":{"id":57335184,"uuid":"117781639","full_name":"react-native-studio/react-native-android-danmaku","owner":"react-native-studio","description":"react native弹幕插件（android）基于哔哩哔哩弹幕插件","archived":false,"fork":false,"pushed_at":"2018-03-02T02:46:08.000Z","size":103,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-21T01:19:21.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/2534290808/DanmakuFlameMaster","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-native-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-17T04:00:27.000Z","updated_at":"2021-06-21T17:26:51.000Z","dependencies_parsed_at":"2022-09-05T10:21:14.469Z","dependency_job_id":null,"html_url":"https://github.com/react-native-studio/react-native-android-danmaku","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-danmaku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-danmaku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-danmaku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-studio%2Freact-native-android-danmaku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-studio","download_url":"https://codeload.github.com/react-native-studio/react-native-android-danmaku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251747771,"owners_count":21637404,"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":"2025-03-14T03:16:49.963Z","updated_at":"2025-04-30T16:46:43.012Z","avatar_url":"https://github.com/react-native-studio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## react-native-android-danmaku [![npm version](https://badge.fury.io/js/react-native-android-danmaku.svg)](https://badge.fury.io/js/react-native-android-danmaku)\n## 第一步\n工程目录下运行 npm install --save react-native-android-danmaku 或者 yarn add react-native-android-danmaku(已经安装了yarn)\n\n### 注意：\nversion 0.1.1适用于大于等于rn0.44和小于0.47\u003cbr/\u003e\nversion 0.2.1适用于rn0.47及以上\n## 第二步\n运行 react-native link react-native-android-danmaku\n## 第三部使用\n在工程中导入：\n```bash\nimport DanmakuView from 'react-native-android-danmaku';\n\u003cDanmakuView style={{flex:1}} speed={1.2} maxLines={5} ref={ref=\u003ethis.danmaView=ref}/\u003e\nthis.danmakuView.pause(); //暂停弹幕\nthis.danmakuView.resume(); //重启弹幕\nthis.danmakuView.hide(); //隐藏弹幕\nthis.danmakuView.show(); //显示弹幕\nthis.danmakuView.addDanmaku({text:'000000',color:'red',padding:2,isLive:true,time:2000,fontSize:36})\n//发送弹幕\n```\n\u003cbr/\u003e\n注意在使用中时应设置组件的宽高;\n\n## 属性：\n1 speed 弹幕的速度\n2 maxLines 弹幕的最大行数\n## 方法\npause（）暂停弹幕\u003cbr/\u003e\nresume() 重启弹幕\u003cbr/\u003e\nhide() 隐藏弹幕\u003cbr/\u003e\nshow() 显示弹幕\u003cbr/\u003e\naddDanmaku(params) 发送弹幕\n\u003cbr/\u003e\nparams为：`{text,\nisLive,\nfontSize,\npadding,\ncolor,\ntime}`\u003cbr/\u003e\ntext:弹幕内容，\nisLive:是否为直播，\nfontSize：弹幕字体大小，\npadding：弹幕的内边距，\ncolor：弹幕颜色，\ntime：弹幕出现时间，\n## 示例\n\u003c!--![image](https://github.com/2534290808/react-native-android-danmaku/blob/master/images/Screenshot_1513176625.png)--\u003e\n\u003cimg src=\"https://github.com/2534290808/react-native-android-danmaku/blob/master/images/Screenshot_1513176625.png\" width = \"300\"  alt=\"图片名称\" align=center /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-studio%2Freact-native-android-danmaku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-studio%2Freact-native-android-danmaku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-studio%2Freact-native-android-danmaku/lists"}