Cookie CSS

Sunday, June 11, 2017

Skype Web SDK - Part X


What is the Skype Web SDK?

The Skype Developer Platform for Web ("Skype Web SDK") is a set of JavaScript Web APIs and HTML controls that enable you to build web experiences that seamlessly integrate a wide variety of real-time collaboration models leveraging Skype for Business services and the larger Skype network. It provides support for multiple core collaboration services like presence, chat, audio, and video, enabling web experiences across a broad spectrum of users, platforms, and devices.



Today's Topic : Starting a Group Conversation


So today we'll simulate what happens when you click "Meet Now" in the desktop client and add people to a conference call, or what happens when you right click on a group and start a group conversation.  Lets look at the code.

var conversationsManager = application.conversationsManager; conversation = conversationsManager.createConversation(); conversation.selfParticipant.audio.state.when('Connected', function () { conversation.participants.added(function (person) { person.audio.state.when('Connected', function () { // Conversation established }); }); }); conversation.state.changed(function (newValue, reason, oldValue) { if (newValue === 'Disconnected' && (oldValue === 'Connected' || oldValue === 'Connecting')) { // Conversation ended } }); conversation.participants.add('sip:xxx'); conversation.participants.add('sip:yyy'); conversation.audioService.start().then(null, function (error) { // handle error });



So to break it down first we;

1.  Create an empty conversation.
2.  Wait for the conversation to become connected.
3.  Add participants.


Track participants mute state:

person.audio.isMuted.when(true, function () { // person.displayName() muted their audio }); person.audio.isMuted.when(false, function () { // person.displayName() unmuted their audio });


And finally leave the conversation;

conversation.leave().then(function () { // conversation ended }, function (error) { // handle error }).then(function () { // clean up operations });


Doug Routledge, C# Lync, Skype for Business, SQL, Exchange, UC, 
Full Stack Developer  BridgeOC Bridge Operator Console
Twitter - @droutledge @ndbridge



















No comments:

Post a Comment

Any spam comments will be deleted and your user account will be disabled.