Skip to content

Commit fd9d43a

Browse files
author
Jarvan
committed
fix: 修复小程序音频播放完成回调未触发的问题
1 parent 65612b6 commit fd9d43a

File tree

1 file changed

+2
-2
lines changed
  • packages/audioplayers_web/wechat

1 file changed

+2
-2
lines changed

packages/audioplayers_web/wechat/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class MPFlutter_Wechat_AudioElement {
3838
this.audioContext.autoplay = true
3939
this.audioContext.src = this.src;
4040

41-
this.audioContext.onEnded = (e) => {
41+
this.audioContext.onEnded((e) => {
4242
this.onPlayEnded?.();
43-
}
43+
})
4444

4545
this.audioContext.loop = this.loop;
4646
this.audioContext.playbackRate = this.playbackRate;

0 commit comments

Comments
 (0)