Open ai-bitheads opened 3 years ago
Hello
This is something we are discussing, we will update this issue to keep you updated.
typings/furioos-sdk.d.ts
:declare module "furioos-sdk" {
declare type PlayerOptions = {
whiteLabel?: boolean;
hideToolbar?: boolean;
hideTitle?: boolean;
hidePlayButton?: boolean;
overridedURL?: string;
debugAppMode?: boolean;
wsServerAddress?: string;
};
export declare class Player {
sdkDebug?: SDKDebug;
loaded: boolean;
debugAppMode: boolean;
sharedLink: string;
containerId: string;
embed?: HTMLIFrameElement;
options: PlayerOptions;
location?: string;
private _quality;
_onLoadCallback?: () => void;
_onSDKMessageCallback?: (data: any) => void;
_onUserActiveCallback?: () => void;
_onUserInactiveCallback?: () => void;
_onAppInstallProgress?: (value: any) => void;
_onAppInstallSuccess?: () => void;
_onAppInstallFail?: () => void;
_onAppStart?: () => void;
_onStreamStart?: () => void;
_onSessionStoppedCallback?: () => void;
_onStatsCallback?: (value: any) => void;
_getServerAvailabilityErrorCallback?: (error: any) => void;
_getServerAvailabilityCallback?: (stats: any) => void;
_getServerMetadataErrorCallback?: (error: any) => void;
_getServerMetadataCallback?: (metadata: any) => void;
static qualityValues: {
readonly AUTO: 0;
readonly LOW: 1;
readonly MEDIUM: 2;
readonly HIGH: 3;
readonly ULTRA: 4;
};
static regions: {
EUW: number[];
USW: number[];
USE: number[];
AUE: number[];
};
constructor(
sharedLinkID: string,
containerId: string,
options: PlayerOptions,
);
_createIframe(): HTMLIFrameElement;
_displayErrorMessage(message: string): void;
_onLoad(): void;
get quality(): "AUTO" | "LOW" | "MEDIUM" | "HIGH" | "ULTRA";
onLoad(onLoadCallback: () => void): void;
setDefaultLocation(location: string): void;
start(location?: string): void;
stop(): void;
maximize(): void;
minimize(): void;
setQuality(value: number): void;
restartStream(): void;
onSDKMessage(onSDKMessageCallback: (data: any) => void): void;
onUserActive(onUserActiveCallback: () => void): void;
onUserInactive(onUserInactiveCallback: () => void): void;
onAppInstallProgress(onAppInstallProgress: (value: any) => void): void;
onAppInstallSuccess(onAppInstallSuccess: () => void): void;
onAppInstallFail(onAppInstallFail: () => void): void;
onAppStart(onAppStart: () => void): void;
onStreamStart(onStreamStart: () => void): void;
onSessionStopped(onSessionStoppedCallback: () => void): void;
onStats(callback: (value: any) => void): void;
sendSDKMessage(data: any): void;
setUserActive(): void;
setThumbnailUrl(thumbnailUrl: string): void;
getServerAvailability(
getServerAvailabilityCallback: (stats: any) => void,
getServerAvailabilityErrorCallback: (error: any) => void,
): void;
getServerMetadata(
getServerMetadataCallback: (metadata: any) => void,
getServerMetadataErrorCallback: (error: any) => void,
): void;
}
declare class SDKDebug {
private ws;
onReady?: () => void;
private _onSDKMessageCallback?;
constructor(localServerAddress: string);
private _wsOnError;
private _wsOnClose;
private _wsOnMessage;
private _wsOnSendError;
onSDKMessage(onSDKMessageCallback: (data: any) => void): void;
sendSDKMessage(data: any): void;
}
}
Are you guys planning on adding type definitions?