Skip to content

Commit 9b5b95e

Browse files
committed
Updates player API.
1 parent 0c90dcd commit 9b5b95e

File tree

6 files changed

+515
-1
lines changed

6 files changed

+515
-1
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
3+
namespace Brightcove\Object\Player\Branch\Configuration;
4+
5+
use Brightcove\Object\ObjectBase;
6+
7+
class CSS extends ObjectBase {
8+
9+
/**
10+
* @var string
11+
*/
12+
protected $controlBarColor;
13+
14+
/**
15+
* @var string
16+
*/
17+
protected $controlColor;
18+
19+
/**
20+
* @var string
21+
*/
22+
protected $progressColor;
23+
24+
public function applyJSON(array $json) {
25+
parent::applyJSON($json);
26+
27+
$this->applyProperty($json, 'controlBarColor');
28+
$this->applyProperty($json, 'controlColor');
29+
$this->applyProperty($json, 'progressColor');
30+
}
31+
32+
/**
33+
* @return string
34+
*/
35+
public function getControlBarColor() {
36+
return $this->controlBarColor;
37+
}
38+
39+
/**
40+
* @param string $controlBarColor
41+
* @return CSS
42+
*/
43+
public function setControlBarColor($controlBarColor) {
44+
$this->controlBarColor = $controlBarColor;
45+
$this->fieldChanged('controlBarColor');
46+
return $this;
47+
}
48+
49+
/**
50+
* @return string
51+
*/
52+
public function getControlColor() {
53+
return $this->controlColor;
54+
}
55+
56+
/**
57+
* @param string $controlColor
58+
* @return CSS
59+
*/
60+
public function setControlColor($controlColor) {
61+
$this->controlColor = $controlColor;
62+
$this->fieldChanged('controlColor');
63+
return $this;
64+
}
65+
66+
/**
67+
* @return string
68+
*/
69+
public function getProgressColor() {
70+
return $this->progressColor;
71+
}
72+
73+
/**
74+
* @param string $progressColor
75+
* @return CSS
76+
*/
77+
public function setProgressColor($progressColor) {
78+
$this->progressColor = $progressColor;
79+
$this->fieldChanged('progressColor');
80+
return $this;
81+
}
82+
}

lib/Brightcove/Object/Player/Branch/Configuration/Configuration.php

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
use Brightcove\Object\ObjectBase;
66

