Remote-MediaServer icon indicating copy to clipboard operation
Remote-MediaServer copied to clipboard

[enhancement request] HLS support all major browsers using hls.js

Open sspilleman opened this issue 5 years ago • 4 comments

Hi,

Have you looked into using this?? : https://video-dev.github.io/hls.js/stable/ Using this we could go for HLS all the way and ditch the Mpeg4PlayHandler

As of today, it is supported on:

  • Chrome for Android 34+
  • Chrome for Desktop 34+
  • Firefox for Android 41+
  • Firefox for Desktop 42+
  • IE11+ for Windows 8.1+
  • Edge for Windows 10+
  • Opera for Desktop
  • Vivaldi for Desktop
  • Safari for Mac 8+ (beta)

Please note: iOS Safari “Mobile” does not support the MediaSource API. Safari browsers have however built-in HLS support through the plain video “tag” source URL. See the example above (Getting Started) to run appropriate feature detection and choose between using Hls.js or natively built-in HLS support.

sspilleman avatar Jun 10 '19 06:06 sspilleman

I have seen hls.js and it's actually already in use for offline playback in chrome. But I would like to keep mpeg as the main and hls as a backup, here is why:

  • startup is a lot faster, because we don't have to wait for the first chunk to be rendered to disk, this is especially nice when seeking.
  • no need for writing to disk, because data is directly piped to the client
  • and the cpu issue right now, but I'm sure we can get that resolved;)

OwenRay avatar Jun 10 '19 12:06 OwenRay

I agree to all points... except that your current solution is mainly targeting local (network) use. One thing I have in mind, is remote use as well... Which required (realtime, don't wanna go for haveing multiple formats available) transcoding. In those situations there is a startup lag anyway. I've tested it using your Mpeg4Playhandler code, and it actually works quite ok, of course there is a lot higher CPU consumption doing that (hence I want processed killed as soon as it can eheh)...

sspilleman avatar Jun 10 '19 13:06 sspilleman

I didn't dive into your HLS code yet... have to look at it

sspilleman avatar Jun 10 '19 13:06 sspilleman

maybe an idea to make it configurable, something like: "preferred streaming format"

OwenRay avatar Jun 10 '19 16:06 OwenRay