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 committed Nov 27, 2024
1 parent 069abbb commit dc3697d
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 @@ -954,14 +954,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 dc3697d

Please sign in to comment.