Mobile and tablet video rendering fix

http://meta.discourse.org/t/chrome-for-ipad-iphone-breaks-with-this-video-embed/7983
This commit is contained in:
James Anderson 2013-07-08 17:15:20 -07:00
parent 9c617d051e
commit 171e703e11
3 changed files with 9 additions and 1 deletions

View File

@ -299,6 +299,10 @@
webkit-border-radius: 4px;
ms-border-radius: 4px;
}
video {
max-width: 100%;
height: auto;
}
}
#wmd-preview {
border: 1px dashed $gray;

View File

@ -515,6 +515,10 @@
img {
max-width: 100%;
}
video {
max-width: 100%;
height: auto;
}
.topic-body {
position: relative;
.contents {

View File

@ -6,7 +6,7 @@ module Oneboxer
matcher /^https?:\/\/.*\.(mov|mp4|ogg)$/
def onebox
"<video width='100%' height='100%' controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></video>"
"<video controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></video>"
end
end