feat: useVoice

This commit is contained in:
Tristan Yang
2023-03-24 23:07:56 +08:00
parent da00f3b797
commit 92411d0468
20 changed files with 331 additions and 132 deletions
+6
View File
@@ -1,3 +1,5 @@
import { IAgoraRTCClient, IRemoteAudioTrack } from "agora-rtc-sdk-ng";
interface BeforeInstallPromptEvent extends Event {
/**
* Returns an array of DOMString items containing the platforms on which the event was dispatched.
@@ -29,6 +31,10 @@ export declare global {
__WB_MANIFEST: Array<PrecacheEntry | string>;
skipWaiting: () => void;
CACHE: { [key: string]: typeof localforage | undefined };
VOICE_CLIENT?: IAgoraRTCClient;
VOICE_TRACK_MAP: {
[key: number]: IRemoteAudioTrack | undefined
}
}
interface WindowEventMap {
beforeinstallprompt: BeforeInstallPromptEvent;
+7
View File
@@ -27,6 +27,13 @@ export interface AgoraConfig {
rtm_key: string;
rtm_secret: string;
}
export interface AgoraVoicingListResponse {
success: boolean,
data: {
channels: { channel_name: string, user_count: number }[],
total_size: number
}
}
export interface AgoraTokenResponse {
agora_token: string,
uid: number,