[media] simpler video stats
This commit is contained in:
parent
aeeeca75eb
commit
2775ec073d
1 changed files with 2 additions and 8 deletions
|
@ -86,14 +86,8 @@ class VideoFileHandler extends DataHandlerExtension
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (array_key_exists("width", $stream) && !empty($stream["width"])
|
||||
&& is_numeric($stream["width"]) && intval($stream["width"]) > ($event->image->width) ?? 0) {
|
||||
$event->image->width = intval($stream["width"]);
|
||||
}
|
||||
if (array_key_exists("height", $stream) && !empty($stream["height"])
|
||||
&& is_numeric($stream["height"]) && intval($stream["height"]) > ($event->image->height) ?? 0) {
|
||||
$event->image->height = intval($stream["height"]);
|
||||
}
|
||||
$event->image->width = max($event->image->width, @$stream["width"]);
|
||||
$event->image->height = max($event->image->height, @$stream["height"]);
|
||||
}
|
||||
}
|
||||
$event->image->video = $video;
|
||||
|
|
Reference in a new issue