Skip to content

Commit a2a1ede

Browse files
committed
fix documentation error
1 parent d43acd6 commit a2a1ede

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ web audio API player is published to the [npm registry](https://npm.im/web-audio
2727

2828
## documentation
2929

30-
This player has two modes, PLAYER_MODE_AUDIO which uses the audio element to load sounds via the audio element and PLAYER_MODE_FETCH to load sounds via the web audio API. Here are some of the differences between the two:
30+
This player has two modes, PLAYER_MODE_AUDIO which uses the audio element to load sounds via the audio element and PLAYER_MODE_AJAX to load sounds via the web audio API. Here are some of the differences between the two:
3131

32-
### the web audio API (PLAYER_MODE_FETCH)
32+
### the web audio API (PLAYER_MODE_AJAX)
3333

3434
* No support for streaming
3535
* Files get loaded using fetch, the loading progress is in percent and it is a single value between 0 and 100 percent loaded
@@ -55,7 +55,7 @@ If you use this library, the difference is only how the sound (song) gets loaded
5555

5656
It depends on what you intend to build.
5757

58-
If you build a game where you have a lot (of small sounds) that get (pre-)loaded and maybe cached but played later at some time after they finished loading, use PLAYER_MODE_FETCH. It's progress is easier to understand, because when the loading progress of the sound has reached 100% you know it can be played. To display the loading progress a simple [HTML progress element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress) is enough.
58+
If you build a game where you have a lot (of small sounds) that get (pre-)loaded and maybe cached but played later at some time after they finished loading, use PLAYER_MODE_AJAX. It's progress is easier to understand, because when the loading progress of the sound has reached 100% you know it can be played. To display the loading progress a simple [HTML progress element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress) is enough.
5959

6060
If you build a music player, use the PLAYER_MODE_AUDIO as you might to want to start playing the sound (song) as quickly as possible and don't care if it has fully loaded yet as long as the part that has been loaded is enough to play the song until the end (while the rest of it is being streamed from the server in the background). To display the time range(s) that have been loaded you could for example use a [2D canvas element](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D).
6161

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-audio-api-player",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "web audio api player",
55
"keywords": [
66
"web",

0 commit comments

Comments
 (0)