Skip to content

NativePlayer.play() ignores the play() promise — autoplay-blocked leaves paused=false and a zombie polling loop #268

Description

@maboa

Summary

(As of v2.6.2.) hyperaudio-lite.js:64-67:

play() {
  this.player.play();
  this.paused = false;
}

HTMLMediaElement.play() returns a promise that rejects (NotAllowedError) under autoplay policy. The rejection is unhandled, and this.paused is set false while the element remains paused — no pause event will ever fire to correct it. checkStatus then sees !paused and re-arms its timer forever against a static currentTime: a perpetual poll on a player that isn't playing, with stale internal state. (Triggered via playOnClick: true, the library default.)

Fix

this.player.play().catch(() => { this.paused = true; }), or derive paused solely from the play/pause events already wired in attachEventListeners.

Found reviewing the copy vendored in hyperaudio-lite-editor / GliderMac (2026-07-11).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions