maruco There's an easier way to do that.
The following code should work. I haven't tested it.
Put it in the Flarum root extend.php
(or create it if it doesn't exist).
use Flarum\Extend;
use Flarum\Formatter\Formatter;
return [
(new Extend\Formatter)
->configure(function (Configurator $config) {
$config->MediaEmbed->add(
'DriveMaru',
[
'host' => 'drive.akumaru.com',
'extract' => "!drive\\.akumaru\\.com/play/h(?'id'[-0-9A-Z_a-z]+)!",
'iframe' => ['src' => 'http://drive.akumaru.com/video/{@id}']
]
);
})
]