我们在应用skype for business web sdk 开发网页视频通话时遇到了些问题,我们的视频通话能正常接通,但是显示的视频分辨率太低,sdk又没有接口可以设置,不知道怎么解决,求助。
环境: win10, IE11, 插件 Skype for business web plugin
我们的视频和Skype for business 客户端的视频对比如下,我的视频模糊而且宽度被裁减了,不知道Skype web sdk 里面为什么要默认裁减,而且还没有地方设置:
我们开始视频的JS代码如下:
function StartSingleVideo(personName)
{
var query = window.skypeWebApp.personsAndGroupsManager.createPersonSearchQuery();
query.text(personName);
query.limit(1);
query.getMore().then(function (results)
{
results.forEach(function (result)
{
var _person = result.result;
ParticPersonName = _person.displayName._value;
var conversationsManager = window.skypeWebApp.conversationsManager;
conversationSingle = conversationsManager.getConversation(_person.id._value);
conversationSingle.selfParticipant.video.state.when('Connected', function ()
{
conversationSingle.selfParticipant.video.channels(0).stream.source.sink.format('Fit');
conversationSingle.selfParticipant.video.channels(0).stream.source.sink.container(document.getElementById("selfvedio"));
});
conversationSingle.participants.added(function (person)
{
person.video.state.when('Connected', function ()
{
person.video.channels(0).stream.source.sink.format('Fit');
person.video.channels(0).stream.source.sink.container(document.getElementById("remotvedio"));
person.video.channels(0).isVideoOn.when(true, function ()
{
person.video.channels(0).isStarted(true);
});
person.video.channels(0).isVideoOn.when(false, function ()
{
// person.displayName() stopped streaming their video
});
});
});
conversationSingle.state.changed(function (newValue, reason, oldValue)
{
if (newValue === 'Disconnected' && (oldValue === 'Connected' || oldValue === 'Connecting'))
{
document.getElementById("VideoShow").style.visibility = "hidden";
document.getElementById("dialing").style.visibility = "hidden";
conversationSingle = null;
}
if(newValue == 'Connected')
{
console.log('已链接');
}
});
conversationSingle.videoService.start().then(function ()
{
var test = 0;
},function(error)
{
document.getElementById("status").innerHTML = error;
});
});
},function(error)
{
document.getElementById("status").innerHTML = error;
});
}