Add email fallback message for media embeds

This commit is contained in:
Ben Goldsworthy 2023-03-02 22:50:06 -05:00
parent b75bfba9a8
commit a52cf444b2

View file

@ -9,8 +9,9 @@
if (file_exists(public_path() . "/videos/" . $filepath[1])) {
$embed = '<video class="popup__video" 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="' . url("/videos/" . $filepath[1]) . '">link to the video</a> instead.</p>';
$embed .= '<p>Your client doesn\'t support HTML video. Here is a <a href="' . url("/videos/" . $filepath[1]) . '">link to the video</a> instead.</p>';
$embed .= '</video>';
$embed .= '<p>If your email client doesn\'t support video embeds, here is a <a href="' . url("/videos/" . $filepath[1]) . '">link to the file</a> instead.</p>';
} else {
$embed = '<p>[The video \'' . $filepath[1] . '\' has not yet been uploaded, try again later.]</p>';
$embedMissing = true;
@ -22,6 +23,7 @@
$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>';
$embed .= '<p>If your email client doesn\' support audio embeds, here is a <a href="' . url("/audio/" . $filepath[1]) . '">link to the file</a> instead.</p>';
} else {
$embed = '<p>[The recording \'' . $filepath[1] . '\' has not yet been uploaded, try again later.]</p>';
$embedMissing = true;