InteractionController Module
I am the InteractionController.
I listen to key events which happen on window.document & and scroll events on the 'ViewVideo' element. When the keycode is in the local map keyBindings, I call the bound method.
Item Index
Methods
initController
()
I set the event listener which triggers the appropriate event-handler.
Returns:
CallExpression or undefined
interfaceDown
()
I {{#crossLink "ViewVideo/slidePositionDown:method"}}slide the video view down{{#crossLink}}.
In case the annotation position is set to 'bottom' and no annotation has been opened before, I try to {{#crossLink "Annotation/openAnnotation:method"}}open the first annotation{{/crossLink}}.
interfaceUp
()
I {{#crossLink "ViewVideo/slidePositionUp:method"}}slide the video view up{{#crossLink}}.
In case the annotation position is set to 'top' and no annotation has been opened before, I try to {{#crossLink "Annotation/openAnnotation:method"}}open the first annotation{{/crossLink}}.
spaceKey
()
When the space key is pressed, I toggle play / pause in the player
xKey
()
When the "x" key is pressed, I change the xKey state so other modules can listen to the change