Changeset 115396 in spip-zone


Ignore:
Timestamp:
May 15, 2019, 8:36:42 AM (4 days ago)
Author:
arno@…
Message:

Affichage des vidéos MP4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/plugins_seenthis/autoembed/autoembed.php

    r109959 r115396  
    143143                        if ($html) $code_ae = "<div class='oembed-container'>$html</div>";
    144144                }
     145                else if (preg_match(",^https?://[^\"\'\`\<\>\@\*\$]*?\.mp4(\?.*)?$,i", $url)) {
     146                        $html = "<div class='video' style='height:0;position: relative; padding-bottom: 56.25%;'><video controls style='width: 100%'><source src='$url' rel='enclosure'></video></div>";
     147                        if ($html) $code_ae = "<div class='oembed-container'>$html</div>";
     148
     149                }
    145150                else {
    146151                        require_once "AutoEmbed.class.php";
Note: See TracChangeset for help on using the changeset viewer.