Add return type too
This commit is contained in:
parent
21c7bb979e
commit
1164e6f1e7
1 changed files with 25 additions and 1 deletions
|
@ -26,6 +26,30 @@ import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||||
|
|
||||||
import { usePageUnload } from "./usePageUnload";
|
import { usePageUnload } from "./usePageUnload";
|
||||||
|
|
||||||
|
export interface UseGroupCallType {
|
||||||
|
state: GroupCallState;
|
||||||
|
calls: MatrixCall[];
|
||||||
|
localCallFeed: CallFeed;
|
||||||
|
activeSpeaker: string;
|
||||||
|
userMediaFeeds: CallFeed[];
|
||||||
|
microphoneMuted: boolean;
|
||||||
|
localVideoMuted: boolean;
|
||||||
|
error: Error;
|
||||||
|
initLocalCallFeed: () => void;
|
||||||
|
enter: () => void;
|
||||||
|
leave: () => void;
|
||||||
|
toggleLocalVideoMuted: () => void;
|
||||||
|
toggleMicrophoneMuted: () => void;
|
||||||
|
toggleScreensharing: () => void;
|
||||||
|
requestingScreenshare: boolean;
|
||||||
|
isScreensharing: boolean;
|
||||||
|
screenshareFeeds: CallFeed[];
|
||||||
|
localScreenshareFeed: CallFeed;
|
||||||
|
localDesktopCapturerSourceId: string;
|
||||||
|
participants: RoomMember[];
|
||||||
|
hasLocalParticipant: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface State {
|
interface State {
|
||||||
state: GroupCallState;
|
state: GroupCallState;
|
||||||
calls: MatrixCall[];
|
calls: MatrixCall[];
|
||||||
|
@ -44,7 +68,7 @@ interface State {
|
||||||
hasLocalParticipant: boolean;
|
hasLocalParticipant: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useGroupCall(groupCall: GroupCall) {
|
export function useGroupCall(groupCall: GroupCall): UseGroupCallType {
|
||||||
const [
|
const [
|
||||||
{
|
{
|
||||||
state,
|
state,
|
||||||
|
|
Loading…
Reference in a new issue