Skip to content

Commit

Permalink
fix(FEC-10265): Use adUiElement instaed of deprecated setClickElement (
Browse files Browse the repository at this point in the history
…#56)

Issue: setClick is deprecated and add the element on adUiElement of StreamManager constactor change the DOM under IMA container.
Solution:  change to adUiElmenet and set the cover on the top of container which will handle the play/pause correctly even IMA set DOM element on the container.
  • Loading branch information
Yuvalke authored Feb 15, 2021
1 parent ea76bca commit 0a7fccd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/assets/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.playkit-dai-ads-cover {
position: relative;
position: absolute;
cursor: pointer;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
Expand Down
3 changes: 1 addition & 2 deletions src/ima-dai.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,7 @@ class ImaDAI extends BasePlugin implements IAdsControllerProvider, IEngineDecora
_initStreamManager(): void {
if (!this._streamManager) {
this.logger.debug('Create stream manager');
this._streamManager = new this._sdk.api.StreamManager(this.player.getVideoElement());
this._streamManager.setClickElement(this._adsContainerDiv);
this._streamManager = new this._sdk.api.StreamManager(this.player.getVideoElement(), this._adsContainerDiv);
this._attachStreamManagerListeners();
}
}
Expand Down

0 comments on commit 0a7fccd

Please sign in to comment.