From c1c8b42f96c2bb695fbc435bf5a2750fb501f6e8 Mon Sep 17 00:00:00 2001 From: Raphael Levin Date: Thu, 27 Jun 2024 11:58:56 +0200 Subject: [PATCH] fix lint in examples/utils.js --- examples/src/utils.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/src/utils.js b/examples/src/utils.js index fca6255b..b268d84c 100644 --- a/examples/src/utils.js +++ b/examples/src/utils.js @@ -1,4 +1,6 @@ +//eslint-disable-next-line import { VASTClient, VASTTracker } from '@dailymotion/vast-client'; + const mainContent = 'https://dmplayer.storage.googleapis.com/tech_test/midnight_sun_720p.mp4'; const videoPlayer = document.getElementById('myVideo'); @@ -45,6 +47,7 @@ export const parsePreroll = async () => { try { return vastClient.get(VAST); } catch (error) { + // eslint-disable-next-line no-console console.error(error); } }; @@ -165,7 +168,7 @@ const handleClickTrackers = (e) => { /** * Send companion click trackers using the vastTracker */ -const handleCompanionClickTrackers = (e) => { +const handleCompanionClickTrackers = () => { if (!companionVastTracker) { return; } @@ -304,11 +307,11 @@ const displayVariation = (variationData) => { return null; } variationImg.src = imgUrl; - variationImg.style.height = variation.assetHeight + 'px'; - variationImg.style.assetWIdth = variation.assetWidth + 'px'; + variationImg.style.height = `${variation.assetHeight}px`; + variationImg.style.assetWIdth = `${variation.assetWidth}px`; variationContainer.style.display = 'block'; - variationContainer.style.width = variation.width + 'px'; - variationContainer.style.height = variation.height + 'px'; - variationImg.style.maxWidth = variation.expandedWidth + 'px'; - variationImg.style.maxHeight = variation.expandedHeight + 'px'; + variationContainer.style.width = `${variation.width}px`; + variationContainer.style.height = `${variation.height}px`; + variationImg.style.maxWidth = `${variation.expandedWidth}px`; + variationImg.style.maxHeight = `${variation.expandedHeight}px`; };