* Video overlays * * @api */ class FetchVideoSource extends VideoSource { /** * VideoLayer constructor. * * @param $source */ public function __construct($source) { parent::__construct($source); $this->setSource($source); } /** * Sets the source of the layer. * * @param string|FetchSourceQualifier $source The source. * * @return $this */ public function setSource($source) { if ($source instanceof FetchSourceQualifier) { $this->getSourceQualifier()->fetchUrl($source->getValue()); return $this; } $this->getSourceQualifier()->fetchUrl((string)$source); return $this; } /** * Gets the layer qualifier. * * @return FetchSourceQualifier * * @internal */ protected function getSourceQualifier() { if (! isset($this->qualifiers['source'])) { $this->qualifiers['source'] = (new FetchSourceQualifier(null))->assetType("video"); } return $this->qualifiers['source']; } }