You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/curated/10_Create_Audio.js
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,16 @@ function setup() {
20
20
noCanvas();
21
21
22
22
// 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.'
0 commit comments