new MediaPlaybackController()
In the demo application, the MediaPlaybackController is responsible for
initiating the playback of media excerpts.
Namespaces
Methods
emotionIndexMessageListener(msg) → {undefined}
This method is called when the server fires the controller receives
a message with the address /eim/status/emotionIndex. When this
occurs, TrialData is updated with the
received emotion index, $scope#buttonDisabled
is set to false, and the slide is advanced by calling
ExperimentManager#advanceSlide.
Parameters:
| Name | Type | Description |
|---|---|---|
msg |
Object | The OSC message |
Returns:
- Type
- undefined
playbackMessageListener(msg) → {undefined}
This method is called when the server fires the controller receives
a message with the address /eim/status/playback. When this
occurs, if the message indicates that playback has begun, the page
is blacked out. If the message indicates that playback has ended,
the blackout is removed, the emotion index is requested, $scope#currentButtonLabel
is set to 'Continue', $scope#mediaHasPlayed
is set to true, and $scope#buttonDisabled
is set to true.
Parameters:
| Name | Type | Description |
|---|---|---|
msg |
Object | The OSC message |
Returns:
- Type
- undefined
requestEmotionIndex() → {undefined}
Requests the most recently recorded emotion index from the server over OSC. The message used to retrieve this value is like the following:
{
oscType: 'message',
address: '/eim/control/emotionIndex',
args: [
{
type: 'string',
value: <SESSIONNUMBER>
}
]
}
Returns:
- Type
- undefined