UNPKG

@xnstream/player-sdk

Version:

XStream Player SDK - A powerful video player SDK for streaming content

33 lines 1.2 kB
import type { DeviceInfo, RegistrationResponse, RSession } from '../types'; export declare class SessionRegistration { private storage; private readonly SESSION_KEY; private readonly SECRET_KEY; private readonly appId; private aps?; private constructor(); static create(appId: string): Promise<SessionRegistration>; private generateDeviceInfo; getDeviceInfo(): Promise<DeviceInfo>; getAppId(): string; getAps(): string | undefined; setAps(): Promise<void>; /** * Register device with the server (POST /player/register) */ registerWithServer(resourceCode: string, baseUrl: string): Promise<RegistrationResponse>; /** * Refresh session (POST /player/sid/refresh) */ refreshSession(resourceCode: string, baseUrl: string, sessionId: string): Promise<RSession>; /** * Fetch resource details from the server (POST /player/resource) */ fetchResource(resourceCode: string, baseUrl: string): Promise<RSession>; /** * Get the current session ID from storage */ getSession(): Promise<string | undefined>; unregister(): Promise<void>; } //# sourceMappingURL=SessionRegistration.d.ts.map