Options
All
  • Public
  • Public/Protected
  • All
Menu

Module RTCProtocol

Index

Type aliases

GetVoiceSign

GetVoiceSign: ({ voiceId, userId, roomId }: { roomId: string | number; userId: string; voiceId: string }) => Promise<GetVoiceSignReturnType>

Type declaration

    • ({ voiceId, userId, roomId }: { roomId: string | number; userId: string; voiceId: string }): Promise<GetVoiceSignReturnType>
    • Parameters

      • { voiceId, userId, roomId }: { roomId: string | number; userId: string; voiceId: string }
        • roomId: string | number
        • userId: string
        • voiceId: string

      Returns Promise<GetVoiceSignReturnType>

RTCActionReactCallback

RTCActionReactCallback: Pick<RTCProtocol, "join" | "quit" | "shock" | "toggleMicro" | "detectMicro">

RTCEventType

RTCEventType: { error: any; joinWillStart: any; joined: any; userVolumes: any; weakNetwork: any }

RTC 异步事件类型。

Type declaration

  • error:function
    • 错误\异常

      Parameters

      Returns void

  • joinWillStart:function
    • joinWillStart(): void
    • 即将加入房间。

      Returns void

  • joined:function
    • joined(): void
    • 成功加入语音房间。

      Returns void

  • userVolumes:function
    • 每个用户的音量。

      Parameters

      Returns void

  • weakNetwork:function
    • weakNetwork(): void
    • 弱网提醒事件。

      Returns void

UserVolume

UserVolume: { audioVolume: number; userId: string }

用户的音量信息。

Type declaration

  • audioVolume: number
  • userId: string