Added DailyMotion & Twitter oEmbeds

This commit is contained in:
Ruxton 2013-01-25 22:31:44 +08:00
parent 89042078ca
commit 40fdf3819b

View file

@ -9,6 +9,13 @@ require 'uri'
OEmbedCubbies = OEmbed::Provider.new("http://cubbi.es/oembed")
OEmbedDailyMotion = OEmbed::Provider.new("http://www.dailymotion.com/services/oembed")
OEmbedDailyMotion << "http://www.dailymotion.com/video/*"
OEmbedTwitter = OEmbed::Provider.new("https://api.twitter.com/1/statuses/oembed.json")
OEmbedTwitter << "http://twitter.com/*/status/*"
OEmbedTwitter << "https://twitter.com/*/status/*"
# patch in support for new https soundcloud
OEmbed::Providers::SoundCloud << "https://*.soundcloud.com/*"
@ -18,7 +25,9 @@ oembed_provider_list = [
OEmbed::Providers::SoundCloud,
OEmbed::Providers::Instagram,
OEmbed::Providers::Flickr,
OEmbedCubbies
OEmbedCubbies,
OEmbedDailyMotion,
OEmbedTwitter
]
SECURE_ENDPOINTS = oembed_provider_list.map do |provider|