Hi,
I’am struggling to make HLS(Http Live Streaming) over akka http.
This part I use to send a m3u8 file:
encodeResponseWith(Gzip) {
complete {
val utf8 = HttpCharsets.`UTF-8`
val `application/x-mpegURL`: WithFixedCharset =
MediaType.customWithFixedCharset("application", "x-mpegURL", utf8)
HttpResponse(entity = HttpEntity(`application/x-mpegURL`, ByteString(content)))
}
}
And this one is part of sending video parts:
HttpResponse(entity = HttpEntity.Chunked(MediaTypes.`application/octet-stream`, chunks))
The chunks is Source of ChunkStreamParts.
Is this approach right?
Zlaja