Giter Site home page Giter Site logo

Comments (3)

nums avatar nums commented on August 17, 2024

I have the same issue on my side.
For now, I don't know if the source of the issue is hls.js or ovenplayer.
Maybe, we can resolve this with a custom "Auto decision", while using window.op_hls.abrController.bwEstimator.getEstimate() the data return of this method seems good and then we can adapt the quality level compared to that.
I will do some check and let you know

from ovenplayer.

nums avatar nums commented on August 17, 2024

I suggest this quick and dirty temporary fix:

ovenPlayer.on('ready', (evt) => {
  setInterval(() => {
    let currentBW = window.op_hls.abrController.bwEstimator.getEstimate();
    
    let levels = ovenPlayer.getQualityLevels();
    levels = JSON.parse(JSON.stringify(levels));
    levels.sort((a, b) => a.bitrate - b.bitrate);
    let index = -1;
    for(var i in levels) {
      let level = levels[i];
      if(currentBW > level.bitrate)
      index = i;
    }
    
    if(index != -1 && index != ovenPlayer.getCurrentQuality() && ovenPlayer.getState() == 'playing') {        
      console.log('ABR', 'we change index or quality level', currentBW, index, levels[index]);        
      ovenPlayer.setCurrentQuality(parseInt(index));            
    }
    
  }, 3000)
})

I have tested it with the bandwidth limitation of chrome developer tool.

from ovenplayer.

morbificagent avatar morbificagent commented on August 17, 2024

@nums

Many thanks!

I will test this too and respond after the weekend...
Have a nice one

from ovenplayer.

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.