Vide icon indicating copy to clipboard operation
Vide copied to clipboard

automatically define poster type if posterpath contains extension

Open sergeykaul opened this issue 10 years ago • 1 comments

Hi Ilya, A possible draft is inserted below. Thank you.

// Get a poster path
poster = vide.path;
if (typeof vide.path === 'object') {
  if (vide.path.poster) {
    poster = vide.path.poster;

//------------////////////////////////////////////////////////////////// var extpos = poster.lastIndexOf('.'); if (extpos > 0){ var ext = poster.substring(extpos+1); if ((ext === 'jpeg')||(ext === 'jpg')||(ext === 'png')||(ext === 'gif')){ vide.settings.posterType = ext; } } //------------///////////////////////////////////////////////////////// } else { if (vide.path.mp4) { poster = vide.path.mp4; } else if (vide.path.webm) { poster = vide.path.webm; } else if (vide.path.ogv) { poster = vide.path.ogv; } } }

sergeykaul avatar May 11 '15 05:05 sergeykaul

What is about a pull request? https://github.com/VodkaBears/Vide/blob/master/CONTRIBUTING.md

vodkabears avatar May 12 '15 13:05 vodkabears