*Audio Playback*
Content API: - Enabling CORS for access from Blazor app Web Server: - Content API URL environment config - Web Audio API JS Interop layer in TypeScript - HttpClient configs Web Client: - Audio Tack player controls - Audio Player example page - Audio Interop Service Layer - Named HttpClients
This commit is contained in:
@@ -13,4 +13,21 @@ public static class Startup
|
||||
services.AddScoped<TrackClient>();
|
||||
services.AddScoped<TracksViewModel>();
|
||||
}
|
||||
|
||||
public static void ConfigureApiHttpClient(IServiceCollection services, string baseAddress)
|
||||
{
|
||||
services.AddHttpClient("DeepDrft.API", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri(baseAddress);
|
||||
});
|
||||
}
|
||||
|
||||
public static void ConfigureCommonServices(IServiceCollection services, string contentApiUrl)
|
||||
{
|
||||
services.AddHttpClient("DeepDrft.Content", client =>
|
||||
{
|
||||
client.BaseAddress = new Uri(contentApiUrl);
|
||||
});
|
||||
services.AddScoped<TrackMediaClient>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user