Module: Videojuicer::Resource::Embeddable
- Included in:
- Presentation
- Defined in:
- lib/videojuicer/resource/embeddable.rb
Constant Summary collapse
- OEMBED_ENDPOINT =
"/oembed".freeze
Instance Method Summary collapse
- #embed_code(maxwidth, maxheight) ⇒ Object
- #embed_size(maxwidth, maxheight) ⇒ Object
- #oembed_payload(maxwidth, maxheight) ⇒ Object
Instance Method Details
#embed_code(maxwidth, maxheight) ⇒ Object
24 25 26 |
# File 'lib/videojuicer/resource/embeddable.rb', line 24 def (maxwidth, maxheight) (maxwidth, maxheight)["html"] end |
#embed_size(maxwidth, maxheight) ⇒ Object
19 20 21 22 |
# File 'lib/videojuicer/resource/embeddable.rb', line 19 def (maxwidth, maxheight) p = (maxwidth, maxheight) return p["width"], p["height"] end |
#oembed_payload(maxwidth, maxheight) ⇒ Object
13 14 15 16 17 |
# File 'lib/videojuicer/resource/embeddable.rb', line 13 def (maxwidth, maxheight) proxy = proxy_for(config) result = proxy.get(OEMBED_ENDPOINT, :format=>"json", :url=>"#{proxy.host_stub}#{resource_path}?seed_name=#{seed_name}", :maxwidth=>maxwidth, :maxheight=>maxheight) JSON.parse(result.body) end |