diff --git a/src/lifecycles/BrandingExtensions.ts b/src/lifecycles/BrandingExtensions.ts index 1ff7105..1f11d24 100644 --- a/src/lifecycles/BrandingExtensions.ts +++ b/src/lifecycles/BrandingExtensions.ts @@ -29,6 +29,19 @@ export interface AppTitleInRoom extends AppTitleBase { roomId: string; } +export interface GetFaviconParameters { + // colour parameters + bgColor: string; + textColor: string; + // font styling parameters + fontFamily: string; + fontWeight: "normal" | "italic" | "bold" | "bolder" | "lighter" | number; + + // positioning parameters + isUp: boolean; + isLeft: boolean; +} + export type AppTitleContext = AppTitleBase | AppTitleInRoom; export interface ProvideBrandingExtensions { @@ -38,10 +51,25 @@ export interface ProvideBrandingExtensions { * @returns A string to be used for the full title, or null to use the default title. */ getAppTitle(context: AppTitleContext): string | null; + /** + * Called when the app needs to generate the basic app favicon. + * @returns A string URL for the icon, or null if no new icon should be generated. + */ + getFaviconSrc(): PromiseLike; + /** + * Called when the app needs to generate a new "badge" favicon. + * @param content The content inside the "badge". + * @param opts Extra parameters for the badge. + * @returns A string URL for the icon, or null if no new icon should be generated. + */ + getFaviconSrc(content: number | string, opts: GetFaviconParameters): PromiseLike; } export abstract class BrandingExtensionsBase implements ProvideBrandingExtensions { public getAppTitle(context: AppTitleContext): string | null { return null; } + public async getFaviconSrc(content?: number | string, opts?: GetFaviconParameters): Promise { + return null; + } }