Skip to content

bug(audio): no audio in Safari / WKWebView — MediaElementSource breaks native output path #38

Closed

Description

@thcp

Summary

Audio is completely silent in the Tauri desktop app (WKWebView/macOS). Playback works in Chrome but not Safari.

Root cause

attachAnalysers() was called during the canplay event, which called createMediaElementSource() on each stem's <audio> element. This permanently disconnects the element from Safari's native audio output and routes it through the Web Audio graph. WKWebView does not reliably pass audio through a MediaElementSource → GainNode → destination chain, resulting in silence.

Additionally, applyMix() was setting audioEl.volume (the native path), which has no effect once the element has been routed through Web Audio.

Fix

  • Removed attachAnalysers() import and call from player.js — VU meters use pre-computed envelope data, not live Web Audio analysis
  • Reverted applyMix() to use audioEl.volume directly for HTMLMediaElement tracks (capped at 1.0 as per spec)

Affected platform

macOS (Tauri / WKWebView)

Release

0.5.0-alpha.1

Activity

  1. added this to the 0.5.0-alpha.1 milestone on May 17, 2026
  2. added
    bugSomething isn't working
    on May 17, 2026
  3. thcp commented on May 17, 2026

    @thcp
    CollaboratorAuthor

    Fixed in this session: removed attachAnalysers() and reverted to audioEl.volume direct path for WKWebView. Commit b2cb128 was the last known-good reference.

  4. added a commit that references this issue on May 18, 2026
    04c0b4d
  5. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions