Add flash video onebox support

http://meta.discourse.org/t/will-there-be-flash-videos-in-the-future/7787
This commit is contained in:
James A. Anderson & Jalil Mohammed 2013-06-29 10:43:35 -07:00 committed by James Anderson
parent 9c617d051e
commit 34dc6a41d9
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
require_dependency 'oneboxer/base_onebox'
module Oneboxer
class FlashVideoOnebox < BaseOnebox
matcher /^https?:\/\/.*\.(swf|flv)$/
def onebox
"<object width='100%' height='100%'><param name='#{@url}' value='#{@url}'><embed src='#{@url}' width='100%' height='100%'></embed></object>"
end
end
end