for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\EmbedVideo\Parsers;
/**
* Class TwitchParser
*
* @package Arcanedev\EmbedVideo\Parsers
* @author ARCANEDEV <[email protected]>
*/
class TwitchParser extends AbstractParser
{
/* -----------------------------------------------------------------
| Getters & Setters
| -----------------------------------------------------------------
* Get the default URL queries.
* @return array
protected function defaultQueries()
return [
//
];
}
* Get the iframe pattern.
* @return string
protected function getIframePattern()
$this->prependQuery('video', 'v'.$this->videoId());
return 'https://player.twitch.tv/';
* Get the iframe replace.
protected function getIframeReplacer()
* Get the video id.
* @return mixed
public function videoId()
return $this->getCached(2);
* Get the info URL.
public function getInfoUrl()
return $this->protocol.'://twitch.tv/videos/'.$this->videoId();