The app bundle is several megabytes, so anything it needs to request at start (config.js, dynamic branding) waits for the whole download and parse first. A small script loaded ahead of it can start those requests early, but the app must be able to pick up exactly the resource it would have requested itself and fall back to a normal request otherwise. Define that contract: the preload script publishes each resource with the URL it was requested from on window.JitsiMeetPreload, and the app takes a resource once, only when the URL matches. Mobile has no preload script, so nothing is ever returned there.
86 lines
2.3 KiB
TypeScript
86 lines
2.3 KiB
TypeScript
import { IStore } from "./react/features/app/types";
|
|
import { IConfig } from "./react/features/base/config/configType";
|
|
import { IJitsiMeetPreload } from "./react/features/preload/types";
|
|
import {
|
|
DocumentPiPMediaSessionActionHandler,
|
|
ExtendedMediaSessionAction,
|
|
ExtendedMediaSessionActionHandler,
|
|
IDocumentPictureInPicture
|
|
} from "./react/features/pip/types";
|
|
|
|
export {};
|
|
|
|
declare global {
|
|
|
|
type Mutable<T> = { -readonly [P in keyof T]: T[P] };
|
|
|
|
const APP: {
|
|
store: IStore;
|
|
UI: any;
|
|
API: any;
|
|
conference: any;
|
|
debugLogs: any;
|
|
};
|
|
const interfaceConfig: any;
|
|
|
|
interface Navigator {
|
|
gpu?: {
|
|
requestAdapter(): Promise<GPUAdapter | null>;
|
|
};
|
|
}
|
|
|
|
interface GPUAdapter {
|
|
requestAdapterInfo?(): Promise<{ device: string }>;
|
|
}
|
|
|
|
interface Window {
|
|
config: IConfig;
|
|
JITSI_MEET_LITE_SDK?: boolean;
|
|
interfaceConfig?: any;
|
|
JitsiMeetJS?: any;
|
|
JitsiMeetPreload?: IJitsiMeetPreload;
|
|
MediaStreamTrackGenerator: {
|
|
new(options: { kind: string }): MediaStreamTrack & {
|
|
writable: WritableStream<VideoFrame>;
|
|
};
|
|
};
|
|
MediaStreamTrackProcessor: {
|
|
new(options: { track: MediaStreamTrack; maxBufferSize?: number }): {
|
|
readable: ReadableStream<VideoFrame>;
|
|
};
|
|
};
|
|
PressureObserver?: any;
|
|
PressureRecord?: any;
|
|
ReactNativeWebView?: any;
|
|
// selenium tests handler
|
|
_sharedVideoPlayer: any;
|
|
alwaysOnTop: { api: any };
|
|
documentPictureInPicture?: IDocumentPictureInPicture;
|
|
}
|
|
|
|
interface MediaSession {
|
|
setActionHandler(
|
|
action: ExtendedMediaSessionAction,
|
|
handler: ExtendedMediaSessionActionHandler | null
|
|
): void;
|
|
setActionHandler(
|
|
action: 'enterpictureinpicture',
|
|
handler: DocumentPiPMediaSessionActionHandler | null
|
|
): void;
|
|
}
|
|
|
|
interface Document {
|
|
mozCancelFullScreen?: Function;
|
|
webkitExitFullscreen?: Function;
|
|
}
|
|
|
|
const config: IConfig;
|
|
|
|
const JitsiMeetJS: any;
|
|
|
|
interface HTMLMediaElement {
|
|
setSinkId: (id: string) => Promise<undefined>;
|
|
stop: () => void;
|
|
}
|
|
}
|