Skip to content

Commit

Permalink
fix(Ads): Fix usage of ENABLE-SKIP-AFTER and ENABLE-SKIP-FOR (#7677)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Nov 27, 2024
1 parent b86e125 commit 8048d02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ads/interstitial_ad_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,14 +981,14 @@ shaka.ads.InterstitialAdManager = class {
const skipControl = dataAsJson['SKIP-CONTROL'];
if (skipControl) {
const enableSkipAfterValue = skipControl['ENABLE-SKIP-AFTER'];
if (enableSkipAfterValue instanceof Number) {
if ((typeof enableSkipAfterValue) == 'number') {
skipOffset = parseFloat(enableSkipAfterValue);
if (isNaN(enableSkipAfterValue)) {
skipOffset = isSkippable ? 0 : null;
}
}
const enableSkipForValue = skipControl['ENABLE-SKIP-FOR'];
if (enableSkipForValue instanceof Number) {
if ((typeof enableSkipForValue) == 'number') {
skipFor = parseFloat(enableSkipForValue);
if (isNaN(enableSkipForValue)) {
skipFor = null;
Expand Down

0 comments on commit 8048d02

Please sign in to comment.