A handful more providers moved across & removed any that no longer supported
This commit is contained in:
@@ -11,15 +11,6 @@
|
||||
<param name="scheme">https</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
|
||||
<!-- Issuu Settings -->
|
||||
<provider name="Issuu" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[issuu.com/(?:.*)/docs]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[https://issuu.com/oembed]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">json</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
|
||||
<!-- Daily Motion -->
|
||||
<provider name="DailyMotion" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
@@ -29,21 +20,5 @@
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
|
||||
<!-- Hulu -->
|
||||
<provider name="Hulu" type="Umbraco.Web.Media.EmbedProviders.OEmbedVideo, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[hulu\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.hulu.com/api/oembed.xml]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web">
|
||||
<param name="format">xml</param>
|
||||
</requestParams>
|
||||
</provider>
|
||||
|
||||
<!-- IFTTT Settings -->
|
||||
<provider name="IFTTT" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, Umbraco.Web">
|
||||
<urlShemeRegex><![CDATA[ifttt\.com/]]></urlShemeRegex>
|
||||
<apiEndpoint><![CDATA[http://www.ifttt.com/oembed/]]></apiEndpoint>
|
||||
<requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, Umbraco.Web"></requestParams>
|
||||
</provider>
|
||||
|
||||
</embed>
|
||||
|
||||
24
src/Umbraco.Web/Media/EmbedProviders/Hulu.cs
Normal file
24
src/Umbraco.Web/Media/EmbedProviders/Hulu.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Web.Media.EmbedProviders
|
||||
{
|
||||
public class Hulu : EmbedProviderBase
|
||||
{
|
||||
public override string ApiEndpoint => "http://www.hulu.com/api/oembed.json";
|
||||
|
||||
public override string[] UrlSchemeRegex => new string[]
|
||||
{
|
||||
@"hulu.com/watch/.*"
|
||||
};
|
||||
|
||||
public override Dictionary<string, string> RequestParams => new Dictionary<string, string>();
|
||||
|
||||
public override string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0)
|
||||
{
|
||||
var requestUrl = base.GetEmbedProviderUrl(url, maxWidth, maxHeight);
|
||||
var oembed = base.GetJsonResponse<OEmbedResponse>(requestUrl);
|
||||
|
||||
return oembed.GetHtml();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
src/Umbraco.Web/Media/EmbedProviders/Issuu.cs
Normal file
28
src/Umbraco.Web/Media/EmbedProviders/Issuu.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Web.Media.EmbedProviders
|
||||
{
|
||||
public class Issuu : EmbedProviderBase
|
||||
{
|
||||
public override string ApiEndpoint => "https://issuu.com/oembed";
|
||||
|
||||
public override string[] UrlSchemeRegex => new string[]
|
||||
{
|
||||
@"issuu.com/.*/docs/.*"
|
||||
};
|
||||
|
||||
public override Dictionary<string, string> RequestParams => new Dictionary<string, string>()
|
||||
{
|
||||
//ApiUrl/?format=xml
|
||||
{"format", "xml"}
|
||||
};
|
||||
|
||||
public override string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0)
|
||||
{
|
||||
var requestUrl = base.GetEmbedProviderUrl(url, maxWidth, maxHeight);
|
||||
var xmlDocument = base.GetXmlResponse(requestUrl);
|
||||
|
||||
return GetXmlProperty(xmlDocument, "/oembed/html");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,14 @@ namespace Umbraco.Web.Runtime
|
||||
.Append<Twitter>()
|
||||
.Append<Vimeo>()
|
||||
.Append<Ted>()
|
||||
.Append<Soundcloud>();
|
||||
.Append<Soundcloud>()
|
||||
.Append<Issuu>()
|
||||
.Append<Hulu>();
|
||||
|
||||
|
||||
//Giphy
|
||||
//Meetup
|
||||
//Spotify
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,9 @@
|
||||
<Compile Include="Media\EmbedProviders\Flickr.cs" />
|
||||
<Compile Include="Media\EmbedProviders\GettyImages.cs" />
|
||||
<Compile Include="Media\EmbedProviders\SoundCloud.cs" />
|
||||
<Compile Include="Media\EmbedProviders\Hulu.cs" />
|
||||
<Compile Include="Media\EmbedProviders\Ted.cs" />
|
||||
<Compile Include="Media\EmbedProviders\Issuu.cs" />
|
||||
<Compile Include="Media\EmbedProviders\Vimeo.cs" />
|
||||
<Compile Include="Media\EmbedProviders\Twitter.cs" />
|
||||
<Compile Include="Media\EmbedProviders\Kickstarter.cs" />
|
||||
|
||||
Reference in New Issue
Block a user