title: wilddog.video.Participant

代表视频通话或视频会议的一个参与者。

属性

Id

类型

  1. String

说明

Participant 的 ID。



stream

类型

  1. wilddog.video.RemoteStream

说明

Participant 的媒体流。



常量

事件

事件类型 说明
stream_added 收到参与者的媒体流后触发。
error 参与者发送媒体流失败时触发。



stream_added

参数

参数名 说明
stream remoteStream 类型。

示例

  1. //监听邀请事件
  2. participant.on('stream_added', function(stream){
  3. //收到媒体流
  4. console.log('Accepted an invite from ' + incomingInvite.from);
  5. });



error

参数

参数名 说明
error Error 类型。

示例

  1. //监听错误事件
  2. participant.on('error', function(error){
  3. //接受到错误
  4. console.log('Accepted an error ' + error.message);
  5. });