-
Notifications
You must be signed in to change notification settings - Fork 702
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add note about CORS to examples and docs
- Loading branch information
1 parent
3f1de0c
commit e288916
Showing
5 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ new Webamp({ | |
artist: "DJ Mike Llama", | ||
title: "Llama Whippin' Intro", | ||
}, | ||
// NOTE: Your audio file must be served from the same domain as your HTML | ||
// file, or served with permissive CORS HTTP headers: | ||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
url: | ||
"https://cdn.jsdelivr.net/gh/captbaritone/webamp@43434d82cfe0e37286dbbe0666072dc3190a83bc/mp3/llama-2.91.mp3", | ||
duration: 5.322286, | ||
|
@@ -20,6 +23,9 @@ new Webamp({ | |
getPresets: async () => { | ||
// Load presets from preset URL mapping on demand as they are used | ||
const resp = await fetch( | ||
// NOTE: Your preset file must be served from the same domain as your HTML | ||
// file, or served with permissive CORS HTTP headers: | ||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | ||
"https://unpkg.com/[email protected]/weeks/week1/presets.json" | ||
); | ||
const namesToPresetUrls = await resp.json(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters