Skip to content

Commit

Permalink
Add crossOrigin field to HTML5 audio event
Browse files Browse the repository at this point in the history
To support service worker range requests, as discussed:

GoogleChrome/workbox#1663 (comment)
  • Loading branch information
devappd committed Dec 25, 2021
1 parent f598d6e commit 944b795
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion music_html5.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ static int MusicHTML5_Open(const SDL_AudioSpec *spec)
// Data
////////////////////////////////////////////////////////////

player: new Audio(),
player: (function() {
const newPlayer = new Audio();
// TODO: Make this configurable
newPlayer.crossOrigin = 'anonymous';
return newPlayer;
})(),

blob: {
// URL.createObjectURL(...): numUses (int)
Expand Down

0 comments on commit 944b795

Please sign in to comment.