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 | /** |
||
54 | * Asset constructor set asset ID |
||
55 | * |
||
56 | * @param string $id |
||
57 | */ |
||
58 | 1 | public function __construct(string $id) |
|
63 | |||
64 | /** |
||
65 | * Autoplay video |
||
66 | * |
||
67 | * @param bool $autoplay |
||
68 | * @return AssetVideoInterface |
||
69 | */ |
||
70 | 1 | public function autoplay(bool $autoplay = true): AssetVideoInterface |
|
75 | |||
76 | /** |
||
77 | * loop video |
||
78 | * |
||
79 | * @param bool $loop |
||
80 | * @return AssetVideoInterface |
||
81 | */ |
||
82 | 1 | public function loop(bool $loop = true): AssetVideoInterface |
|
87 | |||
88 | /** |
||
89 | * Preload video |
||
90 | * |
||
91 | * @param string $preload |
||
92 | * @return AssetVideoInterface |
||
93 | */ |
||
94 | 1 | public function preload(string $preload = 'auto'): AssetVideoInterface |
|
99 | |||
100 | /** |
||
101 | * Set crossorigin attribute of the video |
||
102 | * |
||
103 | * @param string $crossorigin |
||
104 | * @return AssetVideoInterface |
||
105 | */ |
||
106 | 1 | public function crossorigin(string $crossorigin = 'anonymous'): AssetVideoInterface |
|
111 | } |
||
112 |