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 | public function init() |
||
57 | /** |
||
58 | 1 | * Autoplay video |
|
59 | * |
||
60 | 1 | * @param bool $autoplay |
|
61 | 1 | * @return AssetVideoInterface |
|
62 | 1 | */ |
|
63 | public function autoplay(bool $autoplay = true): AssetVideoInterface |
||
68 | |||
69 | /** |
||
70 | 1 | * loop video |
|
71 | * |
||
72 | 1 | * @param bool $loop |
|
73 | 1 | * @return AssetVideoInterface |
|
74 | */ |
||
75 | public function loop(bool $loop = true): AssetVideoInterface |
||
80 | |||
81 | /** |
||
82 | 1 | * Preload video |
|
83 | * |
||
84 | 1 | * @param string $preload |
|
85 | 1 | * @return AssetVideoInterface |
|
86 | */ |
||
87 | public function preload(string $preload = 'auto'): AssetVideoInterface |
||
92 | |||
93 | /** |
||
94 | 1 | * Set crossorigin attribute of the video |
|
95 | * |
||
96 | 1 | * @param string $crossorigin |
|
97 | 1 | * @return AssetVideoInterface |
|
98 | */ |
||
99 | public function crossorigin(string $crossorigin = 'anonymous'): AssetVideoInterface |
||
104 | } |
||
105 |