mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
chore: Reset danmuku queue and emit event on reset
This commit is contained in:
1 parent
b2f2251c63
commit
c7e91e3c8f
3 files changed
+6
-1
No files matched your search
@@ -572,6 +572,7 @@ export default class Danmuku {
|
|||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.queue.forEach((danmu) => this.makeWait(danmu));
|
this.queue.forEach((danmu) => this.makeWait(danmu));
|
||||||
|
this.art.emit('artplayerPluginDanmuku:reset');
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ type Danmuku = {
|
|||||||
/**
|
/**
|
||||||
* 重置弹幕
|
* 重置弹幕
|
||||||
*/
|
*/
|
||||||
reset: () => void;
|
reset: () => Danmuku;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弹幕配置
|
* 弹幕配置
|
||||||
|
|||||||
@@ -533,6 +533,10 @@ art.on('artplayerPluginDanmuku:show', () => {
|
|||||||
console.info('弹幕显示');
|
console.info('弹幕显示');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
art.on('artplayerPluginDanmuku:react', () => {
|
||||||
|
console.info('弹幕重置');
|
||||||
|
});
|
||||||
|
|
||||||
art.on('artplayerPluginDanmuku:destroy', () => {
|
art.on('artplayerPluginDanmuku:destroy', () => {
|
||||||
console.info('弹幕销毁');
|
console.info('弹幕销毁');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user