diff --git a/aframe/src/index.js b/aframe/src/index.js index e2c0acb..84b743d 100644 --- a/aframe/src/index.js +++ b/aframe/src/index.js @@ -1,6 +1,6 @@ /* global AFRAME */ -import { fetchCampaignAd, sendOnLoadMetric, sendOnClickMetric, analyticsSession } from '../../utils/networking'; +import { fetchCampaignAd, sendOnLoadMetric, sendOnClickMetric, analyticsSession, AD_REFRESH_INTERVAL } from '../../utils/networking'; import { formats, defaultFormat, defaultStyle } from '../../utils/formats'; import { openURL } from '../../utils/helpers'; import { version } from '../package.json'; @@ -8,8 +8,6 @@ import { getV3BetaUnitInfo } from '../../utils/networking'; console.log('Zesty SDK Version: ', version); -const AD_REFRESH_INTERVAL = 30000; // 30 seconds - function getCameraHelper(callback) { const camera = document.querySelector('[camera]'); if (camera && camera.components && camera.components.camera && camera.components.camera.camera) { diff --git a/utils/networking.js b/utils/networking.js index 1bcd8ab..2d7a6ad 100644 --- a/utils/networking.js +++ b/utils/networking.js @@ -13,6 +13,7 @@ const DB_ENDPOINT = 'https://api.zesty.market/api'; //const sessionId = uuidv4(); // Prebid variables +const AD_REFRESH_INTERVAL = 15000; let prebidInit = false; let interval = null; const retryCount = 10; @@ -172,4 +173,4 @@ const analyticsSession = async (spaceId, campaignId) => { } } -export { fetchCampaignAd, sendOnLoadMetric, sendOnClickMetric, analyticsSession, getV3BetaUnitInfo }; +export { fetchCampaignAd, sendOnLoadMetric, sendOnClickMetric, analyticsSession, getV3BetaUnitInfo, AD_REFRESH_INTERVAL }; diff --git a/wonderland/src/index.js b/wonderland/src/index.js index e873575..40f7f5a 100644 --- a/wonderland/src/index.js +++ b/wonderland/src/index.js @@ -1,6 +1,6 @@ /* global WL */ -import { fetchCampaignAd, sendOnLoadMetric, sendOnClickMetric, getV3BetaUnitInfo } from '../../utils/networking'; +import { fetchCampaignAd, sendOnLoadMetric, sendOnClickMetric, getV3BetaUnitInfo, AD_REFRESH_INTERVAL } from '../../utils/networking'; import { formats, defaultFormat } from '../../utils/formats'; import { openURL } from '../../utils/helpers'; import { version } from '../package.json'; @@ -18,7 +18,6 @@ console.log('Zesty SDK Version: ', version); const formatsLink = 'https://cdn.zesty.xyz/sdk/zesty-formats.js'; const networkingLink = 'https://cdn.zesty.xyz/sdk/zesty-networking.js'; -const AD_REFRESH_INTERVAL = 30000; // 30 seconds /** * [Zesty Market](https://zesty.xyz) banner ad unit