mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Hls playlist
This commit is contained in:
@@ -407,6 +407,7 @@ public class DynamicHlsController : BaseJellyfinApiController
|
||||
/// <param name="context">Optional. The <see cref="EncodingContext"/>.</param>
|
||||
/// <param name="streamOptions">Optional. The streaming options.</param>
|
||||
/// <param name="enableAdaptiveBitrateStreaming">Enable adaptive bitrate streaming.</param>
|
||||
/// <param name="enableTrickplay">Enable trickplay image playlists being added to master playlist.</param>
|
||||
/// <response code="200">Video stream returned.</response>
|
||||
/// <returns>A <see cref="FileResult"/> containing the playlist file.</returns>
|
||||
[HttpGet("Videos/{itemId}/master.m3u8")]
|
||||
@@ -464,7 +465,8 @@ public class DynamicHlsController : BaseJellyfinApiController
|
||||
[FromQuery] int? videoStreamIndex,
|
||||
[FromQuery] EncodingContext? context,
|
||||
[FromQuery] Dictionary<string, string> streamOptions,
|
||||
[FromQuery] bool enableAdaptiveBitrateStreaming = true)
|
||||
[FromQuery] bool enableAdaptiveBitrateStreaming = true,
|
||||
[FromQuery] bool enableTrickplay = true)
|
||||
{
|
||||
var streamingRequest = new HlsVideoRequestDto
|
||||
{
|
||||
@@ -518,7 +520,8 @@ public class DynamicHlsController : BaseJellyfinApiController
|
||||
VideoStreamIndex = videoStreamIndex,
|
||||
Context = context ?? EncodingContext.Streaming,
|
||||
StreamOptions = streamOptions,
|
||||
EnableAdaptiveBitrateStreaming = enableAdaptiveBitrateStreaming
|
||||
EnableAdaptiveBitrateStreaming = enableAdaptiveBitrateStreaming,
|
||||
EnableTrickplay = enableTrickplay
|
||||
};
|
||||
|
||||
return await _dynamicHlsHelper.GetMasterHlsPlaylist(TranscodingJobType, streamingRequest, enableAdaptiveBitrateStreaming).ConfigureAwait(false);
|
||||
@@ -1025,6 +1028,25 @@ public class DynamicHlsController : BaseJellyfinApiController
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an image tiles playlist for trickplay.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The item id.</param>
|
||||
/// <param name="width">The width of a single tile.</param>
|
||||
/// <param name="mediaSourceId">The media version id.</param>
|
||||
/// <response code="200">Tiles stream returned.</response>
|
||||
/// <returns>A <see cref="FileResult"/> containing the trickplay tiles file.</returns>
|
||||
[HttpGet("Videos/{itemId}/tiles.m3u8")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesPlaylistFile]
|
||||
public ActionResult GetTrickplayTilesHlsPlaylist(
|
||||
[FromRoute, Required] Guid itemId,
|
||||
[FromQuery, Required] int width,
|
||||
[FromQuery, Required] string mediaSourceId)
|
||||
{
|
||||
return _dynamicHlsHelper.GetTilesHlsPlaylist(width, mediaSourceId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a video stream using HTTP live streaming.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user