Show:

I am the SubtitlesController. I am responsible for managing all the subtitles in the current HypervideoModel.

Methods

deleteOverlay

(
  • overlay
)

I am the central function for deleting an overlay. I call all other methods necessary to delete it.

Parameters:

initController

()

I tell all subtitles in the HypervideoModel/overlays attribute to render themselves into the DOM.

initSubtitles

() private

I first empty all DOM elements, and then ask all subtitles of the current data model, to append new DOM elements. I am also responsible for displaying the captions button & choose menu based on subtitle availability

toggleEditMode

(
  • editMode
  • oldEditMode
)

I react to a change in the global state "editMode".

When we enter the editMode "overlays", I prepare all overlays and the editor interface elements.

When leaving the editMode "overlays", I restore them.

Parameters:

updateStatesOfSubtitles

(
  • currentTime
)

I am the central method for coordinating the time-based state of the subtitles. I switch them active or inactive based on the current time.

Parameters: