title: wilddog.video.Participant
代表视频通话或视频会议的一个参与者。
属性
Id
类型
String
说明
Participant 的 ID。
stream
类型
wilddog.video.RemoteStream
说明
Participant 的媒体流。
常量
事件
| 事件类型 | 说明 |
|---|---|
| stream_added | 收到参与者的媒体流后触发。 |
| error | 参与者发送媒体流失败时触发。 |
stream_added
参数
| 参数名 | 说明 |
|---|---|
| stream | remoteStream 类型。 |
示例
//监听邀请事件participant.on('stream_added', function(stream){//收到媒体流console.log('Accepted an invite from ' + incomingInvite.from);});
error
参数
| 参数名 | 说明 |
|---|---|
| error | Error 类型。 |
示例
//监听错误事件participant.on('error', function(error){//接受到错误console.log('Accepted an error ' + error.message);});
