mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-03 12:27:35 -05:00
13 lines
246 B
Ruby
13 lines
246 B
Ruby
|
require_dependency 'oneboxer/base_onebox'
|
||
|
|
||
|
module Oneboxer
|
||
|
class AudioOnebox < BaseOnebox
|
||
|
|
||
|
matcher /^https?:\/\/.*\.mp3$/
|
||
|
|
||
|
def onebox
|
||
|
"<audio controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></audio>"
|
||
|
end
|
||
|
end
|
||
|
end
|