Skip to content

Commit

Permalink
support duration on audio files
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Oct 18, 2024
1 parent d2c7af2 commit 5cb6605
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Helpers/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public static function type(string $path): MediaType

public static function duration(string $path): ?float
{
if (static::type($path) === MediaType::Video) {
if (
in_array(static::type($path), [MediaType::Video, MediaType::Audio])
) {
$filesystem = Storage::build([
'driver' => 'local',
'root' => SupportFile::dirname($path),
Expand Down

0 comments on commit 5cb6605

Please sign in to comment.