Get VideoClicks DomElement

@return \DOMElement
348027
protected function getVideoClicksDomElement()
    {
        // create container
        if (!empty($this->videoClicksDomElement)) {
            return $this->videoClicksDomElement;
        }
        
        $this->videoClicksDomElement = $this->linearCreativeDomElement->getElementsByTagName('VideoClicks')->item(0);
        if (!empty($this->videoClicksDomElement)) {
            return $this->videoClicksDomElement;
        }
        
        $this->videoClicksDomElement = $this->linearCreativeDomElement->ownerDocument->createElement('VideoClicks');
        $this->linearCreativeDomElement->firstChild->appendChild($this->videoClicksDomElement);
        
        return $this->videoClicksDomElement;
    }
334385
private function getPromotion()
    {
        $promotion = [];
        $promotion_area = $this->_parser->find('.promotional-video', 0);
        if ($promotion_area) {
            foreach ($promotion_area->find('.video-list-outer') as $v) {
                $temp = [];

                $link_area = $v->find('a', 0);
                $temp['title'] = $this->getPromotionTitle($link_area);
                $temp['link'] = $this->getPromotionLink($link_area);

                $promotion[] = $temp;
            }
        }

        return $promotion;
    }
1017218
private function getVideo($videoId)
    {
        if (!array_key_exists($videoId, $this->videos)) {
            $options = new VideoRequestParameters();
            $options->setIncludeCustomMetadata(true);
            $this->videos[$videoId] = $this->client->getVideo($this->vmId, $videoId, $options);
        }

        return $this->videos[$videoId];
    }
678167
private function getMediaTypes()
    {
        $counter = 1;

        $types = [];
        $types[$counter++] = 'None';
        $types[$counter++] = 'File';
        $types[$counter++] = 'Image';
        $types[$counter++] = 'Video';

        return $types;
    }
994444
public function toBeClickable()
    {
        $this->wait()->until(WebDriverExpectedCondition::elementToBeClickable($this->elementFinder->getSearchCriteria()));

        return $this;
    }
1347032
public function getEmbed()
    {
        $owner = $this->owner;
        $title = $owner->EmbedTitle;
        $class = $owner->EmbedClass;
        $type = $owner->EmbedType;
        $template = $this->template;
        $embedHTML = $owner->EmbedHTML;
        $sourceURL = $owner->EmbedSourceURL;
        $templates = [];
        if ($type) {
            $templates[] = $template . '_' . $type;
        }
        $templates[] = $template;
        if (SSViewer::hasTemplate($templates)) {
            return $owner->renderWith($templates);
        }
        switch ($type) {
            case 'video':
            case 'rich':
                $html = HTMLTag::create($embedHTML, 'div');
                break;
            case 'link':
                $html = HTMLTag::create($title, 'a')->setAttribute('href', $sourceURL);
                break;
            case 'photo':
                $html = HTMLTag::create($sourceURL, 'img')->setAttribute([
                    'width' => $this->Width,
                    'height' => $this->Height,
                    'alt' => $title
                ]);
                break;
        }
        return $html->setClass($class);
    }
1369818
public function getElement()
    {
        $this->startCommentBlock();
        foreach ($this->description as $line) {
            $this->addLine($line);
        }
        $this->addBlankLine();

        if (count($this->var_types) > 0) {
            $type_ltgh = max(array_map('mb_strlen', $this->var_types));
            $var_ltgh = max(array_map('mb_strlen', array_keys($this->var_types)));
            foreach ($this->var_types as $name => $type) {
                $type = str_pad($type, $type_ltgh);
                $param = str_pad($name, $var_ltgh);
                $this->addLine('@param '.$type.'$'.$param.' '.$this->var_descriptions[$name]);
            }
            $this->addBlankLine();
        }

        if (count($this->params) > 0) {
            $params_ltgh = array_map('strlen', array_keys($this->params));
            foreach ($this->params as $param => $value) {
                $this->addLine('@'.str_pad($param, max($params_ltgh)).' '.$value);
            }
        }

        $this->endCommentBlock();
        return $this->lines;
    }
377156
private function getVideoExtensionConstant()
    {
        $retour = [];
        if (empty($this->const_vdeoExt)) {
            $constants = $this->getConstants();
            foreach ($constants as $key => $constant) {
                $pos = strpos($key, 'EXT_VDEO');
                if ($pos !== false) {
                    $retour[$key] = $constant;
                }
            }
            $this->const_vdeoExt = $retour;
        } else {
            $retour = $this->const_vdeoExt;
        }
        return $retour;
    }
760216
public function renderVideo()
    {
        $iframe = \CHtml::openTag(
            'iframe',
            array(
                'height'          => $this->height,
                'width'           => $this->width,
                'src'             => $this->source,
                'allowfullscreen' => $this->allowFullScreen ? 'allowfullscreen' : null,
                'frameborder'     => 0,
            )
        );
        $iframe .= \CHtml::closeTag('iframe');
        return \CHtml::tag('div', $this->htmlOptions, $iframe);
    }
