Constructor Summary
Public Constructor | ||
public |
constructor(urlPatterns: Array<RegExp>) |
Member Summary
Public Members | ||
public |
urlPatterns: * |
Method Summary
Public Methods | ||
public |
Stub method caled by EmbedEngine. |
|
public |
errorMarkup(embed: Embed): * Returns markup if an error occurs resolving the embed |
|
public |
filterData(data: {html: String}) Can be overridden/replaced to modify a specific provider's data before it is passed to the client callback. |
|
public |
Resolves options.embedURL to an embed and passes it to callback. |
|
public |
Determines if a given URL matches this provider |
Public Members
public urlPatterns: * source
Public Methods
public configure(engineOptions: Object) source
Stub method caled by EmbedEngine. Can be overridden.
Params:
Name | Type | Attribute | Description |
engineOptions | Object |
public errorMarkup(embed: Embed): * source
Returns markup if an error occurs resolving the embed
Params:
Name | Type | Attribute | Description |
embed | Embed | Embed object |
Return:
* |
public filterData(data: {html: String}) source
Can be overridden/replaced to modify a specific provider's data before it is passed to the client callback.
Params:
Name | Type | Attribute | Description |
data | {html: String} | Data object containing embed html |
public getEmbed(embed: Embed, callback: function(error: Error, data: Object)) source
Resolves options.embedURL to an embed and passes it to callback.
public isMatch(embedURL: String): boolean source
Determines if a given URL matches this provider
Params:
Name | Type | Attribute | Description |
embedURL | String | URL to embed |
Test:
- OEmbedProvider OEmbedProvider#isMatch
- URLEmbedProvider URLEmbedProvider#isMatch
- OEmbedProvider OEmbedProvider#isMatch should match the provider url
- OEmbedProvider OEmbedProvider#isMatch should fail to match a different url
- URLEmbedProvider URLEmbedProvider#isMatch should match the provider url
- URLEmbedProvider URLEmbedProvider#isMatch should fail to match a different url