Skip to content

Commit

Permalink
fix(FEC-9086): the screen blinking and endless spinner displayed when…
Browse files Browse the repository at this point in the history
… replay is ended (#10)

seek the already played ads via the engine directly instead of via the player which [manipulates](https://github.com/kaltura/playkit-js/blob/272a10f08976f850d35038c46d36e5f709008522/src/player.js#L657) the current time target on ended
  • Loading branch information
yairans authored May 14, 2019
1 parent c716dc7 commit 1abaef0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ima-dai.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import './assets/style.css';

const ADS_CONTAINER_CLASS: string = 'playkit-dai-ads-container';
const ADS_COVER_CLASS: string = 'playkit-dai-ads-cover';
const FIRST_FRAME_LENGTH: number = 0.5;

/**
* The ima-dai plugin.
Expand Down Expand Up @@ -275,7 +274,7 @@ class ImaDAI extends BasePlugin implements IAdsControllerProvider, IEngineDecora
});
if (currentCuePoint) {
this.logger.debug('Ad already played - skipped');
this.player.currentTime += FIRST_FRAME_LENGTH;
this._engine.currentTime = currentCuePoint.end;
}
});
if (this.player.config.playback.preferNative.hls) {
Expand Down

0 comments on commit 1abaef0

Please sign in to comment.