response
Type: objectExamples
var audioQuestion = myLearnosityApp.question('60001');
audioQuestion.response.getMetadata();
audioQuestion.response.setMetadata({ /* Insert response metadata here */ });
audioQuestion.response.play();
audioQuestion.response.pause();
audioQuestion.response.resume();
audioQuestion.response.seek(50);
audioQuestion.response.stop();
audioQuestion.response.audioQualityCheck();
audioQuestion.response.volume.get();
audioQuestion.response.volume.set(0.5);
Properties
-
audioQualityCheck function
Important Audio question only.
Returns an
object
stating the quality of the recording orfalse
if there was no response recorded in the current session.The method accepts an optional qualityParameters object that allows the client to override the default parameters used to assess the audio quality.
Returns:false
| AudioQuality -
getMetadata function
Gets the response metadata set for this question.
Returns:undefined
| Metadata -
pause function
Important Audio or Video question only.
Pause the user's response.
-
play function
Important Audio or Video question only.
Play the user's response.
-
resume function
Important Audio or Video question only.
Resume the user's response.
-
seek function
Important Audio or Video question only.
Go to a point in the user's response. Takes the position in percentage of the audio or video duration.
-
setMetadata function
Sets the given response metadata for this question.
The metadata passed into this method may be anything that should be stored with the response object. A response must already exist before this method is called; if not, the metadata will not be set and an error will be logged.
Returns
true
if the given metadata was able to be set for this question's response; otherwisefalse
.Returns: boolean -
stop function
Important Audio or Video question only.
Stop playing the user's response.
-
volume object