使FOS-Streaming适应HLS

I've been trying FOS-Streaming panel and I miss the option to be able to HLS. Here is the source code to stream channels:

https://github.com/zgelici/FOS-Streaming-v1/blob/master/stream.php

I see it creates a .m3u8 on my server but I was wondering if someone can help me to adapt this code to stream .m3u8 directly without leaving authentication and checking if the user hasn't expired.

So far I can copy links like http://ip:port/live/user/password/[streamid] and paste on VLC and they play normally.

Please enlight me on how to achieve this.

Thanks in advance.