iscream-webrtc-sdk
Version:
I-scream WebRTC SDK for browser - LiveKit based real-time communication with teacher/student roles
27 lines (26 loc) • 1.26 kB
TypeScript
import type { Room, RemoteParticipant } from 'livekit-client';
import type { ParticipantInfo, DataMessage } from './types';
export declare class PresenterManager {
private currentPresenter;
private room;
private userRole;
private localIdentity;
private debug;
constructor(debug?: boolean);
setRoom(room: Room, userRole: 'teacher' | 'student', localIdentity: string): void;
getCurrentPresenter(): string | null;
isPresenter(identity: string): boolean;
setPresenter(participantIdentity: string, participants: ParticipantInfo[]): Promise<void>;
clearPresenter(): Promise<string | null>;
handlePresenterMessage(message: DataMessage, participants: ParticipantInfo[]): {
action: string;
presenterIdentity: string | null;
previousPresenter: string | null;
isMe: boolean;
} | null;
handleTeacherChange(action: 'joined' | 'left'): Promise<void>;
private sendDataMessage;
syncPresenterForNewParticipant(): Promise<void>;
canPublishMedia(userRole: 'teacher' | 'student' | null, localIdentity: string | null): boolean;
shouldShowParticipantVideo(participant: RemoteParticipant, userRole: 'teacher' | 'student' | null, participantRole: 'teacher' | 'student'): boolean;
}