Remotely/Server/Services/RcImplementations/ViewerOptionsProvider.cs
2023-07-21 10:16:29 -07:00

26 lines
751 B
C#

using Immense.RemoteControl.Server.Abstractions;
using Immense.RemoteControl.Server.Models;
using Immense.RemoteControl.Shared.Models;
using Microsoft.AspNetCore.SignalR;
using System.Threading.Tasks;
namespace Remotely.Server.Services.RcImplementations;
public class ViewerOptionsProvider : IViewerOptionsProvider
{
private readonly IApplicationConfig _appConfig;
public ViewerOptionsProvider(IApplicationConfig appConfig)
{
_appConfig = appConfig;
}
public Task<RemoteControlViewerOptions> GetViewerOptions()
{
var options = new RemoteControlViewerOptions()
{
ShouldRecordSession = _appConfig.EnableRemoteControlRecording
};
return Task.FromResult(options);
}
}