File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -988,6 +988,18 @@ shaka.ads.InterstitialAdManager = class {
988
988
} else if ( interstitial . endTime ) {
989
989
this . playoutLimitTimer_ . tickEvery ( /* seconds= */ 0.025 ) ;
990
990
}
991
+ this . adEventManager_ . listen ( this . baseVideo_ , 'seeked' , ( ) => {
992
+ const currentTime = this . baseVideo_ . currentTime ;
993
+ if ( currentTime < interstitial . startTime ||
994
+ ( interstitial . endTime && currentTime > interstitial . endTime ) ) {
995
+ if ( this . playoutLimitTimer_ ) {
996
+ this . playoutLimitTimer_ . stop ( ) ;
997
+ }
998
+ this . onEvent_ (
999
+ new shaka . util . FakeEvent ( shaka . ads . Utils . AD_SKIPPED ) ) ;
1000
+ basicTask ( ) ;
1001
+ }
1002
+ } ) ;
991
1003
}
992
1004
993
1005
@@ -1287,6 +1299,13 @@ shaka.ads.InterstitialAdManager = class {
1287
1299
this . video_ . currentTime = newPosition ;
1288
1300
}
1289
1301
} ) ;
1302
+ this . adEventManager_ . listen ( this . baseVideo_ , 'seeked' , ( ) => {
1303
+ const currentTime = this . baseVideo_ . currentTime ;
1304
+ if ( currentTime < interstitial . startTime ||
1305
+ ( interstitial . endTime && currentTime > interstitial . endTime ) ) {
1306
+ this . lastOnSkip_ ( ) ;
1307
+ }
1308
+ } ) ;
1290
1309
}
1291
1310
} catch ( e ) {
1292
1311
if ( ! this . playingAd_ ) {
You can’t perform that action at this time.
0 commit comments