1 | import { ComponentType } from 'react'
|
2 | import { StandardProps } from './common'
|
3 | interface RtcRoomProps extends StandardProps {
|
4 | /** rtc-room 组件的唯一标识符
|
5 | * @supported swan
|
6 | */
|
7 | id?: string
|
8 | /** 是否开启摄像头
|
9 | * @supported swan
|
10 | * @default true
|
11 | */
|
12 | enableCamera?: boolean
|
13 | /** 是否开启摄像头自动对焦
|
14 | * @supported swan
|
15 | * @default true
|
16 | */
|
17 | enableAutoFocus?: boolean
|
18 | /** 是否支持双手滑动调整摄像头聚焦
|
19 | * @supported swan
|
20 | * @default false
|
21 | */
|
22 | enableZoom?: boolean
|
23 | /** 设置前置还是后置摄像头,有效值:front、back
|
24 | * @supported swan
|
25 | * @default "front"
|
26 | */
|
27 | devicePosition?: 'front' | 'back'
|
28 | /** 是否开启麦克风
|
29 | * @supported swan
|
30 | * @default true
|
31 | */
|
32 | enableMic?: boolean
|
33 | /** 是否开启音频自动增益
|
34 | * @supported swan
|
35 | * @default false
|
36 | */
|
37 | enableAgc?: boolean
|
38 | /** 是否开启音频噪声抑制
|
39 | * @supported swan
|
40 | * @default false
|
41 | */
|
42 | enableAns?: boolean
|
43 | /** 最大码率
|
44 | * @supported swan
|
45 | * @default 900
|
46 | */
|
47 | bitrate?: number
|
48 | /** 视频分辨率宽
|
49 | * @supported swan
|
50 | * @default 360
|
51 | */
|
52 | videoWidth?: number
|
53 | /** 视频分辨率高
|
54 | * @supported swan
|
55 | * @default 640
|
56 | */
|
57 | videoHeight?: number
|
58 | /** 设置远端看到的画面的镜像效果,该属性的变化不会影响到本地画面,仅影响远端看到的画面效果
|
59 | * @supported swan
|
60 | * @default false
|
61 | */
|
62 | enableRemoteMirror?: boolean
|
63 | /** 设置本地摄像头预览画面的镜像效果,有效值:auto、enable、disable
|
64 | * @supported swan
|
65 | * @default "auto"
|
66 | */
|
67 | localMirror?: 'auto' | 'enable' | 'disable'
|
68 | /** 设置声音输出方式,有效值:speaker、ear
|
69 | * @supported swan
|
70 | * @default "speaker"
|
71 | */
|
72 | soundMode?: 'speaker' | 'ear'
|
73 | /** 房间状态变化事件,参考下方状态码,detail = { code, msg, userInfo }
|
74 | * @supported swan
|
75 | */
|
76 | onStateChange?: CommonEventFunction
|
77 | /** 错误事件。参考下方错误码,detail = { errMsg, errCode }
|
78 | * @supported swan
|
79 | */
|
80 | onError?: CommonEventFunction
|
81 | }
|
82 | /** 实时音视频通话房间
|
83 | * @classification media
|
84 | * @supported swan
|
85 | * @see https://smartprogram.baidu.com/docs/develop/component/media_rtc-room/
|
86 | */
|
87 | declare const RtcRoom: ComponentType<RtcRoomProps>
|
88 | export { RtcRoom, RtcRoomProps }
|