mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
fix audio stop description
This commit is contained in:
parent
3f3d984a4c
commit
4b14995d4a
@ -289,7 +289,7 @@ See the `audio-keyboard-response` plugin for an example in a fuller context.
|
|||||||
```javascript
|
```javascript
|
||||||
const audio = jsPsych.pluginAPI.getAudioPlayer(filepath);
|
const audio = jsPsych.pluginAPI.getAudioPlayer(filepath);
|
||||||
|
|
||||||
audio.play();
|
audio.stop();
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Return value
|
#### Return value
|
||||||
@ -298,7 +298,7 @@ Returns nothing.
|
|||||||
|
|
||||||
#### Description
|
#### Description
|
||||||
|
|
||||||
Method that belongs to the AudioPlayer class. Stops the audio loaded into the audio buffer of the AudioPlayer instance for a particular file. If the audio is an HTML5 audio object it pauses it. If the audio is a Webaudio API object it stops it.
|
Method that belongs to the AudioPlayer class. Stops the audio loaded into the audio buffer of the AudioPlayer instance for a particular file. If the audio is an HTML5 audio object it pauses it. If the audio is a Webaudio API object it stops it. This will regenerate the audio player, allowing you to call the `play()` method upon it again.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
@ -310,7 +310,6 @@ const audio = await jsPsych.pluginAPI.getAudioPlayer('my-sound.mp3');
|
|||||||
audio.play();
|
audio.play();
|
||||||
|
|
||||||
audio.stop();
|
audio.stop();
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
See the `audio-keyboard-response` plugin for an example in a fuller context.
|
See the `audio-keyboard-response` plugin for an example in a fuller context.
|
||||||
|
Loading…
Reference in New Issue
Block a user