Module: standardPlayer/StageEventContext

This context provides methods to handle events in the stage scope.

To handle the differences between standard and HTML5 player, it is recommended
to take note of the following example.

Example

onCallback: function (dataTHML5, dataHTML4) {
    var data = dataHTML4 || dataTHML5;
    […]
}

Methods

<inner> bindOnAnimationControlChanged(component)

Binds a component method to the onAnimationControlChanged event that is sent by the TTKF Player.

Preconditions:


  • The stated component must provide an "onAnimationControlChanged" method.

    • {object} The event object

    • {object} animation control specific arguments

      • {boolean} pause "true" if the pause is turned on, otherwise "false"

      • {string} sender possible values are "gui" and "internal"





Callback time point:


  • On every pause/play change.

Parameters:
Name Type Description
component Component

The component that provides the specified callback method.

<inner> bindOnAudioControlChanged(component)

Binds a component method to the onAudioControlChanged event that is sent by the TTKF Player.

Preconditions:


  • The stated component must provide an "onAudioControlChanged" method.

  • On callback the method receives the following arguments:

    • {object} The event object

    • {object} audio control specific arguments

      • {boolean} audio "true" if the audio is turned on, otherwise "false"




Callback time point:


  • On every audio on/off change.

Parameters:
Name Type Description
component Component

The component that provides the specified callback method.

<inner> bindOnNavigationAccessChanged(component)

Binds a component method to the onNavigationAccessChanged event that is sent by the TTKF Player.

Preconditions:


  • The stated component must provide an "onAudioControlChanged" method.

  • On callback the method receives the following arguments:

    • {object} The event object

    • {object} access specific arguments

      • {boolean} nextPage "true" if the next page navigation function should be enabled, otherwise "false"




Callback time point:


  • On every access change of a navigation function.

Parameters:
Name Type Description
component Component

The component that provides the specified callback method.

<inner> bindOnPlayModeChanged(component)

Binds a component method to the onPlayModeChanged event that is sent by the TTKF Player.

Preconditions:


  • The stated component must provide an "onPlayModeChanged" method.
  • On callback the method receives the following arguments: *

    • {object} The event object

    • {object} play mode specific arguments

      • {string} mode possible values are "interactive", "presentation" and "film"





Callback time point:


  • On every time a play mode is set/changed.

Parameters:
Name Type Description
component Component

The component that provides the specified callback method.