Open sergeykaul opened 9 years ago
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; } } }
What is about a pull request? https://github.com/VodkaBears/Vide/blob/master/CONTRIBUTING.md
Hi Ilya, A possible draft is inserted below. Thank you.
//------------////////////////////////////////////////////////////////// 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; } } }