mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-11 14:21:19 +00:00
Meilleur affichage des vidéos Google Drive
This commit is contained in:
parent
6ee2fb9528
commit
b44c789dc8
@ -304,8 +304,8 @@ function displayVideo($link)
|
|||||||
/** @noinspection HtmlDeprecatedTag */
|
/** @noinspection HtmlDeprecatedTag */
|
||||||
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";
|
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?://|)drive\.google\.com/file/d/(.*)/.*?#", $link, $matches)) {
|
elseif (preg_match("#(https?://|)drive\.google\.com/(file/d/|open\?id=)([a-zA-Z0-9\-_]*)/?.*?#", $link, $matches)) {
|
||||||
$code = $matches[2];
|
$code = $matches[3];
|
||||||
/** @noinspection HtmlDeprecatedAttribute */
|
/** @noinspection HtmlDeprecatedAttribute */
|
||||||
/** @noinspection HtmlDeprecatedTag */
|
/** @noinspection HtmlDeprecatedTag */
|
||||||
echo "<center><iframe width=\"854px\" height=\"480px\" src=\"https://drive.google.com/file/d/$code/preview\" ></iframe></center><br />\n";
|
echo "<center><iframe width=\"854px\" height=\"480px\" src=\"https://drive.google.com/file/d/$code/preview\" ></iframe></center><br />\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user