The oqtane chathubs module allows developers to code and run realtime chat. Post issues anytime you want it is okay and appreciated i will reply as soon as im ready and fixed it anyhow.
- Get familiar with the Oqtane Framework.
- Clone the Oqtane Github Repository in Visual Studio Team Explorer.
- Clone the Oqtane ChatHub Module in VS Team Explorer and build in debug and release mode.
- get it work somehow good luck anyways
<script src="_content/MatBlazor/dist/matBlazor.js"></script>
<link href="_content/MatBlazor/dist/matBlazor.css" rel="stylesheet" />
<link href="modules/oqtane.chathubs/chat-hub-stylesheets.css" rel="stylesheet" />
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="_content/BlazorStrap/blazorStrap.js"></script>
<script src="_content/BlazorTable/BlazorTable.min.js"></script>
<script src="modules/oqtane.chathubs/chat-hub-js-interop.js"></script>
services.AddScoped<VideoService, VideoService>();
services.AddScoped<BlazorAlertsService, BlazorAlertsService>();
services.AddScoped<BlazorDraggableListService, BlazorDraggableListService>();
services.AddScoped<BlazorFileUploadService, BlazorFileUploadService>();
services.AddMvc()
.AddNewtonsoftJson(options =>
options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore);
services.AddSignalR()
.AddHubOptions<ChatHub>(options =>
{
options.EnableDetailedErrors = true;
options.KeepAliveInterval = TimeSpan.FromSeconds(15);
options.ClientTimeoutInterval = TimeSpan.FromMinutes(60);
options.MaximumReceiveMessageSize = Int64.MaxValue;
options.StreamBufferCapacity = Int32.MaxValue;
})
.AddMessagePackProtocol()
.AddNewtonsoftJsonProtocol(options =>
{
options.PayloadSerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
});
endpoints.MapHub<ChatHub>("/chathub", options =>
{
options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling;
options.ApplicationMaxBufferSize = Int64.MaxValue;
options.TransportMaxBufferSize = Int64.MaxValue;
options.WebSockets.CloseTimeout = TimeSpan.FromSeconds(10);
options.LongPolling.PollTimeout = TimeSpan.FromSeconds(10);
});
if (segments.Length > 1 && (segments[1] == "api" || segments[1] == "pages") && segments[0] != "~")
{
aliasId = int.Parse(segments[0]);
}
else if (segments[0] == "chathub")
{
aliasId = 1;
}
<dependency id="Oqtane.Framework" version="1.0.0" />
<dependency id="System.Drawing.Common" version="5.0.0" />
<dependency id="MatBlazor" version="2.3.0" />
<dependency id="Microsoft.CSharp" version="4.7.0" />
<dependency id="BlazorStrap" version="1.3.3" />
<dependency id="Microsoft.AspNetCore.SignalR.Client" version="5.0.0" />
<dependency id="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" version="5.0.0" />
<dependency id="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" version="5.0.0" />
<dependency id="Microsoft.Composition" version="1.0.31" />
Demo Website Link.
Anyways Corporation South Beach, San Francisco, California, USA