added better support for hls.