@@ -29,6 +29,19 @@ export interface AppTitleInRoom extends AppTitleBase {
2929 roomId : string ;
3030}
3131
32+ export interface GetFaviconParameters {
33+ // colour parameters
34+ bgColor : string ;
35+ textColor : string ;
36+ // font styling parameters
37+ fontFamily : string ;
38+ fontWeight : "normal" | "italic" | "bold" | "bolder" | "lighter" | number ;
39+
40+ // positioning parameters
41+ isUp : boolean ;
42+ isLeft : boolean ;
43+ }
44+
3245export type AppTitleContext = AppTitleBase | AppTitleInRoom ;
3346
3447export interface ProvideBrandingExtensions {
@@ -38,10 +51,25 @@ export interface ProvideBrandingExtensions {
3851 * @returns A string to be used for the full title, or null to use the default title.
3952 */
4053 getAppTitle ( context : AppTitleContext ) : string | null ;
54+ /**
55+ * Called when the app needs to generate the basic app favicon.
56+ * @returns A string URL for the icon, or null if no new icon should be generated.
57+ */
58+ getFaviconSrc ( ) : PromiseLike < string | null > ;
59+ /**
60+ * Called when the app needs to generate a new "badge" favicon.
61+ * @param content The content inside the "badge".
62+ * @param opts Extra parameters for the badge.
63+ * @returns A string URL for the icon, or null if no new icon should be generated.
64+ */
65+ getFaviconSrc ( content : number | string , opts : GetFaviconParameters ) : PromiseLike < string | null > ;
4166}
4267
4368export abstract class BrandingExtensionsBase implements ProvideBrandingExtensions {
4469 public getAppTitle ( context : AppTitleContext ) : string | null {
4570 return null ;
4671 }
72+ public async getFaviconSrc ( content ?: number | string , opts ?: GetFaviconParameters ) : Promise < string | null > {
73+ return null ;
74+ }
4775}
0 commit comments