@arcware-cloud/pixelstreaming-websdk
Version:
WebSDK for easy implementation of pixel streaming with Arcware Cloud Services. Heavily based on the '@epicgames-ps' library.
30 lines (29 loc) • 942 B
TypeScript
import { z } from "zod";
declare const ZOptions: z.ZodObject<{
localStorageKey: z.ZodDefault<z.ZodString>;
keepSession: z.ZodDefault<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
localStorageKey?: string;
keepSession?: number;
}, {
localStorageKey?: string;
keepSession?: number;
}>;
type Options = z.infer<typeof ZOptions>;
/** The sessionId is stored in the localStorage to allow for reconnection and
* to prevent spamming start requests of instances, when smashing F5.
*/
export declare class Session {
private _current?;
get current(): string;
get noSession(): boolean;
get id(): string | null;
private options;
private get localStorageKey();
constructor(options?: Options);
/** Set's the session with creation date for the given storage key to the localStorage. */
set(sessionId: string): void;
/** Removes a session from the localStorage. */
unset(): void;
}
export {};