Skip to content

Commit 5cb6605

Browse files
committed
support duration on audio files
1 parent d2c7af2 commit 5cb6605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Helpers/File.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public static function type(string $path): MediaType
6060

6161
public static function duration(string $path): ?float
6262
{
63-
if (static::type($path) === MediaType::Video) {
63+
if (
64+
in_array(static::type($path), [MediaType::Video, MediaType::Audio])
65+
) {
6466
$filesystem = Storage::build([
6567
'driver' => 'local',
6668
'root' => SupportFile::dirname($path),

0 commit comments

Comments
 (0)