Skip to content

Commit c7dd4e3

Browse files
committed
Final draft
- add aria-description - add p5 editor file upload info
1 parent c8dcf80 commit c7dd4e3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

examples/curated/10_Create_Audio.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ function setup() {
2020
noCanvas();
2121

2222
// Create audio player using path to audio file
23-
audioPlayer = createAudio("assets/piano-loop.mp3");
23+
// This can also be a URL for a public file
24+
// On the p5 Editor, a file may be uploaded to Sketch Files
25+
// by clicking the > button on the upper left, followed by the + button
26+
audioPlayer = createAudio('assets/piano-loop.mp3');
27+
28+
// Add description for assistive technologies to explain playback speed
29+
audioPlayer.attribute(
30+
'aria-description',
31+
'The playback speed of this audio player is controlled by the position of the mouse. The further to the right the mouse is, the faster the audio will play.'
32+
);
2433

2534
// Display player controls
2635
audioPlayer.showControls();

0 commit comments

Comments
 (0)