Giter Site home page Giter Site logo

Comments (8)

johnBartos avatar johnBartos commented on August 19, 2024 1

@yonimor The level object emitted from LEVEL_LOADED has a property called live, which tells you whether the stream is live or not.

from hls.js.

difosfor avatar difosfor commented on August 19, 2024 1

Ran into this and noticed that dash.js uses duration: Number.MAX_SAFE_INTEGER for a live stream. Perhaps it would be nice to also implement that in hls.js? It's not Infinity, but close to it.

from hls.js.

aronallen avatar aronallen commented on August 19, 2024

you can see my code here: /aronallen/video.js

from hls.js.

mangui avatar mangui commented on August 19, 2024

first, congrats for the videojs adaptation 👍
please note that another port has been done , as a standard videojs plugin, see https://github.com/benjipott/videojs-hlsjs

you can detect whether streams are live or VoD thanks to the following event :
Hls.Events.LEVEL_LOADED , then data.details.live (true/false)

from hls.js.

kanongil avatar kanongil commented on August 19, 2024

FYI, the videojs-hlsjs integration is somewhat lacking and I consider it mostly a proof of concept at this point.

Regarding live stream, you can detect it as @mangui points out, and forward it to video.js by overriding the duration method. Eg. something like:

duration() {
  if (this.isLive) {
    return Infinity;
  }

  return super();
}

from hls.js.

kfeinUI avatar kfeinUI commented on August 19, 2024

Was just noticing this myself in playing around with my own integration using a live stream. Is this a technical limitation with MSE which prevents you from reporting the duration as Infinity? Appears to be the same situation with dash.js.

from hls.js.

mangui avatar mangui commented on August 19, 2024

yes, this is a MSE limitation

from hls.js.

yonimor avatar yonimor commented on August 19, 2024

+1

from hls.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.