make sure video isn't bigger than container + linting
This commit is contained in:
parent
12d73c28a8
commit
e07556c62d
@ -41,18 +41,15 @@ class VideoFileHandlerTheme extends Themelet {
|
|||||||
//FLV doesn't support <video>.
|
//FLV doesn't support <video>.
|
||||||
$html .= $html_fallback;
|
$html .= $html_fallback;
|
||||||
} else {
|
} else {
|
||||||
$html .= "
|
$autoplay = ($autoplay ? ' autoplay' : '');
|
||||||
<video controls class='shm-main-image' id='main_image' alt='main image'"
|
$loop = ($loop ? ' loop' : '');
|
||||||
. ($autoplay ? ' autoplay' : '')
|
|
||||||
. ($loop ? ' loop' : '')
|
|
||||||
. " data-width='{$image->width}' "
|
|
||||||
. " data-height='{$image->height}'>
|
|
||||||
|
|
||||||
|
$html .= "
|
||||||
|
<video controls class='shm-main-image' id='main_image' alt='main image' {$autoplay} {$loop} style='max-width: 100%'>
|
||||||
<source src='{$ilink}' type='{$supportedExts[$ext]}'>
|
<source src='{$ilink}' type='{$supportedExts[$ext]}'>
|
||||||
|
|
||||||
<!-- If browser doesn't support filetype, fallback to flash -->
|
<!-- If browser doesn't support filetype, fallback to flash -->
|
||||||
{$html_fallback}
|
{$html_fallback}
|
||||||
|
|
||||||
</video>";
|
</video>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user