Created
July 11, 2014 09:21
-
-
Save woss/697e80c4ee42636527ec to your computer and use it in GitHub Desktop.
createJobs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create jobs | |
* @param $videoId int | |
* @return $this | |
*/ | |
public function createJobs($videoId) | |
{ | |
$this->setVideoId($videoId); | |
$this->setVideoTitle($this->getVideoInfo($videoId)['title']); | |
$jobs = array( | |
array( | |
'format_id' => 'ios_720p' | |
), | |
array( | |
'format_id' => 'mp4_720p' | |
), | |
array( | |
'format_id' => 'android_240p' | |
), | |
array( | |
'format_id' => 'android_360p' | |
), | |
array( | |
'format_id' => 'android_720p' | |
), | |
array( | |
'format_id' => 'webm_240p' | |
), | |
array( | |
'format_id' => 'webm_360p' | |
), | |
array( | |
'format_id' => 'theora_240p' | |
), | |
array( | |
'format_id' => 'theora_360p' | |
), | |
array( | |
'format_id' => 'mp4_240p', | |
'offset' => 0, | |
'duration' => 3, | |
'name' => 'short_mp4_240p' | |
), | |
); | |
foreach ($jobs as $job) { | |
$this->createJob($job); | |
} | |
return $this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment