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.5.21 lib/onebox/engine/audio_onebox.rb
onebox-1.5.20 lib/onebox/engine/audio_onebox.rb
onebox-1.5.19 lib/onebox/engine/audio_onebox.rb
onebox-1.5.18 lib/onebox/engine/audio_onebox.rb
onebox-1.5.17 lib/onebox/engine/audio_onebox.rb
onebox-1.5.16 lib/onebox/engine/audio_onebox.rb
onebox-1.5.14 lib/onebox/engine/audio_onebox.rb
onebox-1.5.13 lib/onebox/engine/audio_onebox.rb
onebox-1.5.12 lib/onebox/engine/audio_onebox.rb
onebox-1.5.11 lib/onebox/engine/audio_onebox.rb
onebox-1.5.10 lib/onebox/engine/audio_onebox.rb
onebox-1.5.9 lib/onebox/engine/audio_onebox.rb
onebox-1.5.8 lib/onebox/engine/audio_onebox.rb
onebox-1.5.7 lib/onebox/engine/audio_onebox.rb
onebox-1.5.6 lib/onebox/engine/audio_onebox.rb
onebox-1.5.5 lib/onebox/engine/audio_onebox.rb
onebox-1.5.3 lib/onebox/engine/audio_onebox.rb
onebox-1.5.2 lib/onebox/engine/audio_onebox.rb
onebox-1.5.1 lib/onebox/engine/audio_onebox.rb
onebox-1.5.0 lib/onebox/engine/audio_onebox.rb