328315
public function generate(): array
    {
        // create temporay directory
        $tempDir = new Tempdir('sprite');
        $tempDir->addPlugin(new ListFiles);

        // get basic info about video
        $ffprobe  = FFProbe::create()->format($this->getSource());
        $duration = (float)$ffprobe->get('duration');

        // check if sample rate is high enough to reach desired minimum amount of thumbnails
        if ($duration <= $this->getMinThumbs()) {
            // we only have a 1 second resolution, so we can't get lower than 1 obviously
            $this->setRate(1);
        } else {
            if ($duration / $this->getRate() < $this->getMinThumbs()) {
                // sample rate too high, let's adjust rate a little
                $this->setRate((int)floor($duration / $this->getMinThumbs()));
            }
        }

        $this->thumbnailer
            ->setSource($this->getSource())
            ->setWidth($this->getWidth())
            ->setDestination($tempDir->getPath());

        // capture images to tempdir
        for ($i = 0; $i <= $duration; $i += $this->getRate()) {
            $this->thumbnailer->run($i, (int)floor($i / $this->getRate()));
        }

        if (!empty($this->outputImageDirectory)) {
            foreach ($tempDir->listFiles() as $image) {
                copy($tempDir->getPath() . $image['path'], $this->outputImageDirectory . $image['basename']);
            }
        }

        // combine all images to one sprite with quadratic tiling
        $gridSize   = ceil(sqrt(count($tempDir->listFiles())));
        $firstImage = Image::make(sprintf('%s/0001.jpg', $tempDir->getPath()));
        $spriteFile = sprintf('%s/%s.jpg',
            $this->getOutputDirectory(),
            $this->getPrefix()
        );

        $spriteUrl = empty($this->getUrlPrefix())
            ? basename($spriteFile)
            : sprintf('%s/%s', $this->getUrlPrefix(), basename($spriteFile));

        $cmd = sprintf('montage %1$s/*.jpg -tile %2$dx -geometry %3$dx%4$d+0+0 %5$s',
            $tempDir->getPath(),
            $gridSize,
            $firstImage->width(),
            $firstImage->height(),
            $spriteFile
        );

        $proc = new Process($cmd);
        $proc->run();

        if (!$proc->isSuccessful()) {
            throw new \RuntimeException($proc->getErrorOutput());
        }

        // create WebVTT output
        $vttFile = sprintf('%s/%s.vtt',
            $this->getOutputDirectory(),
            $this->getPrefix()
        );

        $vtt      = new WebvttFile();
        $numFiles = count($tempDir->listFiles());

        for ($i = 0; $i < $numFiles; $i++) {
            $start = $i * $this->getRate();
            $end   = ($i + 1) * $this->getRate();
            $x     = ($i % $gridSize) * $firstImage->width();
            $y     = floor($i / $gridSize) * $firstImage->height();

            $vtt->addCue(new WebvttCue(
                    $this->secondsToCue($start),
                    $this->secondsToCue($end),
                    sprintf('%s#xywh=%d,%d,%d,%d',
                        $spriteUrl,
                        $x,
                        $y,
                        $firstImage->width(),
                        $firstImage->height()
                    )
                )
            );
        }

        $vtt->build();
        $vtt->save($vttFile);

        return [
            'vttFile' => $vttFile,
            'sprite'  => $spriteFile,
        ];
    }
567359
public function getLocationOnScreenOnceScrolledIntoView()
    {
        $location = $this->executor->execute(
            DriverCommand::GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW,
            [':id' => $this->id]
        );

        return new WebDriverPoint($location['x'], $location['y']);
    }
1256747
public function getVideoExtensions( $default = null ) {

		$prop = $this->properties[ self::PROP_EXTENSION_VIDEO ];

		if( isset( $prop ) && strlen( $prop ) > 0 ) {

			return preg_split( "/,/", $prop );
		}

		return $default;
	}
492853
public function getVideoInfos()
    {
        if (!$this->exists()) {
            return false;
        }
        $vid = new \finfo(FILEINFO_MIME_TYPE);
        $data = $vid->file($this->getRealPath());
        return $data;
    }
1318668
public function getVideoTitle()
    {
        $url = trim($this->value);
        return VideoLink::create()->setValue($url)->Title;
    }
432203
public function videosTop($options = [])
    {
        $availableOptions = ['limit', 'offset', 'game', 'period'];

        $query = [];

        //  Filter the available options
        foreach ($availableOptions as $option) {

            if (isset($options[ $option ])) {

                $query[ $option ] = $options[ $option ];
            }
        }

        $parameters = $this->getDefaultHeaders();
        $parameters[ 'query' ] = $query;

        $response = $this->client->get('/kraken/videos/top', $parameters);

        return $response->json();
    }
468571
protected function loadMessages()
    {
        $messages = Collection::make($this->event->get('messaging'))->filter(function ($msg) {
            return isset($msg['message']) && isset($msg['message']['attachments']) && isset($msg['message']['attachments']);
        })->transform(function ($msg) {
            $message = new IncomingMessage(Video::PATTERN, $msg['sender']['id'], $msg['recipient']['id'], $msg);
            $message->setVideos($this->getVideoUrls($msg));

            return $message;
        })->toArray();

        if (count($messages) === 0) {
            $messages = [new IncomingMessage('', '', '')];
        }

        $this->messages = $messages;
    }
1013206
public function getAsPreviewHTML()
    {
        $html = "";
        foreach ($this->getChildren() as $child) {
            $html .= $child->getAsPreviewHTML();
        }

        return $html;
    }