Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/Brightcove/API/Request/IngestRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ class IngestRequest extends ObjectBase {
*/
protected $text_tracks;

/**
* @var IngestTranscriptions[]
*/
protected $transcriptions;

public function __construct() {
$this->fieldAliases["capture_images"] = "capture-images";
}
Expand All @@ -68,6 +73,7 @@ public function applyJSON(array $json) {
$this->applyProperty($json, 'thumbnail');
$this->applyProperty($json, 'capture_images');
$this->applyProperty($json, 'text_tracks', NULL, IngestTextTrack::class, TRUE);
$this->applyProperty($json, 'transcriptions', NULL, IngestTranscriptions::class, TRUE);
}

/**
Expand Down Expand Up @@ -188,4 +194,21 @@ public function setTextTracks(array $text_tracks) {
$this->fieldChanged('text_tracks');
return $this;
}

/**
* @return IngestTranscriptions[]
*/
public function getTranscriptions() {
return $this->transcriptions;
}

/**
* @param IngestTranscriptions[] $transcriptions
* @return IngestRequest
*/
public function setTranscriptions(array $transcriptions) {
$this->transcriptions = $transcriptions;
$this->fieldChanged('transcriptions');
return $this;
}
}
182 changes: 182 additions & 0 deletions lib/Brightcove/API/Request/IngestTranscriptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<?php

namespace Brightcove\API\Request;

use Brightcove\Item\ObjectBase;

/**
* Class IngestTranscriptions
*
* @package Brightcove\API\Request
* @api
*/
class IngestTranscriptions extends ObjectBase {

/**
* @var string
*/
protected $url;

/**
* @var string
*/
protected $srclang;

/**
* @var string
*/
protected $label;

/**
* allowed values: captions | subtitles | descriptions | chapters | metadata
*
* @var string
*/
protected $kind;

/**
* @var boolean
*/
protected $default;

/**
* @var boolean
*/
protected $autodetect;

/**
* @var boolean
*/
protected $status;

public function applyJSON(array $json) {
parent::applyJSON($json);
$this->applyProperty($json, 'url');
$this->applyProperty($json, 'srclang');
$this->applyProperty($json, 'label');
$this->applyProperty($json, 'kind');
$this->applyProperty($json, 'default');
$this->applyProperty($json, 'autodetect');
$this->applyProperty($json, 'status');
}

/**
* @return string
*/
public function getUrl() {
return $this->url;
}

/**
* @param string $url
* @return IngestTranscriptions
*/
public function setUrl($url) {
$this->url = $url;
$this->fieldChanged('url');
return $this;
}

/**
* @return string
*/
public function getSrclang() {
return $this->srclang;
}

/**
* @param string $srclang
* @return IngestTranscriptions
*/
public function setSrclang($srclang) {
$this->srclang = $srclang;
$this->fieldChanged('srclang');
return $this;
}

/**
* @return string
*/
public function getLabel() {
return $this->label;
}

/**
* @param string $label
* @return IngestTranscriptions
*/
public function setLabel($label) {
$this->label = $label;
$this->fieldChanged('label');
return $this;
}

/**
* @return string
*/
public function getKind() {
return $this->kind;
}

/**
* @param string $kind
* @return IngestTranscriptions
*/
public function setKind($kind) {
$this->kind = $kind;
$this->fieldChanged('kind');
return $this;
}

/**
* @return boolean
*/
public function isDefault() {
return $this->default;
}

/**
* @param boolean $default
* @return IngestTranscriptions
*/
public function setDefault($default) {
$this->default = $default;
$this->fieldChanged('default');
return $this;
}

/**
* @return boolean
*/
public function isAutoDetect() {
return $this->autodetect;
}

/**
* @param boolean $autodetect
* @return IngestTranscriptions
*/
public function setAutoDetect($autodetect) {
$this->autodetect = $autodetect;
$this->fieldChanged('autodetect');
return $this;
}

/**
* @return string
*/
public function getStatus() {
return $this->status;
}

/**
* @param string $status
* @return IngestTranscriptions
*/
public function setStatus($status) {
$this->status = $status;
$this->fieldChanged('status');
return $this;
}

}
23 changes: 23 additions & 0 deletions lib/Brightcove/Item/Video/TextTrack.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ class TextTrack extends ObjectBase {
*/
protected $default;

/**
* @var string
*/
protected $status;

public function applyJSON(array $json) {
parent::applyJSON($json);
$this->applyProperty($json, 'id');
Expand All @@ -68,6 +73,7 @@ public function applyJSON(array $json) {
$this->applyProperty($json, 'asset_id');
$this->applyProperty($json, 'sources', NULL, TextTrackSource::class, TRUE);
$this->applyProperty($json, 'default');
$this->applyProperty($json, 'status');
}

/**
Expand Down Expand Up @@ -222,4 +228,21 @@ public function setDefault($default) {
$this->fieldChanged('default');
return $this;
}

/**
* @return string
*/
public function getStatus() {
return $this->status;
}

/**
* @param string $status
* @return TextTrack
*/
public function setStatus($status) {
$this->status = $status;
$this->fieldChanged('status');
return $this;
}
}
Loading