mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-18 17:48:52 +08:00
fix: 播放结束后Route的状态不对
This commit is contained in:
parent
0c21d99d57
commit
e32ffd2cc9
@ -376,6 +376,16 @@ export class AudioRoute
|
|||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.output = source.output;
|
this.output = source.output;
|
||||||
|
source.on('end', () => {
|
||||||
|
if (this.status === AudioStatus.Playing) {
|
||||||
|
this.status = AudioStatus.Stoped;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
source.on('play', () => {
|
||||||
|
if (this.status !== AudioStatus.Playing) {
|
||||||
|
this.status = AudioStatus.Playing;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user