Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

弹幕可以无缝刷新吗 #764

Closed
wuhen8 opened this issue Jun 4, 2024 · 4 comments
Closed

弹幕可以无缝刷新吗 #764

wuhen8 opened this issue Jun 4, 2024 · 4 comments
Labels

Comments

@wuhen8
Copy link

wuhen8 commented Jun 4, 2024

现在更换弹幕只能重载,会把弹幕全部清除重新加载,可以不清除续上吗,想实现腾讯那种弹幕效果,一页一页加载

@zhw2590582
Copy link
Owner

zhw2590582 commented Jun 4, 2024

不太明白,不清空原来旧的弹幕,然后加上新的弹幕?那么原来旧的还没发送的弹幕不就和新弹幕混在一起了吗。
假如你想在原有弹幕上追加新的弹幕列表,可以直接使用 art.plugins.artplayerPluginDanmuku.emit() 添加

@wuhen8
Copy link
Author

wuhen8 commented Jun 4, 2024

就是弹幕有很多页,一页一页加载,art.plugins.artplayerPluginDanmuku.emit()这个可以加载弹幕 XML吗,我用这个
{
position: 'right',
html: '切换弹幕',
click: function () {
art.plugins.artplayerPluginDanmuku.config({
danmuku: '/assets/sample/danmuku-v2.xml',
});
art.plugins.artplayerPluginDanmuku.load();
},
},
弹幕会中断,不想让他中断,想这一页弹幕加载完了,下一页续上,不要清空更自然一点

@zhw2590582
Copy link
Owner

目前还没有动态加载xml的功能,下个版本加上

@zhw2590582 zhw2590582 added the todo label Jun 4, 2024
@zhw2590582
Copy link
Owner

可以更新到artplayer-plugin-danmuku@5.1.2
https://artplayer.org/document/plugin/danmuku.html#load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants