strapi-plugin-oembed
Version:
Embed content from third-party sites in Strapi
27 lines (26 loc) • 803 B
TypeScript
import type { OembedData } from '@extractus/oembed-extractor';
declare const service: () => {
fetch(url: string): Promise<{
error: string;
url?: undefined;
oembed?: undefined;
thumbnail?: undefined;
} | {
url: string;
oembed: OembedData;
thumbnail: string;
error?: undefined;
}>;
postprocess(oembed: OembedData): OembedData;
/**
* YouTube offers high resolution images
*/
postprocessYouTube(oembed: OembedData): OembedData;
/**
* For cookie privacy, download the thumbnail and store as an inline image.
* This also gets around CSP issues.
*/
generateThumbnail(oembed: OembedData): Promise<string>;
generateBase64FromUrl(url: string): Promise<string>;
};
export default service;