Azure.Communication.Rooms
1.0.0-beta.1
Prefix Reserved
See the version list below for details.
dotnet add package Azure.Communication.Rooms --version 1.0.0-beta.1
NuGet\Install-Package Azure.Communication.Rooms -Version 1.0.0-beta.1
<PackageReference Include="Azure.Communication.Rooms" Version="1.0.0-beta.1" />
paket add Azure.Communication.Rooms --version 1.0.0-beta.1
#r "nuget: Azure.Communication.Rooms, 1.0.0-beta.1"
// Install Azure.Communication.Rooms as a Cake Addin #addin nuget:?package=Azure.Communication.Rooms&version=1.0.0-beta.1&prerelease // Install Azure.Communication.Rooms as a Cake Tool #tool nuget:?package=Azure.Communication.Rooms&version=1.0.0-beta.1&prerelease
Azure Communication Rooms client library for .NET
This package contains a C# SDK for the Rooms Service of Azure Communication Services.
Rooms overview Azure Communication Services (ACS) Rooms is a set of APIs, used by Contoso server applications to create a server-managed conversation space with fixed set of lifetime and participants, pre-defining rules from server-tier both who and when can communicate (like scheduled meeting creation).
With the Public Preview release of ACS Rooms, Contoso will be able to: create a meeting space with known time coordinates (start/end time), join voice/video calls within that meeting space using the ACS web calling SDK or native mobile calling SDKs, add participants to a room, assign pre-defined roles to room participants, set rooms call join policies (e.g., open or closed room), and consume Event Grid notifications for calling events. The server-side functionalities can be accessed via a refreshed API and a full set of SDKs (.NET, Java, Python, JavaScript/TypeScript).
The main scenarios where Rooms can best be used: Virtual Visits (e.g., telemedicine, remote financial advisor, virtual classroom, etc...) Virtual Events (e.g., live event, company all-hands, live concert, etc...) Champion scenarios
[Source code][source] | [Package (NuGet)][package] | Product documentation
Getting started
Install the package
Install the Azure Communication Rooms client library for .NET with NuGet:
dotnet add package Azure.Communication.Rooms --prerelease
Prerequisites
You need an Azure subscription and a Communication Service Resource to use this package.
To create a new Communication Service, you can use the Azure Portal, the Azure PowerShell, or the .NET management client library.
Key concepts
RoomsClient
provides the functionality to create room, update room, get room, delete room, add participants, remove participant, update participant and get participants.
Using statements
using Azure.Communication.Rooms
Authenticate the client
Rooms clients can be authenticated using the connection string acquired from an Azure Communication Resource in the Azure Portal.
var connectionString = Environment.GetEnvironmentVariable("connection_string") // Find your Communication Services resource in the Azure portal
RoomsClient client = new RoomsClient(connectionString);
Examples
The following sections provide several code snippets covering some of the most common tasks, which is available at Sample1_RoomsRequests.md
Troubleshooting
Service Responses
A RequestFailedException
is thrown as a service response for any unsuccessful requests. The exception contains information about what response code was returned from the service.
try
{
CommunicationIdentityClient communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient();
var communicationUser1 = communicationIdentityClient.CreateUserAsync().Result.Value.Id;
var communicationUser2 = communicationIdentityClient.CreateUserAsync().Result.Value.Id;
var validFrom = DateTime.UtcNow;
var validUntil = validFrom.AddDays(1);
List<RoomParticipant> createRoomParticipants = new List<RoomParticipant>();
RoomParticipant participant1 = new RoomParticipant(new CommunicationUserIdentifier(communicationUser1), RoleType.Presenter);
RoomParticipant participant2 = new RoomParticipant(new CommunicationUserIdentifier(communicationUser2), RoleType.Attendee);
Response<CommunicationRoom> createRoomResponse = await roomsClient.CreateRoomAsync(validFrom, validUntil, RoomJoinPolicy.InviteOnly, createRoomParticipants);
CommunicationRoom createRoomResult = createRoomResponse.Value;
}
catch (RequestFailedException ex)
{
Console.WriteLine(ex.Message);
}
Next steps
- [Read more about Rooms in Azure Communication Services][nextsteps]
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Update the sample code links once the sdk is published
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Azure.Communication.Common (>= 1.1.0)
- Azure.Core (>= 1.25.0)
- System.Text.Json (>= 4.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.0 | 20,333 | 4/18/2024 |
1.1.0-beta.1 | 13,577 | 10/12/2023 |
1.0.0 | 40,612 | 6/12/2023 |
1.0.0-beta.2 | 372 | 5/17/2023 |
1.0.0-beta.1 | 7,192 | 8/10/2022 |