Skip to content

Commit

Permalink
feat(FEC-11666): Primary + Redirect token reports (#6)
Browse files Browse the repository at this point in the history
fire `SOURCE_URL_SWITCHED` event with the original URL and the updated one

Depends on kaltura/playkit-js#613

Solves FEC-11166
  • Loading branch information
yairans committed Nov 2, 2021
1 parent 756cf4c commit a440dd3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/broadpeak.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ class BroadPeak extends BasePlugin {
_getSource(playbackUrl: string): void {
this.session.getURL(playbackUrl).then(result => {
if (!result.isError()) {
this.logger.debug('getUrl response', result.getURL());
this.sourceChangeCallback(result.getURL());
const updatedUrl = result.getURL();
this.logger.debug('getUrl response', updatedUrl);
this.sourceChangeCallback(updatedUrl);
this.dispatchEvent(this.player.Event.SOURCE_URL_SWITCHED, {originalUrl: playbackUrl, updatedUrl});
this._srcPromise.resolve();
} else {
this.logger.error('getUrl failed', result.getErrorCode(), result.getErrorMessage());
Expand Down

0 comments on commit a440dd3

Please sign in to comment.