-
Notifications
You must be signed in to change notification settings - Fork 4
/
VideoEmbedAPI.php
executable file
·50 lines (39 loc) · 1.05 KB
/
VideoEmbedAPI.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace Statamic\Addons\VideoEmbed;
use Statamic\Extend\API;
class VideoEmbedAPI extends API
{
private $videoembed;
protected function init()
{
$this->videoembed = new VideoEmbed;
}
public function isYouTube($value)
{
return $this->videoembed->isYouTube($value);
}
public function isVimeo($value)
{
return $this->videoembed->isVimeo($value);
}
public function isValid($value)
{
return $this->videoembed->isValid($value);
}
public function getVideoId($value)
{
return $this->videoembed->getVideoId($value);
}
public function getVideoSrc($value, $autoplay, $loop, $api, $showinfo, $controls)
{
return $this->videoembed->getVideoSrc($value, $autoplay, $loop, $api, $showinfo, $controls);
}
public function getVideoLink($value)
{
return $this->videoembed->getVideoLink($value);
}
public function getAspectRatio($height, $width)
{
return $this->videoembed->getAspectRatio($height, $width);
}
}