class EmbedRb::BasicAudio

Public Class Methods

new(input, output, options, embeds) click to toggle source
# File lib/embedrb/audio/embed_audio.rb, line 8
def initialize(input, output, options, embeds)
  @input = input
  @output = output
  @embeds = embeds
  @options = options
  @regex = /((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/mi
  @service = :audio
end

Private Instance Methods

render(url) click to toggle source
# File lib/embedrb/audio/embed_audio.rb, line 18
    def render(url)
      return <<EOF
      <div class="ejs-audio ejs-embed">
        <audio src="#{url}" controls class="video-js ejs-video-js" />
      </div>
EOF
    end