Skip to content

Commit

Permalink
add media and parent to manipulate
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Jan 12, 2025
1 parent 6f0308c commit 347a2a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Definitions/MediaConversionFFmpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class MediaConversionFFmpeg extends MediaConversionDefinition
{
/**
* @param Closure(MediaExporter $ffmpeg):void $manipulate
* @param Closure(MediaExporter $ffmpeg, Media $media, ?MediaConversion $parent):void $manipulate
* @param Closure(Media $media, ?MediaConversion $parent):string $fileName
*/
public function __construct(
Expand Down Expand Up @@ -75,7 +75,7 @@ public function handle(
->open($file)
->export();

$manipulate($ffmpeg);
$manipulate($ffmpeg, $media, $parent);

$ffmpeg->save($newFile);

Expand Down
4 changes: 2 additions & 2 deletions src/Definitions/MediaConversionSpatieImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class MediaConversionSpatieImage extends MediaConversionDefinition
{
/**
* @param Closure(Image $image):void $manipulate
* @param Closure(Image $image, Media $media, ?MediaConversion $parent):void $manipulate
* @param Closure(Media $media, ?MediaConversion $parent):string $fileName
*/
public function __construct(
Expand Down Expand Up @@ -73,7 +73,7 @@ public function handle(

$image = Image::load($filesystem->path($file));

$manipulate($image);
$manipulate($image, $media, $parent);

$image->save($filesystem->path($newFile));

Expand Down

0 comments on commit 347a2a1

Please sign in to comment.