@@ -216,7 +216,7 @@ function setPercentageBoundTimeouts(el: HTMLAudioElement | HTMLVideoElement, con
216216 if ( 0 < timeUntilBoundaryEvent ) {
217217 conf . progress ! . boundaryTimeoutIds . push (
218218 setTimeout (
219- ( ) => waitAnyRemainingTimeAfterTimeout ( el , timeUntilBoundaryEvent , boundary , conf ) ,
219+ ( ) => waitAnyRemainingTimeAfterTimeout ( el , absoluteBoundaryTimeMs , boundary , conf ) ,
220220 timeUntilBoundaryEvent
221221 )
222222 ) ;
@@ -229,13 +229,13 @@ function setPercentageBoundTimeouts(el: HTMLAudioElement | HTMLVideoElement, con
229229
230230function waitAnyRemainingTimeAfterTimeout (
231231 el : HTMLAudioElement | HTMLVideoElement ,
232- timeUntilBoundaryEvent : number ,
232+ absoluteBoundaryTimeMs : number ,
233233 boundary : number ,
234234 conf : TrackingOptions
235235) {
236- if ( el . currentTime * 1000 < timeUntilBoundaryEvent ) {
237- setTimeout ( function ( ) {
238- waitAnyRemainingTimeAfterTimeout ( el , timeUntilBoundaryEvent , boundary , conf ) ;
236+ if ( el . currentTime * 1000 < absoluteBoundaryTimeMs ) {
237+ setTimeout ( ( ) => {
238+ waitAnyRemainingTimeAfterTimeout ( el , absoluteBoundaryTimeMs , boundary , conf ) ;
239239 } , 10 ) ;
240240 } else {
241241 mediaPlayerEvent ( SnowplowEvent . PERCENTPROGRESS , el , conf , { boundary : boundary } ) ;
0 commit comments