Skip to content

Commit

Permalink
fix(FEC-10598): add streamId to PKAdOptions (#77)
Browse files Browse the repository at this point in the history
Taking the value of streamId from the SDK's LOADED event and adding it to PKAdOptions.
Solves FEC-10598.
  • Loading branch information
SivanA-Kaltura authored Aug 12, 2021
1 parent af17cd5 commit f7487c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ima-dai.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class ImaDAI extends BasePlugin implements IAdsControllerProvider, IEngineDecora
_ignorePreroll: boolean;
_queue: ImaDAIEventQueue;
_firstPlay: boolean;
_streamId: string;

/**
* an object containing all delayed events from our SDK for IMA DAI events.
Expand Down Expand Up @@ -464,6 +465,7 @@ class ImaDAI extends BasePlugin implements IAdsControllerProvider, IEngineDecora

_onLoaded(event: Object): void {
const streamData = event.getStreamData();
this._streamId = streamData.streamId;
this.logger.debug('Stream loaded', streamData);
this._resolveLoad(streamData.url);
}
Expand Down Expand Up @@ -631,6 +633,7 @@ class ImaDAI extends BasePlugin implements IAdsControllerProvider, IEngineDecora
adOptions.bumper = false;
adOptions.inStream = true;
adOptions.linear = true;
adOptions.streamId = this._streamId;
return adOptions;
}

Expand Down

0 comments on commit f7487c5

Please sign in to comment.