1 | <?php |
||
29 | final class AssetVideo extends AssetsAbstract implements AssetVideoInterface |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * Autoplay video |
||
34 | * |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $attr_autoplay; |
||
38 | |||
39 | /** |
||
40 | * Preload video |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $attr_preload; |
||
45 | |||
46 | /** |
||
47 | * Image crossorigin |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $attr_crossorigin; |
||
52 | |||
53 | 1 | public function init() |
|
57 | /** |
||
58 | * Autoplay video |
||
59 | * |
||
60 | * @param bool $autoplay |
||
61 | * @return AssetVideoInterface |
||
62 | */ |
||
63 | 1 | public function autoplay(bool $autoplay = true): AssetVideoInterface |
|
68 | |||
69 | /** |
||
70 | * loop video |
||
71 | * |
||
72 | * @param bool $loop |
||
73 | * @return AssetVideoInterface |
||
74 | */ |
||
75 | 1 | public function loop(bool $loop = true): AssetVideoInterface |
|
80 | |||
81 | /** |
||
82 | * Preload video |
||
83 | * |
||
84 | * @param string $preload |
||
85 | * @return AssetVideoInterface |
||
86 | */ |
||
87 | 1 | public function preload(string $preload = 'auto'): AssetVideoInterface |
|
92 | |||
93 | /** |
||
94 | * Set crossorigin attribute of the video |
||
95 | * |
||
96 | * @param string $crossorigin |
||
97 | * @return AssetVideoInterface |
||
98 | */ |
||
99 | 1 | public function crossorigin(string $crossorigin = 'anonymous'): AssetVideoInterface |
|
104 | } |
||
105 |