77
class Configuration extends ObjectBase {
8+
9+
/**
10+
* @var CSS
11+
*/
12+
protected $css;
13+
814
/**
915
* @var Media
1016
*/
@@ -30,14 +36,86 @@ class Configuration extends ObjectBase {
3036
*/
3137
protected $plugins;
3238

39+
/**
40+
* @var bool
41+
*/
42+
protected $errors;
43+
44+
/**
45+
* @var bool
46+
*/
47+
protected $fullscreenControl;
48+
49+
/**
50+
* @var array
51+
*/
52+
protected $languages;
53+
54+
/**
55+
* @var bool
56+
*/
57+
protected $loop;
58+
59+
/**
60+
* @var string
61+
*/
62+
protected $preload;
63+
64+
/**
65+
* @var bool
66+
*/
67+
protected $skin;
68+
69+
/**
70+
* @var array
71+
*/
72+
protected $techOrder;
73+
74+
/**
75+
* @var VideoCloud
76+
*/
77+
protected $video_cloud;
78+
79+
/**
80+
* @var StudioConfiguration
81+
*/
82+
protected $studio_configuration;
83+
3384
public function applyJSON(array $json) {
3485
parent::applyJSON($json);
3586

87+
$this->applyProperty($json, 'css', NULL, CSS::class);
3688
$this->applyProperty($json, 'media', NULL, Media::class);
3789
$this->applyProperty($json, 'player', NULL, Player::class);
3890
$this->applyProperty($json, 'scripts');
3991
$this->applyProperty($json, 'stylesheets');
4092
$this->applyProperty($json, 'plugins', NULL, Plugin::class, TRUE);
93+
$this->applyProperty($json, 'errors');
94+
$this->applyProperty($json, 'fullscreenControl');
95+
$this->applyProperty($json, 'languages');
96+
$this->applyProperty($json, 'loop');
97+
$this->applyProperty($json, 'preload');
98+
$this->applyProperty($json, 'skin');
99+
$this->applyProperty($json, 'techOrder');
100+
$this->applyProperty($json, 'video_cloud', NULL, VideoCloud::class);
101+
$this->applyProperty($json, 'studio_configuration', NULL, StudioConfiguration::class);
102+
}
103+
104+
/**
105+
* @return CSS
106+
*/
107+
public function getCss() {
108+
return $this->css;
109+
}
110+
111+
/**
112+
* @param CSS $css
113+
* @return Configuration
114+
*/
115+
public function setCss($css) {
116+
$this->css = $css;
117+
$this->fieldChanged('css');
118+
return $this;
41119
}
42120

43121
/**
@@ -124,4 +202,157 @@ public function setPlugins(array $plugins) {
124202
$this->fieldChanged('plugins');
125203
return $this;
126204
}
205+
206+
/**
207+
* @return boolean
208+
*/
209+
public function isErrors() {
210+
return $this->errors;
211+
}
212+
213+
/**
214+
* @param boolean $errors
215+
* @return Configuration
216+
*/
217+
public function setErrors($errors) {
218+
$this->errors = $errors;
219+
$this->fieldChanged('errors');
220+
return $this;
221+
}
222+
223+
/**
224+
* @return boolean
225+
*/
226+
public function isFullscreenControl() {
227+
return $this->fullscreenControl;
228+
}
229+
230+
/**
231+
* @param boolean $fullscreenControl
232+
* @return Configuration
233+
*/
234+
public function setFullscreenControl($fullscreenControl) {
235+
$this->fullscreenControl = $fullscreenControl;
236+
$this->fieldChanged('fullscreenControl');
237+
return $this;
238+
}
239+
240+
/**
241+
* @return array
242+
*/
243+
public function getLanguages() {
244+
return $this->languages;
245+
}
246+
247+
/**
248+
* @param array $languages
249+
* @return Configuration
250+
*/
251+
public function setLanguages($languages) {
252+
$this->languages = $languages;
253+
$this->fieldChanged('languages');
254+
return $this;
255+
}
256+
257+
/**
258+
* @return boolean
259+
*/
260+
public function isLoop() {
261+
return $this->loop;
262+
}
263+
264+
/**
265+
* @param boolean $loop
266+
* @return Configuration
267+
*/
268+
public function setLoop($loop) {
269+
$this->loop = $loop;
270+
$this->fieldChanged('loop');
271+
return $this;
272+
}
273+
274+
/**
275+
* @return string
276+
*/
277+
public function getPreload() {
278+
return $this->preload;
279+
}
280+
281+
/**
282+
* @param string $preload
283+
* @return Configuration
284+
*/
285+
public function setPreload($preload) {
286+
$this->preload = $preload;
287+
$this->fieldChanged('preload');
288+
return $this;
289+
}
290+
291+
/**
292+
* @return boolean
293+
*/
294+
public function isSkin() {
295+
return $this->skin;
296+
}
297+
298+
/**
299+
* @param boolean $skin
300+
* @return Configuration
301+
*/
302+
public function setSkin($skin) {
303+
$this->skin = $skin;
304+
$this->fieldChanged('skin');
305+
return $this;
306+
}
307+
308+
/**
309+
* @return array
310+
*/
311+
public function getTechOrder() {
312+
return $this->techOrder;
313+
}
314+
315+
/**
316+
* @param array $techOrder
317+
* @return Configuration
318+
*/
319+
public function setTechOrder($techOrder) {
320+
$this->techOrder = $techOrder;
321+
$this->fieldChanged('techOrder');
322+
return $this;
323+
}
324+
325+
/**
326+
* @return VideoCloud
327+
*/
328+
public function getVideoCloud() {
329+
return $this->video_cloud;
330+
}
331+
332+
/**
333+
* @param VideoCloud $video_cloud
334+
* @return Configuration
335+
*/
336+
public function setVideoCloud($video_cloud) {
337+
$this->video_cloud = $video_cloud;
338+
$this->fieldChanged('video_cloud');
339+
return $this;
340+
}
341+
342+
/**
343+
* @return StudioConfiguration
344+
*/
345+
public function getStudioConfiguration() {
346+
return $this->studio_configuration;
347+
}
348+
349+
/**
350+
* @param StudioConfiguration $studio_configuration
351+
* @return Configuration
352+
*/
353+
public function setStudioConfiguration($studio_configuration) {
354+
$this->studio_configuration = $studio_configuration;
355+
$this->fieldChanged('studio_configuration');
356+
return $this;
357+
}
127358
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace Brightcove\Object\Player\Branch\Configuration;
4+
5+
use Brightcove\Object\ObjectBase;
6+
7+
class StudioConfiguration extends ObjectBase {
8+
9+
/**
10+
* @var StudioConfigurationPlayer
11+
*/
12+
protected $player;
13+
14+
public function applyJSON(array $json) {
15+
parent::applyJSON($json);
16+
$this->applyProperty($json, 'player', NULL, StudioConfigurationPlayer::class);
17+
}
18+
19+
/**
20+
* @return StudioConfigurationPlayer
21+
*/
22+
public function getPlayer() {
23+
return $this->player;
24+
}
25+
26+
/**
27+
* @param StudioConfigurationPlayer $player
28+
* @return StudioConfiguration
29+
*/
30+
public function setPlayer(StudioConfigurationPlayer $player) {
31+
$this->player = $player;
32+
$this->fieldChanged('player');
33+
return $this;
34+
}
35+
}

0 commit comments

Comments
 (0)