class VideoInfo::Providers::Wistia

Public Class Methods

usable?(url) click to toggle source
# File lib/video_info/providers/wistia.rb, line 4
def self.usable?(url)
  url.match?(/(.*)(wistia.com|wistia.net|wi.st)/)
end

Public Instance Methods

embed_url() click to toggle source
# File lib/video_info/providers/wistia.rb, line 20
def embed_url
  "//fast.wistia.net/embed/iframe/#{video_id}"
end
provider() click to toggle source
# File lib/video_info/providers/wistia.rb, line 8
def provider
  "Wistia"
end
thumbnail_large() click to toggle source
# File lib/video_info/providers/wistia.rb, line 32
def thumbnail_large
  data["thumbnail_url"]
end
thumbnail_medium() click to toggle source
# File lib/video_info/providers/wistia.rb, line 28
def thumbnail_medium
  data["thumbnail_url"]
end
thumbnail_small() click to toggle source
# File lib/video_info/providers/wistia.rb, line 24
def thumbnail_small
  data["thumbnail_url"]
end

Private Instance Methods

_api_base() click to toggle source
# File lib/video_info/providers/wistia.rb, line 43
def _api_base
  "fast.wistia.com"
end
_api_path() click to toggle source
# File lib/video_info/providers/wistia.rb, line 47
def _api_path
  "/oembed?url=http%3A%2F%2Fhome.wistia.com%2Fmedias%2F#{video_id}"
end
_api_url() click to toggle source
# File lib/video_info/providers/wistia.rb, line 51
def _api_url
  "http://#{_api_base}#{_api_path}"
end
_default_iframe_attributes() click to toggle source
# File lib/video_info/providers/wistia.rb, line 55
def _default_iframe_attributes
  {}
end
_default_url_attributes() click to toggle source
# File lib/video_info/providers/wistia.rb, line 59
def _default_url_attributes
  {}
end
_url_regex() click to toggle source
# File lib/video_info/providers/wistia.rb, line 38
def _url_regex
  %r{(?:.*)(?:wistia.com|wi.st|wistia.net)
     /(?:embed/)?(?:medias/)?(?:iframe/)?(.+)}x
end