Class: VideoInfo::Providers::Wistia

Inherits:
VideoInfo::Provider show all
Defined in:
lib/video_info/providers/wistia.rb

Instance Attribute Summary

Attributes inherited from VideoInfo::Provider

#data, #options, #url, #video_id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from VideoInfo::Provider

#available?, #embed_code, #initialize, #stats, #thumbnail, #thumbnail_large_2x, #thumbnail_maxres

Constructor Details

This class inherits a constructor from VideoInfo::Provider

Class Method Details

.usable?(url) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/video_info/providers/wistia.rb', line 4

def self.usable?(url)
  url.match?(/(.*)(wistia.com|wistia.net|wi.st)/)
end

Instance Method Details

#embed_urlObject



20
21
22
# File 'lib/video_info/providers/wistia.rb', line 20

def embed_url
  "//fast.wistia.net/embed/iframe/#{video_id}"
end

#providerObject



8
9
10
# File 'lib/video_info/providers/wistia.rb', line 8

def provider
  "Wistia"
end

#thumbnail_largeObject



32
33
34
# File 'lib/video_info/providers/wistia.rb', line 32

def thumbnail_large
  data["thumbnail_url"]
end

#thumbnail_mediumObject



28
29
30
# File 'lib/video_info/providers/wistia.rb', line 28

def thumbnail_medium
  data["thumbnail_url"]
end

#thumbnail_smallObject



24
25
26
# File 'lib/video_info/providers/wistia.rb', line 24

def thumbnail_small
  data["thumbnail_url"]
end