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; }
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; }