[flash] remove flash extension, browsers don't support it any more

This commit is contained in:
Shish 2023-12-30 01:54:24 +00:00
parent 65d858c1ca
commit cc36f32ffc
4 changed files with 0 additions and 86 deletions

View file

@ -1,16 +0,0 @@
<?php
declare(strict_types=1);
namespace Shimmie2;
class FlashFileHandlerInfo extends ExtensionInfo
{
public const KEY = "handle_flash";
public string $key = self::KEY;
public string $name = "Handle Flash";
public string $url = self::SHIMMIE_URL;
public array $authors = self::SHISH_AUTHOR;
public string $description = "Handle Flash files.";
}

View file

@ -1,39 +0,0 @@
<?php
declare(strict_types=1);
namespace Shimmie2;
class FlashFileHandler extends DataHandlerExtension
{
protected array $SUPPORTED_MIME = [MimeType::FLASH];
protected function media_check_properties(MediaCheckPropertiesEvent $event): void
{
$event->image->lossless = true;
$event->image->video = true;
$event->image->image = false;
$info = getimagesize($event->image->get_image_filename());
if ($info) {
$event->image->width = $info[0];
$event->image->height = $info[1];
}
}
protected function create_thumb(string $hash, string $mime): bool
{
if (!Media::create_thumbnail_ffmpeg($hash)) {
copy("ext/handle_flash/thumb.jpg", warehouse_path(Image::THUMBNAIL_DIR, $hash));
}
return true;
}
protected function check_contents(string $tmpname): bool
{
$fp = fopen($tmpname, "r");
$head = fread($fp, 3);
fclose($fp);
return in_array($head, ["CWS", "FWS"]);
}
}

View file

@ -1,31 +0,0 @@
<?php
declare(strict_types=1);
namespace Shimmie2;
class FlashFileHandlerTheme extends Themelet
{
public function display_image(Page $page, Image $image)
{
$ilink = $image->get_image_link();
// FIXME: object and embed have "height" and "width"
$html = "
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0'
height='{$image->height}'
width='{$image->width}'
wmode='opaque'
>
<param name='movie' value='$ilink'/>
<param name='quality' value='high' />
<embed src='$ilink' quality='high'
pluginspage='http://www.macromedia.com/go/getflashplayer'
height='{$image->height}'
width='{$image->width}'
wmode='opaque'
type='application/x-shockwave-flash' />
</object>";
$page->add_block(new Block("Flash Animation", $html, "main", 10));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB