mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
增加弹幕库解析的兼容
This commit is contained in:
1 parent
1a638c490a
commit
7cbf28e134
7 files changed
+22
-22
No files matched your search
@@ -18,7 +18,7 @@ export function bilibiliDanmuParseFromXml(xmlString) {
|
||||
return Array.from(matches)
|
||||
.map((match) => {
|
||||
const attr = match.groups.p.split(',');
|
||||
if (attr.length === 8) {
|
||||
if (attr.length >= 8) {
|
||||
const text = match.groups.text
|
||||
.trim()
|
||||
.replaceAll('"', '"')
|
||||
@@ -42,7 +42,7 @@ export function bilibiliDanmuParseFromXml(xmlString) {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter((d) => d);
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
export function bilibiliDanmuParseFromUrl(url) {
|
||||
|
||||
Reference in new issue
Block a user