Support de Vimeo

This commit is contained in:
galaxyoyo 2019-09-21 17:36:07 +02:00
parent 0885141db5
commit 94345ae9a5
1 changed files with 5 additions and 0 deletions

View File

@ -175,4 +175,9 @@ function displayVideo($link)
$code = $matches[3];
echo "<center><iframe width=\"854px\" height=\"480px\" src=\"https://www.youtube.com/embed/$code\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe></center><br />\n";
}
elseif (preg_match("#(https?\://|)(www\.|)vimeo\.com/([0-9]*)#", $link, $matches)) {
$code = $matches[3];
echo "<center><iframe src=\"https://player.vimeo.com/video/$code?color=3be6c3\" width=\"853\" height=\"480\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>";
}
}