All Collections
Vidalytics Code Customizations
Overriding Thumbnails set by Vidalytics player
Overriding Thumbnails set by Vidalytics player
Erika Lehmann avatar
Written by Erika Lehmann
Updated over a week ago

To override the thumbnail, you will need some technical knowledge.

Overriding the custom thumbnail for the Vidalytics Player is a relatively simple 2-step process.

  1. Create new variable holding settings overrides

// 1. Create new variable holding settings overrides:


var vidalyticsCustomThumbnailOverride = {
ui: {
overlay: {
pause: {
// exit thumbnail:
source: "https://vidalytics.com/customer-support/custom-thumbnail/t/custom-pause-screen.png"
}
},
thumbnail: {
default: {
source: "https://vidalytics.com/customer-support/custom-thumbnail/t/thumbnail-desktop.png"
},
mobile: {
source: "https://vidalytics.com/customer-support/custom-thumbnail/t/thumbnail-mobile.png"
}
}
}
};
(function (v, i, d, a, l, y, t, c, s) {
y='_'+d.toLowerCase();c=d+'L';if(!v[d]){v[d]={};}if(!v[c]){v[c]={};}if(!v[y]){v[y]={};}var vl='Loader',vli=v[y][vl],vsl=v[c][vl + 'Script'],vlf=v[c][vl + 'Loaded'],ve='Embed';
if (!vsl){vsl=function(u,cb){
if(t){cb();return;}s=i.createElement("script");s.type="text/javascript";s.async=1;s.src=u;
if(s.readyState){s.onreadystatechange=function(){if(s.readyState==="loaded"||s.readyState=="complete"){s.onreadystatechange=null;vlf=1;cb();}};}else{s.onload=function(){vlf=1;cb();};}
i.getElementsByTagName("head")[0].appendChild(s);
};}

2. Pass variable to player initialization script. So assuming that your variable is named, vidalyticsCustomThumbnailOverride you would need to change t.run(a) to t.run(a, vidalyticsCustomThumbnailOverride)

// 2. Pass variable to player initialization script:


vsl(l+'loader.min.js',function(){if(!vli){var vlc=v[c][vl];vli=new vlc();}vli.loadScript(l+'player.min.js',function(){var vec=v[d][ve];t=new vec(); /* -----> HERE! ---> */ t.run(a, vidalyticsCustomThumbnailOverride);});});
})(window, document, 'Vidalytics', 'vidalytics_embed_ddC4t8ANWJtiyCUz', 'https://quick.vidalytics.com/embeds/9052_jeM/ddC4t8ANWJtiyCUz/');

You can see a working version here:

Did this answer your question?