Пример #1
0
 public function sources($sources)
 {
     foreach ($sources as $source) {
         $path = $source['src'];
         $width = $source['width'];
         $source = Source::create();
         $source->srcset($path);
         if ($width != 0) {
             $source->media("(min-width: {$width})");
         }
         $this->setChild($source);
     }
     return $this;
 }
Пример #2
0
 public function sources($sources)
 {
     $this->nest("<!--[if IE 9]><video style='display: none;'><![endif]-->");
     foreach ($sources as $source) {
         $path = $source['src'];
         $width = $source['width'];
         $source = Source::create();
         $source->srcset($path);
         if ($width != 0) {
             $source->media("(min-width: {$width})");
         }
         $this->setChild($source);
     }
     $this->nest("<!--[if IE 9]></video><![endif]-->");
     return $this;
 }