Get anime promotion video.

@return array
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;
    }
1124922
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $video = [
            'type' => MessageType::VIDEO,
            'originalContentUrl' => $this->originalContentUrl,
            'previewImageUrl' => $this->previewImageUrl,
        ];

        if ($this->quickReply) {
            $video['quickReply'] = $this->quickReply->buildQuickReply();
        }

        $this->message[] = $video;

        return $this->message;
    }
824764
public function getJson() {
		$json = [
			'title' => $this->title,
			'author' => $this->author,
			'show_cover_pic' => $this->show_cover_pic,
			'digest' => $this->digest,
			'content_source_url' => $this->content_source_url,
		];
		if($this->manager) {
			$materialMedia = $this->thumbMaterialMedia;
			$json['thumb_media_id'] = $materialMedia->media_id;
			$json['thumb_material_media_id'] = $materialMedia->id;
			$json['content'] = $this->wechatContent;
		} else {
			$json['thumb_url'] = $this->thumbMaterial->url;
			$json['content'] = $this->content;
		}
		
		return $json;
	}
631999
private function getAnimeRole($anime_area, $staff = false)
    {
        if ($staff) {
            return $anime_area->find('small', 0)->plaintext;
        }

        return $anime_area->find('div', 0)->plaintext;
    }
1258382
private function getSynopsis($each_anime)
    {
        $synopsis = $each_anime->find('div[class="synopsis js-synopsis"]', 0)->plaintext;
        preg_match('/(No synopsis)/', $synopsis, $temp_synopsis);
        if (!$temp_synopsis) {
            $synopsis = trim(preg_replace("/([\s])+/", ' ', $synopsis));
        } else {
            $synopsis = '';
        }

        return $synopsis;
    }
1171433
public function getMovies() {
        try {
            $response = $this->_client->GETREPORT('film');
            $this->_logTraffic();
        } catch (Exception $e) {
            $this->_throwException($e, 'GETREPORT(film)');
        }
        return $response->GENERALINFOARRAY;
    }
396960
protected function get_media_types() {
		$media_types = array();
		foreach ( get_allowed_mime_types() as $mime_type ) {
			$parts = explode( '/', $mime_type );
			if ( ! isset( $media_types[ $parts[0] ] ) ) {
				$media_types[ $parts[0] ] = array();
			}
			$media_types[ $parts[0] ][] = $mime_type;
		}
		return $media_types;
	}
1050202
public static function getVideoList() {
        if (self::$_video) {
            return self::$_video;
        }

        self::$_video = self::_getList('video');

        return self::$_video;
    }
1170600
public function getMedia()
    {
        // if media was set by setMedia() use this->media
        if ($this->media) {
            return $this->media;
        }
        $mediaCollection = [];
        $media = $this->entity->getMedia();
        if (!$media) {
            return $mediaCollection;
        }
        foreach ($media as $medium) {
            $mediaCollection[] = new Media($medium, $this->locale);
        }

        return $mediaCollection;
    }
339362
public function getTitle()
    {
        if ($this->getService() == 'YouTube') {
            $data = $this->getCachedJsonResponse(
                'https://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=' .
                $this->VideoID .
                '&format=json'
            );
            if ($data && !empty($data['title'])) {
                return $data['title'];
            }
        }
        if ($this->getService() == 'Vimeo') {
            $data = $this->getCachedJsonResponse(
                'https://vimeo.com/api/v2/video/' . $this->VideoID . '.json'
            );
            if ($data && !empty($data[0]) && !empty($data[0]['title'])) {
                return $data[0]['title'];
            }
        }
    }
666981
private function getRecommendation()
    {
        $recommendation = [];
        $recommendation_area = $this->_type == 'anime' ? $this->_parser->find('#anime_recommendation', 0) : $this->_parser->find('#manga_recommendation', 0);
        if ($recommendation_area) {
            foreach ($recommendation_area->find('li.btn-anime') as $each_recom) {
                $tmp = [];

                $tmp['id'] = $this->getRecomId($each_recom);
                $tmp['title'] = $this->getRecomTitle($each_recom);
                $tmp['image'] = $this->getRecomImage($each_recom);
                $tmp['user'] = $this->getRecomUser($each_recom);

                $recommendation[] = $tmp;
            }
        }

        return $recommendation;
    }
