-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the GetStateAsync() API and the OnStateChanged.
- Loading branch information
1 parent
eb9baab
commit 371175d
Showing
18 changed files
with
558 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="CallAdapterState.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.Azure.Communication.UI.Blazor | ||
{ | ||
using System.Text.Json.Serialization; | ||
|
||
/// <summary> | ||
/// Represents the current <see cref="CallAdapter"/> state. | ||
/// </summary> | ||
public class CallAdapterState | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="CallAdapterState"/> class. | ||
/// </summary> | ||
/// <param name="userId">The <see cref="CommunicationUserKind"/> of the current user.</param> | ||
public CallAdapterState(CommunicationUserKind userId) | ||
{ | ||
this.UserId = userId; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the <see cref="CommunicationUserKind"/> of the current user. | ||
/// </summary> | ||
[JsonPropertyName("userId")] | ||
[JsonPropertyOrder(1)] | ||
public CommunicationUserKind UserId { get; } | ||
|
||
/// <summary> | ||
/// Gets the display name of the current user. | ||
/// </summary> | ||
[JsonPropertyName("displayName")] | ||
[JsonPropertyOrder(2)] | ||
[JsonInclude] | ||
public string? DisplayName { get; init; } | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether if the current call is Teams call. | ||
/// </summary> | ||
[JsonPropertyName("isTeamsCall")] | ||
[JsonPropertyOrder(7)] | ||
[JsonInclude] | ||
public bool IsTeamsCall { get; init; } | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether if the call is a rooms call. | ||
/// </summary> | ||
[JsonPropertyName("isRoomsCall")] | ||
[JsonPropertyOrder(8)] | ||
[JsonInclude] | ||
public bool IsRoomsCall { get; init; } | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether the local participant's camera is on. | ||
/// To be used when creating a custom control bar with the CallComposite. | ||
/// </summary> | ||
[JsonPropertyName("cameraStatus")] | ||
[JsonPropertyOrder(12)] | ||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
[JsonInclude] | ||
public CameraStatus? CameraStatus { get; init; } | ||
|
||
/// <summary> | ||
/// Gets a value indicating whether if the microphone is enabled. | ||
/// </summary> | ||
[JsonPropertyName("isLocalPreviewMicrophoneEnabled")] | ||
[JsonPropertyOrder(50)] | ||
[JsonInclude] | ||
public bool IsLocalPreviewMicrophoneEnabled { get; init; } | ||
|
||
/// <summary> | ||
/// Gets the current page display on the <see cref="CallComposite"/>. | ||
/// </summary> | ||
[JsonPropertyName("page")] | ||
[JsonPropertyOrder(51)] | ||
[JsonConverter(typeof(JsonCamelCaseStringEnumConverter))] | ||
[JsonInclude] | ||
public CallCompositePage Page { get; init; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="CallCompositePage.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.Azure.Communication.UI.Blazor | ||
{ | ||
/// <summary> | ||
/// Major UI screens shown in the <see cref="CallComposite"/>. | ||
/// </summary> | ||
public enum CallCompositePage | ||
{ | ||
/// <summary> | ||
/// The teams meeting is denied. | ||
/// </summary> | ||
AccessDeniedTeamsMeeting, | ||
|
||
/// <summary> | ||
/// Call is ongoing. | ||
/// </summary> | ||
Call, | ||
|
||
/// <summary> | ||
/// Configuration step page. | ||
/// </summary> | ||
Configuration, | ||
|
||
/// <summary> | ||
/// The call is currently hold. | ||
/// </summary> | ||
Hold, | ||
|
||
/// <summary> | ||
/// The join call has been failed to network issues. | ||
/// </summary> | ||
JoinCallFailedDueToNoNetwork, | ||
|
||
/// <summary> | ||
/// The user has left the call. | ||
/// </summary> | ||
LeftCall, | ||
|
||
/// <summary> | ||
/// The user is currently leaving the call. | ||
/// </summary> | ||
Leaving, | ||
|
||
/// <summary> | ||
/// The user is waiting in the lobby. | ||
/// </summary> | ||
Lobby, | ||
|
||
/// <summary> | ||
/// The user has been removed from the call. | ||
/// </summary> | ||
RemovedFromCall, | ||
|
||
/// <summary> | ||
/// The <see cref="CallComposite"/> can not be loaded because the current environment is not supported. | ||
/// </summary> | ||
UnsupportedEnvironment, | ||
|
||
/// <summary> | ||
/// Transferring the current call. | ||
/// </summary> | ||
Transferring, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="CameraStatus.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.Azure.Communication.UI.Blazor | ||
{ | ||
/// <summary> | ||
/// Represents the camera status. | ||
/// </summary> | ||
public enum CameraStatus | ||
{ | ||
/// <summary> | ||
/// The camera is off. | ||
/// </summary> | ||
Off, | ||
|
||
/// <summary> | ||
/// The camera is on. | ||
/// </summary> | ||
On, | ||
} | ||
} |
Oops, something went wrong.