Class Index | File Index

Classes


Class IYYReceptionChannel


Extends IYYCommon.
接待频道接口,提供获取,设置,取消接待频道等功能。
Defined in: yyapi.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
IYYReceptionChannel 构造函数。
Method Summary
Method Attributes Method Name and Description
 
获取接待频道。
 
设置接待频道。某些情况下需要等待几秒才生效。
 
反设置接待频道,移除接待频道。
Methods borrowed from class IYYCommon:
addEventListener, removeEventListener
Class Detail
IYYReceptionChannel()
IYYReceptionChannel 构造函数。
Method Detail
{Object} getReceptionChannel()
获取接待频道。
使用示例:
var result = yy.channel.receptionChannel.getReceptionChannel();
if(result.ret==0)
{
   if(result.cid==0)
   {
       document.getElementById("txtLog").innerHTML = "尚未设置接待频道";
   }
   else
   {
       document.getElementById("txtLog").innerHTML = "接待频道Id:" + result.cid;
   }
}
  
成功的返回值示例:{ ret:0,cid:88995544}
失败的返回值示例:{ ret:984832}
Returns:
返回接待频道信息,具体属性如下。
ret: Number类型 返回码 0=成功,非0值失败,具体请参考错误代码。
cid: Number类型 接待频道的长位Id。如果为0,表示当前没有设置接待频道

{Object} setReceptionChannel(cid)
设置接待频道。某些情况下需要等待几秒才生效。
Parameters:
{Number} cid
频道的长位id。
Returns:
返回调用是否成功,是一个Object对象,具体属性如下。
ret: Number类型 返回码 0=成功,非0值失败,具体请参考错误代码。

{Object} unSetReceptionChannel()
反设置接待频道,移除接待频道。
Returns:
返回调用是否成功,具体属性如下。
ret: Number类型 返回码 0=成功,非0值失败,具体请参考错误代码。

Documentation generated by JsDoc Toolkit 2.4.0