don't preload videos
This commit is contained in:
parent
12bfb800ce
commit
5748f5c2f2
3 changed files with 12 additions and 12 deletions
|
@ -127,13 +127,13 @@
|
|||
$embed = null;
|
||||
if (preg_match("/\[\[([^\]]+)\]\]/", $checkin->note, $filepath)) {
|
||||
if (preg_match("/\.webm/", $filepath[1])) {
|
||||
$embed = '<video class="popup__video" controls>';
|
||||
$embed = '<video class="popup__video" prefetch="none" controls>';
|
||||
$embed .= '<source src="' . url("/videos/" . $filepath[1]) . '" type="video/webm">';
|
||||
$embed .= '<p>Your browser doesn\'t support HTML video. Here is a <a href="';
|
||||
$embed .= url("/videos/" . $filepath[1]) . '">link to the video</a> instead.</p>';
|
||||
$embed .= '</video>';
|
||||
} elseif (preg_match("/\.ogg/", $filepath[1])) {
|
||||
$embed = '<audio class="popup__audio" controls>';
|
||||
$embed = '<audio class="popup__audio" prefetch="none" controls>';
|
||||
$embed .= '<source src="' . url("/audio/" . $filepath[1]) . '" type="audio/ogg">';
|
||||
$embed .= '<p>Download <a href="' . url("/audio/" . $filepath[1]) . '">OGG</a> audio.</p>';
|
||||
$embed .= '</audio>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue