Pages Menu
TwitterRssFacebook

Posted by on Jun 4, 2015 in Learn Skype Web SDK

Learn Skype Web SDK Day 26 : Creating a Conference

Learn Skype Web SDK Day 26 : Creating a Conference

[contemplate-1]
View Demo

A conference is nothing more than a conversation with more than one person. This is as oversimplification of course, but it can help to think like this when using the Skype for Web API, because that is the abstraction it provides.

When using the API, you can create a conference simply by creating a conversation exactly as you normally would, but adding more than one participant. Likewise, once a conversation has been established you can add participants. In the background the conversation will upscale to a conference, but the difference won’t be obvious via the API, and you don’t need to modify how you normally work with conversations:

[code language=”javascript”]
var conversation = client.conversationsManager.createConversation();
var convParticipant1 = conversation.createParticipant(contact1);
var convParticipant2 = conversation.createParticipant(contact2);
conversation.participants.add(convParticipant1);
conversation.participants.add(convParticipant2);
[/code]

There are two indicators though, which you can use to identify the difference between conversation and conference. The first is a isGroupConversation flag, which is part of the Conversation object. By registering state changes on this property you can be kept informed of when the upscale to conference occurs. The second is the conference URI. This is populated for conferences, and is the SIP URI which other Lync users can use to access the conference. Again, this has a changed event:

[code language=”javascript”]
conversation.isGroupConversation.changed(function () {
//do something when the conversation becomes a conference.
});

conversation.uri.changed(function () {
//do something with the conference URI
})
[/code]

In the example code for this post, specify two participants to start a conference. You can also then use the generated conference URI to allow other users to join.

In the code sample below, the user’s list of contacts and groups is displayed:

[code language=”javascript”]



isGroupConversation:
Conference URI:



[/code]

Demo Online

You can try this code out against your own Skype for Business environment by going to the demo page. From here you can also download the code from GitHub if you want to host it locally, or take it and use it in your next project.
[contemplate-2]

1 Comment

  1. Is there a way to join two chat conferences at the same time and chat in them ? The problem I get is that as soon as I create a second conversation the old one gets overridden and stops working and only the new one works.

Post a Reply

Your email address will not be published. Required fields are marked *