Open Groofertje opened 9 months ago
Here's how I fixed it on Debian 12 with Piwigo 14 The Piwigo team really needs to take over this plugin and own it. Not supporting video in 2023 is a crime; videos at this point are as important as images!
1) Start with the most up-to-date repo: https://github.com/klaoun/piwigo-videojs
2) Fix deprecated float to int casting:
// add source to band
imagecopy($imgBand, $srcImage, (int)3*$const, (int)(3/2)*$const, 0, 0, (int)$srcWidth, (int)$srcHeight);
and this:
/**
* create a rectangle with round corners
* http://www.php.net/manual/fr/function.imagefilledrectangle.php#42815
*/
function imagefilledroundrectangle(&$img, $x1, $y1, $x2, $y2, $color, $radius)
{
imagefilledrectangle($img, (int)$x1+$radius, (int)$y1, (int)$x2-$radius, (int)$y2, (int)$color);
if ($radius > 0)
{
imagefilledrectangle($img, (int)$x1, (int)$y1+$radius, (int)$x2, (int)$y2-$radius, (int)$color);
imagefilledellipse($img, (int)$x1+$radius, (int)$y1+$radius, (int)$radius*2, (int)$radius*2, (int)$color);
imagefilledellipse($img, (int)$x2-$radius, (int)$y1+$radius, (int)$radius*2, (int)$radius*2, (int)$color);
imagefilledellipse($img, (int)$x1+$radius, (int)$y2-$radius, (int)$radius*2, (int)$radius*2, (int)$color);
imagefilledellipse($img, (int)$x2-$radius, (int)$y2-$radius, (int)$radius*2, (int)$radius*2, (int)$color);
}
}
3) If you want to add iPhone video support (MOV files) apply the following code changes as well:
https://github.com/Piwigo/piwigo-videojs/pull/163
Good luck!
P.S. THIS IS IMPORTANT: Before you start using the new code, go to admin -> Plugins -> click the ... on top of VideoJS3 and select "Restore". This will reset the settings of this plugin and get rid of all the errors.
Tx for the answer, my grandchildren will be happy if it works. 🙂
Van: Leon Kiriliuk @.> Verzonden: vrijdag 22 december 2023 20:12 Aan: Piwigo/piwigo-videojs @.> CC: Guillaume Swennen @.>; Author @.> Onderwerp: Re: [Piwigo/piwigo-videojs] Warning: Undefined array key "resolution" (Issue #217)
Here's how I fixed it on Debian 12 with Piwigo 14 The Piwigo team really needs to take over this plugin and own it. Not supporting video in 2023 is a crime; videos at this point are as important as images!
Start with the most up-to-date repo: https://github.com/klaoun/piwigo-videojs
Fix deprecated float to int casting:
// add source to band imagecopy($imgBand, $srcImage, (int)3$const, (int)(3/2)$const, 0, 0, (int)$srcWidth, (int)$srcHeight);
and this:
/**
http://www.php.net/manual/fr/function.imagefilledrectangle.php#42815 */ function imagefilledroundrectangle(&$img, $x1, $y1, $x2, $y2, $color, $radius) { imagefilledrectangle($img, (int)$x1+$radius, (int)$y1, (int)$x2-$radius, (int)$y2, (int)$color);
if ($radius > 0) { imagefilledrectangle($img, (int)$x1, (int)$y1+$radius, (int)$x2, (int)$y2-$radius, (int)$color); imagefilledellipse($img, (int)$x1+$radius, (int)$y1+$radius, (int)$radius2, (int)$radius2, (int)$color); imagefilledellipse($img, (int)$x2-$radius, (int)$y1+$radius, (int)$radius2, (int)$radius2, (int)$color); imagefilledellipse($img, (int)$x1+$radius, (int)$y2-$radius, (int)$radius2, (int)$radius2, (int)$color); imagefilledellipse($img, (int)$x2-$radius, (int)$y2-$radius, (int)$radius2, (int)$radius2, (int)$color); } }
https://github.com/Piwigo/piwigo-videojs/pull/163
Good luck!
— Reply to this email directly, view it on GitHubhttps://github.com/Piwigo/piwigo-videojs/issues/217#issuecomment-1868002080, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGFNVYVKEOK2YV2DC3UC34LYKXLSXAVCNFSM6AAAAABA7Z2PYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGAYDEMBYGA. You are receiving this because you authored the thread.Message ID: @.***>
Environment Piwigo 14 Installed on 21 Dec 2023 Operating system: Debian GNU/Linux 12 (bookworm) VideoJS
Warning: Undefined array key "resolution" in /mnt/DataDisk/www/public/piwigo/_data/templates_c/p6jhns^692b93885e2371fdf3d39260b560f744055a947d_0.file.admin_config.tpl.php on line 268