Skip to content

Commit

Permalink
Merge pull request #1 from TonyVlcek/master
Browse files Browse the repository at this point in the history
Add video duration parameter, thx @TonyVlcek
  • Loading branch information
JanGalek committed Dec 17, 2017
2 parents 0b26841 + a7be27d commit 1b91219
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/cs/video.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- url (url adresa videa - string)
- embed (embed adresa videa - string)
- thumbs (náhledové obrázky videa - array)
- duration (délka videa formát ISO 8601 - string )

### Náhledové obrázky (thumbs)
- default (object)
Expand All @@ -21,4 +22,4 @@
#### Thumbnail properties
- url (url adresa náhledu videa - string)
- width (šířka náhledu videa - integer)
- height (výška náhledu videa - integer)
- height (výška náhledu videa - integer)
3 changes: 2 additions & 1 deletion docs/en/video.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- url (video url - string)
- embed (video embed url - string)
- thumbs (video thumbnails - array)
- duration (video duration in ISO 8601 - string )

### Thumbnail (thumbs)
- default (object)
Expand All @@ -21,4 +22,4 @@
#### Thumbnail properties
- url (url to video thumbnail - string)
- width (video thumbnail width - integer)
- height (video thumbnail height - integer)
- height (video thumbnail height - integer)
7 changes: 6 additions & 1 deletion src/TroiaStudio/Utils/Youtube-API/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ class Video
'maxres' => null
];

/**
* @var string ISO 8601
*/
public $duration;

public function __construct()
{
foreach ($this->thumbs as $index => $thumb) {
$this->thumbs[$index] = new Thumbnail;
}
}
}
}

0 comments on commit 1b91219

Please sign in to comment.