Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring #94

Merged
merged 1 commit into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/ads-manager.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ads-manager.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/ads-manager.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/ads-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const AdsManager = function(adContainer) {
this._handleVideoSlotLoadedMetaData = this.handleVideoSlotLoadedMetaData.bind(this);
this._handleVideoSlotEnded = this.handleVideoSlotEnded.bind(this);

this.SUPPORTED_CREATIVE_VPAID_VERSION_MIN = 2;
this.MIN_VPAID_VERSION = 2;

this._hasLoaded = false;
this._hasError = false;
Expand Down Expand Up @@ -610,8 +610,8 @@ AdsManager.prototype.removeCallbacksForCreative = function(eventCallbacks) {
};
AdsManager.prototype.creativeAssetLoaded = function() {
const checkVPAIDMinVersion = () => {
const c = this.handshakeVersion(this.SUPPORTED_CREATIVE_VPAID_VERSION_MIN.toFixed(1));
return c ? parseFloat(c) < this.SUPPORTED_CREATIVE_VPAID_VERSION_MIN ? (this.onAdError('Only support creatives with VPAID version >= ' + this.SUPPORTED_CREATIVE_VPAID_VERSION_MIN.toFixed(1)), !1) : !0 : (this.onAdError('Cannot get VPAID version from the creative'), !1)
const c = this.handshakeVersion(this.MIN_VPAID_VERSION.toFixed(1));
return c ? parseFloat(c) < this.MIN_VPAID_VERSION ? (this.onAdError('Only support creatives with VPAID version >= ' + this.MIN_VPAID_VERSION.toFixed(1)), !1) : !0 : (this.onAdError('Cannot get VPAID version from the creative'), !1)
};
if (function(that) {
const c = that.checkVPAIDInterface('handshakeVersion initAd startAd stopAd subscribe unsubscribe getAdLinear'.split(' '));
Expand Down