Skip to content

Commit 195c2af

Browse files
author
pascalbaljet
committed
getFirstStream method in Media class and added changelog
1 parent d75670e commit 195c2af

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
All Notable changes to `pbmedia/laravel-ffmpeg` will be documented in this file
44

5+
## 1.1.10 - 2017-08-16
6+
7+
### Added
8+
- Added ```getFirstStream()``` method to the ```Media``` class
9+
10+
### Deprecated
11+
- Nothing
12+
13+
### Fixed
14+
- Some refactoring
15+
16+
### Removed
17+
- Nothing
18+
19+
### Security
20+
- Nothing
21+
522
## 1.1.9 - 2017-07-10
623

724
### Added

src/Media.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ public function getDurationInSeconds(): int
3838
return $this->getDurationInMiliseconds() / 1000;
3939
}
4040

41+
public function getFirstStream()
42+
{
43+
return $this->media->getStreams()->first();
44+
}
45+
4146
public function getDurationInMiliseconds(): float
4247
{
43-
$stream = $this->media->getStreams()->first();
48+
$stream = $this->getFirstStream();
4449

4550
if ($stream->has('duration')) {
4651
return $stream->get('duration') * 1000;

0 commit comments

Comments
 (0)