Show:

I am the ViewVideo. I am the most important user interface component. I contain all the visual elements of the hypervideo player, like the main <video> element, the containers for overlays, videolinks and annotations, their respective timelines and the player control elements.

When I am initialized, I prepare all DOM elements and set up their event listeners.

Methods

adjustHypervideo

(
  • animate
)

I re-adjust the CSS of the main video and its container (without surrounding elements). I try to fill the available space to fit the video elements.

Also I try to animate the transition of the dimensions smoothly, when my single parameter is true.

Parameters:

adjustLayout

()

I am a central method of the ViewVideo. I rearrange all my child elements. Their position is defined by the global state "editMode" and by the various "hvconfig[...]" states, as well as the current width and height of the display area.

I am called from many places, whenever one of the defining variables (see above) changes.

changeSlidePosition

(
  • newState
  • oldState
)

I am called when the global state "slidePosition" changes.

This state is either "top", "middle" or "bottom", and indicates, which area has the most visual weight. The Hypervideocontainer is always displayed in the middle (in different sizes), while the annotations and the video links can change their position (top or bottom), as defined in the hypervideo's _index.json.

Parameters:

changeViewSize

(
  • arrayWidthAndHeight
)

I am called when the global state "viewSize" changes (which it does after a window resize, and one time during app start, after all create methods of interface modules have been called).

Parameters:

  • arrayWidthAndHeight Array

closestToOffset

(
  • collection
  • position
)

I return the closest element from a given position {top: XX, left: XX} in a collection.

Parameters:

create

()

I am called from Interface/create(). I update my local state from the global state variables and append my elements in the DOM tree.

destroyScrollAnimations

(
  • callback
)

Destroy Scroll Animations

Parameters:

  • callback Method

enterAnnotationMode

()

I am called when the app enters the editMode "annotations"

enterAudioMode

()

I am called when the app enters the editMode "audio"

enterLinkMode

()

I am called when the app enters the editMode "links"

enterOverlayMode

()

I am called when the app enters the editMode "overlays"

enterPreviewMode

()

I am called when the app enters the editMode "preview"

initEditMode

()

I prepare the several UI elements, when one of the editMode is started.

initScrollAnimations

()

Init Scroll Animations (using ScrollMagic & TweenMax)

leaveEditMode

()

I restore the UI elements to the view mode with no editing features activated.

onViewSizeChanged

() private

I react to changes in the global state viewSizeChanged. The state changes after a window resize event and is meant to be used for performance-heavy operations.

resetEditMode

()

I am called, whenever the editMode changes, to restore the default timeline.

showDetails

(
  • mode
)

This method is used to show the details (aka the content) of either the annotation or of the videolink. Because they can change their position ("top" or "bottom"), this method checks first were they are placed according to the current configuration, and slides the display area up or down respectively.

Parameters:

slidePositionDown

()

This method changes the global state "slidePosition" from "top" to "middle" or from "middle" to "bottom".

slidePositionUp

()

This method changes the global state "slidePosition" from "bottom" to "middle" or from "middle" to "top".

toggleConfig_annotationPreviewVisible

(
  • newState
  • oldState
)

I am called when the global state "hv_config_annotationPreviewVisible" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_annotationsPosition

(
  • newState
  • oldState
)

I am called when the global state "hv_config_annotationsPosition" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_annotationsVisible

(
  • newState
  • oldState
)

I am called when the global state "hv_config_annotationsVisible" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_autohideControls

(
  • newState
  • oldState
)

I am called when the global state "hv_config_autohideControls" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_captionsVisible

(
  • newState
  • oldState
)

I am called when the global state "hv_config_captionsVisible" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_overlaysVisible

(
  • newState
  • oldState
)

I am called when the global state "hv_config_overlaysVisible" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_slidingMode

(
  • newState
  • oldState
)

I am called when the global state "hv_config_slidingMode" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_slidingTrigger

(
  • newState
  • oldState
)

I am called when the global state "hv_config_slidingTrigger" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_theme

(
  • newState
  • oldState
)

I am called when the global state "hv_config_theme" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleConfig_videolinksVisible

(
  • newState
  • oldState
)

I am called when the global state "hv_config_videolinksVisible" changes.

This is a configuration option (saved in the hypervideo's index.json entry).

Parameters:

toggleEditMode

(
  • editMode
)

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

Parameters:

Returns:

toggleFullscreen

(
  • aBoolean
)

I react to a change of the global state "fullscreen".

Parameters:

toggleFullscreenState

()

Toggle internal Fullscreen State

toggleGrid

(
  • visible
)

Toggles the visibility of a vertical grid based on the positions of all timeline items in each category (Videolinks, Overlays, Annotations). This grid is used to allow snapping items to positions of other timeline items.

Parameters:

toggleNativeFullscreenState

()

Toggle (Enter / Exit) native Fullscreen State

toggleSidebarOpen

(
  • opened
)

I am called when the global state "sidebarOpen" changes.

Parameters:

toggleVideoWorking

(
  • working
)

Toggles the visibility of the working (loading) indicator.

Parameters:

toggleViewMode

(
  • viewMode
)

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

Parameters:

toogleUnsavedChanges

(
  • aBoolean
)

I react to a change of the global state "unsavedChanges".

Parameters:

Attributes

AnnotationContainer

HTMLElement

I contain the AnnotationContainer element.

AnnotationPreviewContainer

HTMLElement

I contain the AnnotationPreviewContainer element.

AnnotationTiles

HTMLElement

I contain the AnnotationTiles element.

AnnotationTileSlider

HTMLElement

I contain the AnnotationTileSlider element.

AnnotationTimeline

HTMLElement

I contain the AnnotationTimeline element.

CaptionContainer

HTMLElement

I contain the CaptionContainer element.

CaptionsButton

HTMLElement

I contain the CaptionsButton element, including the list of available subtitles.

currentTime

String

I display a (formated time) string in an area of the progress bar.

duration

String

I display a (formated time) string in an area of the progress bar.

EditingOptions

HTMLElement

I contain the EditingOptions element (where e.g. the ResourcePicker is rendered).

EditPropertiesContainer

HTMLElement

I contain the EditPropertiesContainer element (where properties of an overlay/annotation/videolink can be viewed and – in the case ov overlays – changed).

ExpandButton

HTMLElement

I contain the ExpandButton element.

HypervideoContainer

HTMLElement

I contain the HypervideoContainer element.

OverlayContainer

HTMLElement

I contain the OverlayContainer element.

OverlayTimeline

HTMLElement

I contain the OverlayTimeline element.

PlayButton

HTMLElement

I contain the play button element.

PlayerProgress

HTMLElement

I contain the progress bar element.

shownDetails

String or null

This attribute controls wether the view places its visual weight on "annotations" or "videolinks", or none of the both (null).

Video

HTMLElement

I contain the Video element.

VideolinkTiles

HTMLElement

I contain the VideolinkTiles element.

VideolinkTileSlider

HTMLElement

I contain the VideolinkTileSlider element.

VideolinkTimeline

HTMLElement

I contain the VideolinkTimeline element.