skype

概述

本插件封装了Skype for Business App SDK

关于Skype

The Skype for Business App SDK enables developers to seamlessly integrate messaging, audio, and video experiences into mobile and tablet applications.

注意:本插件 iOS 平台上最低适配系统版本为 iOS 9.0

android配置 :

  • 下载 skypeAppendix插件zip包并解压(解压后会看到一个skypeAppendix文件夹)
  • 打开\res_skypeAppendix\res\values文件夹中skype_strings.xml文件,替换com.apicloud.skypedemo为自己项目包名
  • 重新打包为skypeAppendix.zip,以自定义插件方式与skype插件一起编译

插件接口

open

打开视频通话页面

open({params}, callback(ret,err))

params

displayName:

  • 类型:字符串类型
  • 描述:Name of the guest user, which will be visible in all Skype for Business clients that also join the meeting

meetingUri:

  • 类型:字符串类型
  • 描述:The meeting URI to join

selfRect:

  • 类型:JSON 对象
  • 描述:自己画面的位置及尺寸
  • 内部字段:
{
    x: 0,   // 数字类型;插件左上角的 x 坐标(相对于所属的 Window 或 Frame);默认值:0
    y: 0,   // 数字类型;插件左上角的 y 坐标(相对于所属的 Window 或 Frame);默认值:0
    w: 50, // 数字类型;插件的宽度;iOS支持设置'auto';默认值:50
    h: 50  // 数字类型;插件的高度;iOS支持设置'auto';默认值:50
}

participantRect:

  • 类型:JSON 对象
  • 描述:对方画面的位置及尺寸
  • 内部字段:
{
    x: 50,   // 数字类型;插件左上角的 x 坐标(相对于所属的 Window 或 Frame);默认值:50
    y: 0,   // 数字类型;插件左上角的 y 坐标(相对于所属的 Window 或 Frame);默认值:0
    w: 50, // 数字类型;插件的宽度;支持设置'auto';默认值:50
    h: 50  // 数字类型;插件的高度;支持设置'auto';默认值:50
}

fixedOn:

  • 类型:字符串
  • 描述:(可选项)插件所属 Frame 的名字,若不传则插件归属于当前 Window

fixed:

  • 类型:布尔
  • 描述:(可选项)插件是否随所属 Window 或 Frame 滚动
  • 默认值:true(不随之滚动)

示例代码

var skype = api.require('skype');
skype.open({
});

可用性

iOS系统,Android系统

可提供的1.0.0及更高版本

leave

离开通话

leave(callback(ret))

callback(ret)

ret:

  • 类型:JSON 对象
  • 内部字段:
{
    status:true,      //布尔类型;是否成功
}

示例代码

var skype = api.require('skype');
skype.leave(function(ret){
    api.alert({msg: JSON.stringify(ret)});
});

可用性

iOS系统,Android系统

可提供的1.0.0及更高版本

removeView

移除摄像头页面

removeView()

示例代码

var skype = api.require('skype');
skype.removeView();

可用性

iOS系统,Android系统

可提供的1.0.0及更高版本

changeActiveCamera

切换摄像头

changeActiveCamera(callback(ret))

callback(ret)

ret:

  • 类型:JSON 对象
  • 内部字段:
{
    status:true,      //布尔类型;是否成功
}

示例代码

var skype = api.require('skype');
skype.changeActiveCamera(function(ret){
    api.alert({msg: JSON.stringify(ret)});
});

可用性

iOS系统,Android系统

可提供的1.0.0及更高版本

toggleVideoPaused

切换视频暂停状态

toggleVideoPaused(callback(ret))

callback(ret)

ret:

  • 类型:JSON 对象
  • 内部字段:
{
    status:true,      //布尔类型;是否成功
}

示例代码

var skype = api.require('skype');
skype.toggleVideoPaused(function(ret){
    api.alert({msg: JSON.stringify(ret)});
});

可用性

iOS系统,Android系统

可提供的1.0.0及更高版本

addConversationListener

视频通话监听(仅iOS支持)

addConversationListener(callback(ret))

callback(ret)

ret:

  • 类型:JSON 对象
  • 内部字段:
{
     eventType:'',    //字符串类型;事件类型
                         //didSubscribeToVideo:At incoming video, unhide the participant video view
                         //videoService:When it's ready, start the video service and show the outgoing video view
                         //didSubscribeToVideo:When incoming video is ready, show it.

示例代码

var skype = api.require('skype');
skype.addConversationListener(function(ret, err) {
    if (ret) {
        api.alert({msg: JSON.stringify(ret)});
    } else {
        api.alert({msg: JSON.stringify(err)});
    }
});

可用性

iOS系统

可提供的1.0.0及更高版本

是否仍需要帮助? 请保持联络!
最后更新于 2024/04/24