goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.85k stars 2.23k forks source link

preload: ['metadata'], not working #1618

Open tofolux opened 2 years ago

tofolux commented 2 years ago

The Problem

using preload: ['metadata'], does not work

Reproducible Example

No response

Reproduction Steps

var fullAudio = new Howl({ src: ['src], preload: ['metadata'], html5: true,
});

When checking network resources in Safari it shows it loads the entire file.

Possible Solution

No response

Context

No response

Howler.js Version

v2.23

Affected Browser(s)/Versiuon(s)

No response

ghostneneji commented 1 year ago

@tofolux im facing same issue here, in local dev everything works fine, but once deployed, its downloading entire file, and on every seek action it'll download an extra file. Did you resolve it?

benjaminbarbe commented 2 months ago

@tofolux @ghostneneji

It might be a bit late, but by default, Howler uses the Web Audio API when available, not HTML5 Audio. The preload option is only available for the latter.

To make preload work, you'll need to set the option: html5: true