aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.MediaEncoding.Hls/Extensions/MediaEncodingHlsServiceCollectionExtensions.cs
blob: 327898366798840efc64373a2b49966702140e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Jellyfin.MediaEncoding.Hls.Playlist;
using Microsoft.Extensions.DependencyInjection;

namespace Jellyfin.MediaEncoding.Hls.Extensions
{
    /// <summary>
    /// Extensions for the <see cref="IServiceCollection"/> interface.
    /// </summary>
    public static class MediaEncodingHlsServiceCollectionExtensions
    {
        /// <summary>
        /// Adds the hls playlist generators to the <see cref="IServiceCollection"/>.
        /// </summary>
        /// <param name="serviceCollection">An instance of the <see cref="IServiceCollection"/> interface.</param>
        /// <returns>The updated service collection.</returns>
        public static IServiceCollection AddHlsPlaylistGenerator(this IServiceCollection serviceCollection)
        {
            return serviceCollection.AddSingleton<IDynamicHlsPlaylistGenerator, DynamicHlsPlaylistGenerator>();
        }
    }
}