Move CoWebsite to generic class
This commit is contained in:
parent
f5f71f32ee
commit
7b6a3949bc
12 changed files with 508 additions and 349 deletions
17
front/src/WebRtc/CoWebsite/CoWesbite.ts
Normal file
17
front/src/WebRtc/CoWebsite/CoWesbite.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import type CancelablePromise from "cancelable-promise";
|
||||
import type { Readable, Writable } from "svelte/store";
|
||||
|
||||
export type CoWebsiteState = "asleep" | "loading" | "ready";
|
||||
|
||||
export interface CoWebsite {
|
||||
getId(): string;
|
||||
getUrl(): URL;
|
||||
getState(): CoWebsiteState;
|
||||
getStateSubscriber(): Readable<CoWebsiteState>;
|
||||
getIframe(): HTMLIFrameElement | undefined;
|
||||
getLoadIframe(): CancelablePromise<HTMLIFrameElement> | undefined;
|
||||
getWidthPercent(): number | undefined;
|
||||
isClosable(): boolean;
|
||||
load(): CancelablePromise<HTMLIFrameElement>;
|
||||
unload(): Promise<void>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue