Module: standardPlayer/PageGroupEventContext

This context provides methods to handle events in a component group 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> bind(component, groupId, eventName)

Binds a component method to a custom group event.

Preconditions:


  • The stated component must provide a method according to custom event.

  • On callback the method receives the following arguments:

    • {object} event The event object

    • {object} id The id of the sender

    • {object} Custom data



Callback time point:


  • When a fireCustomMessage with the same event and group-id is fired.

Parameters:
Name Type Description
component Component

The component that provides the specified callback method.

groupId string

The group id.

eventName function

The custom event name.

<inner> fire(component, groupId, eventName, data)

Fires a custom group event.

The event will dispatch all custom event methods with the same event and group-id.

Parameters:
Name Type Description
component Component

The component that fires the event.

groupId string

The group id.

eventName function

The custom event name.

data object

Custom data the will be send with the event