Sha256: 432065a1b951b6a4af8220e69340597f39cc0be65e2fdcee41c1c423a9f36801

Contents?: true

Size: 271 Bytes

Versions: 38

Compression:

Stored size: 271 Bytes

Contents

module Onebox
  module Engine
    class AudioOnebox
      include Engine

      matches_regexp /^(https?:)?\/\/.*\.(mp3|ogg|wav)(\?.*)?$/

      def to_html
        "<audio controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></audio>"
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
onebox-1.4.9 lib/onebox/engine/audio_onebox.rb
onebox-1.4.8 lib/onebox/engine/audio_onebox.rb
onebox-1.4.7 lib/onebox/engine/audio_onebox.rb
onebox-1.4.5 lib/onebox/engine/audio_onebox.rb
onebox-1.4.4 lib/onebox/engine/audio_onebox.rb
onebox-1.4.3 lib/onebox/engine/audio_onebox.rb
onebox-1.4.2 lib/onebox/engine/audio_onebox.rb
onebox-1.4.1 lib/onebox/engine/audio_onebox.rb
onebox-1.4.0 lib/onebox/engine/audio_onebox.rb
onebox-1.3.9 lib/onebox/engine/audio_onebox.rb
onebox-1.3.8 lib/onebox/engine/audio_onebox.rb
onebox-1.3.7 lib/onebox/engine/audio_onebox.rb
onebox-1.3.6 lib/onebox/engine/audio_onebox.rb
onebox-1.3.5 lib/onebox/engine/audio_onebox.rb
onebox-1.3.4 lib/onebox/engine/audio_onebox.rb
onebox-1.3.3 lib/onebox/engine/audio_onebox.rb
onebox-1.3.2 lib/onebox/engine/audio_onebox.rb
onebox-1.3.1 lib/onebox/engine/audio_onebox.rb