ReviewOS

also looking at this

meemalabs/meema-client-php

Video Functionalities

#69
Merged glennmichael123 wants to merge video-functionalities into main
4 files +190 -32
src/Functions/Video.phpmodified+129-0
Changes to src/Functions/Video.php
@@ -0,0 +1,129 @@
1<?php
2
3namespace Meema\MeemaClient\Functions;
4
5use Meema\MeemaClient\Client;
6use Meema\MeemaClient\Traits\UrlResponse;
7
8class Video
9{
10 use UrlResponse;
11
12 /**
13 * @var \Meema\MeemaClient\Client
14 */
15 protected $client;
16
17 /**
18 * @var array
19 */
20 protected $args = [];
21
22 /**
23 * Construct media model.
24 *
25 * @param Meema\MeemaClient\Client $client
26 */
27 public function __construct(Client $client)
28 {
29 $this->client = $client;
30 }
31
32 /**
33 * Set the video thumbnail value.
34 *
35 * @param string|bool $value
36 *
37 * @return $this
38 */
39 public function thumbnails($value)
40 {
41 $this->args = array_merge($this->args, ['thumbnails' => $value]);
42
43 return $this;
44 }
45
46 /**
47 * Set the video hls value.
48 *
49 * @param bool $value
50 *
51 * @return $this
52 */
53 public function hls($value)
54 {
55 $this->args = array_merge($this->args, ['hls' => $value]);
56
57 return $this;
58 }
59
60 /**
61 * Set the video dash value.
62 *
63 * @param bool $value
64 *
65 * @return $this
66 */
67 public function dash($value)
68 {
69 $this->args = array_merge($this->args, ['dash' => $value]);
70
71 return $this;
72 }
73
74 /**
75 * Set the video poster value.
76 *
77 * @param int $value
78 *
79 * @return $this
80 */
81 public function poster($value)
82 {
83 $this->args = array_merge($this->args, ['dash' => $value]);
84
85 return $this;
86 }
87
88 /**
89 * Set the video webvtt value.
90 *
91 * @param bool $value
92 *
93 * @return $this
94 */
95 public function webvtt($value)
96 {
97 $this->args = array_merge($this->args, ['webvtt' => $value]);
98
99 return $this;
100 }
101
102 /**
103 * Set the video format value.
104 *
105 * @param string $value
106 *
107 * @return $this
108 */
109 public function format($value)
110 {
111 $this->args = array_merge($this->args, ['format' => $value]);
112
113 return $this;
114 }
115
116 /**
117 * Set the video web optimized value.
118 *
119 * @param bool $value
120 *
121 * @return $this
122 */
123 public function webOptimized($value)
124 {
125 $this->args = array_merge($this->args, ['web-optimized' => $value]);
126
127 return $this;
128 }
129}