635920
public function getIframeURL()
    {
        $info = $this->parseLink();
        if (!$info) {
            return false;
        }

        $params = $this->Config()->get('service');

        if ($this->Service == 'Vimeo') {
            $url = 'https://player.vimeo.com/video/' . $this->VideoID;
            if ($params && !empty($params[strtolower($this->Service)])) {
                $url .= '?' . http_build_query($params[strtolower($this->Service)], '', '&');
            }
            return $url;
        }
        if ($this->Service == 'YouTube') {
            $url = 'https://www.youtube.com/embed/' . $this->VideoID;
            if ($params && !empty($params[strtolower($this->Service)])) {
                $url .= '?' . http_build_query($params[strtolower($this->Service)], '', '&');
            }
            return $url;
        }
    }
1094748
public function getPlaylistVideoFeedUrl()
    {
        if ($this->getMajorProtocolVersion() >= 2) {
            return $this->getContent()->getSrc();
        } else {
            return $this->getFeedLink(Zend_Gdata_YouTube::PLAYLIST_REL)->href;
        }
    }
185461
public function getImageDetails() {
		//set default return
		$return = ['width' => 0, 'height' => 0, 'size' => 0];
		//set media path
		$sMediaPath = \Yii::$app->imagemanager->mediaPath;
		$sFileExtension = pathinfo($this->fileName, PATHINFO_EXTENSION);
		//get image file path
		$sImageFilePath = $sMediaPath . '/' . $this->id . '_' . $this->fileHash . '.' . $sFileExtension;
		//check file exists
		if (file_exists($sImageFilePath)) {
			$aImageDimension = getimagesize($sImageFilePath);
			$return['width'] = isset($aImageDimension[0]) ? $aImageDimension[0] : 0;
			$return['height'] = isset($aImageDimension[1]) ? $aImageDimension[1] : 0;
			$return['size'] = Yii::$app->formatter->asShortSize(filesize($sImageFilePath), 2);
		}
		return $return;
	}
917778
private function getAllInfo()
    {
        $data = [];
        $anime_table = $this->_parser->find('div[class="seasonal-anime js-seasonal-anime"]');
        foreach ($anime_table as $each_anime) {
            $result = [];

            $name_area = $each_anime->find('div[class=title]', 0);
            $producer_area = $each_anime->find('div[class=prodsrc]', 0);
            $info_area = $each_anime->find('.information', 0);

            $result['image'] = $this->getAnimeImage($each_anime);
            $result['id'] = $this->getAnimeId($name_area);
            $result['title'] = $this->getAnimeTitle($name_area);
            $result['genre'] = $this->getAnimeGenre($each_anime);
            $result['synopsis'] = $this->getAnimeSynopsis($each_anime);
            $result['source'] = $this->getAnimeSource($producer_area);

            if ($this->_type == 'anime') {
                $result['producer'] = $this->getAnimeProducer($producer_area);
                $result['episode'] = $this->getAnimeEpisode($producer_area);
                $result['licensor'] = $this->getAnimeLicensor($each_anime);
                $result['type'] = $this->getAnimeType($info_area);
            } else {
                $result['author'] = $this->getAnimeProducer($producer_area);
                $result['volume'] = $this->getAnimeEpisode($producer_area);
                $result['serialization'] = $this->getAnimeLicensor($each_anime);
            }

            $result['airing_start'] = $this->getAnimeStart($info_area);
            $result['member'] = $this->getAnimeMember($info_area);
            $result['score'] = $this->getAnimeScore($info_area);

            $data[] = $result;
        }

        return $data;
    }
1096881
private function getMedia($type = 'anime')
    {
        $mediaography = [];
        $mediaography_index = 0;

        $html = $this->_parser->find('#content table tr', 0)->find('td', 0);
        $mediaography_area = $type == 'anime' ? $html->find('table', 0) : $html->find('table', 1);
        if ($mediaography_area) {
            $mediaography_area = $mediaography_area->find('tr');
            foreach ($mediaography_area as $each_media) {
                $media_image = $each_media->find('td', 0);
                $media_area = $each_media->find('td', 1);

                $mediaography[$mediaography_index]['image'] = $this->getVaImage($media_image);
                $mediaography[$mediaography_index]['id'] = $this->getVaId($media_area);
                $mediaography[$mediaography_index]['title'] = $this->getVaName($media_area);
                $mediaography[$mediaography_index]['role'] = $this->getVaRole($media_area);

                $mediaography_index++;
            }
        }

        return $mediaography;
    }
417752
public function getVideoDuration()
    {
        $this->ensureMediaGroupIsNotNull();
        if ($this->getMediaGroup()->getDuration() != null) {
            return $this->getMediaGroup()->getDuration()->getSeconds();
        } else {
            return null;
        }
    }