Skip to content

Commit

Permalink
Expose eventBus.trigger via MediaPlayer API (#4550)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy authored Aug 16, 2024
1 parent 5791060 commit 2a5be5f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/streaming/MediaPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,19 @@ function MediaPlayer() {
eventBus.off(type, listener, scope);
}

/**
* Use this method to trigger an event via the eventBus {@link MediaPlayerEvents}
*
* @param {string} type - {@link MediaPlayerEvents}
* @param {object} payload - Payload of the event
* @param {Object} filters - Define a "streamId" and/or a "mediaType" for which this event is valid, e.g. {streamId, mediaType}
* @memberof module:MediaPlayer
* @instance
*/
function trigger(type, payload, filters) {
eventBus.trigger(type, payload, filters);
}

/**
* Current version of Dash.js
* @returns {string} the current dash.js version string.
Expand Down Expand Up @@ -2801,6 +2814,7 @@ function MediaPlayer() {
time,
timeAsUtc,
timeInDvrWindow,
trigger,
triggerSteeringRequest,
unregisterCustomCapabilitiesFilter,
unregisterLicenseRequestFilter,
Expand Down

0 comments on commit 2a5be5f

Please sign in to comment.