mirror of
https://github.com/THU-MAIC/OpenMAIC.git
synced 2026-10-13 04:50:23 +08:00
Discussion narration created a new Audio element per line, so on mobile every line after the first had its programmatic play() refused with NotAllowedError: the dialogue went silent while the lesson kept advancing. This is the discussion side of #1474, which #1477 fixed for the narration player. One module-scoped element now serves every line, kept separate from the narration element in AudioPlayer so neither can cut the other off. Because element identity can no longer tell lines apart, the stale-event guard became a per-line token, handlers are assigned rather than added (a listener would accumulate once per line), and finish()/cleanup() release the line by removing the source attribute and reloading instead of leaving the element pointed at the page's own URL. Co-authored-by: talkman <jaxgen@163.com> Co-authored-by: wyuc <wang-yc24@mails.tsinghua.edu.cn>