alemangui / pizzicato

Library to simplify the way you create and manipulate sounds with the Web Audio API.
https://alemangui.github.io/pizzicato/
MIT License
1.66k stars 130 forks source link

Add the ability to specify request headers when fetching via file #181

Open JamesMcClelland opened 10 months ago

JamesMcClelland commented 10 months ago

Allows headers to be sent when fetching a sound via file, used primarly for sounds stored behind an authenticated endpoint, previously was not possible. Also expandable to allow other headers to be sent to the server

new Pizzicato.Sound({
    source: 'file',
    options: { path: `http://localhost/mysound.mp3`, headers: {Authorization: `Bearer 123456`} }
});