@100mslive/hms-video-store
Version:
@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow
26 lines (25 loc) • 1.57 kB
TypeScript
import { WhiteboardInteractivityCenter } from './HMSWhiteboardCenter';
import { HMSInteractivityCenter, HMSPollQuestionCreateParams, InteractivityListener } from '../../interfaces';
import { HMSPoll, HMSPollCreateParams, HMSPollQuestionResponseCreateParams, HMSQuizLeaderboardResponse } from '../../interfaces/session-store/polls';
import { Store } from '../../sdk/store';
import { PollInfoParams } from '../../signal/interfaces';
import HMSTransport from '../../transport';
export declare class InteractivityCenter implements HMSInteractivityCenter {
private transport;
private store;
private listener?;
whiteboard: WhiteboardInteractivityCenter;
constructor(transport: HMSTransport, store: Store, listener?: InteractivityListener | undefined);
setListener(listener?: InteractivityListener): void;
createPoll(pollParams: HMSPollCreateParams): Promise<void>;
startPoll(poll: string | HMSPollCreateParams): Promise<void>;
addQuestionsToPoll(pollID: string, questions: HMSPollQuestionCreateParams[]): Promise<void>;
stopPoll(pollID: string): Promise<void>;
addResponsesToPoll(pollID: string, responses: HMSPollQuestionResponseCreateParams[]): Promise<void>;
fetchLeaderboard(pollID: string, offset: number, count: number): Promise<HMSQuizLeaderboardResponse>;
getPollResponses(poll: HMSPoll, self: boolean): Promise<void>;
getPolls(): Promise<HMSPoll[]>;
private createQuestionSetParams;
private getQuestionInPoll;
}
export declare const createHMSPollFromPollParams: (pollParams: PollInfoParams) => HMSPoll;