Esempio n. 1
0
 /**
  * Function to download the thumbnail file
  *
  * @param   string|null             Possible name, to use to store the file
  * @return  \Th\FileDownloader      The file download instance
  */
 public function downloadThumb($name = null)
 {
     // call the parent
     $downloader = parent::downloadThumb($name);
     // if there is a downloader, return it
     if (!is_null($downloader)) {
         return $downloader;
     }
     // no downloader available, so set a low res thumbnail to make the
     // thumb available still
     $this->thumbnail = '//img.youtube.com/vi/' . $this->id() . '/0.jpg';
     // set the video to be low res
     $this->lowRes = true;
     // done, return the downloader
     return parent::downloadThumb($name);
 }
Esempio n. 2
0
 /**
  * Constructor
  * 
  * @param   string              The video url
  */
 public function __construct($url)
 {
     parent::__construct($url);
 }