Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fps-controller not checkFPS continuously but only once #3790

Closed
3 of 5 tasks
InanisV opened this issue Apr 16, 2021 · 3 comments · Fixed by #3799
Closed
3 of 5 tasks

fps-controller not checkFPS continuously but only once #3790

InanisV opened this issue Apr 16, 2021 · 3 comments · Fixed by #3799
Labels
Bug Regression A bug introduced in a recent release
Milestone

Comments

@InanisV
Copy link

InanisV commented Apr 16, 2021

What version of Hls.js are you using?

v1.0.0 and v1.0.1

What browser and OS (including versions) are you using?

Google Chrome 89.0.4389.114
macOS 10.15.6

Test stream:

BBB: https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8
Akamai: https://ll-hls-test-apple.akamaized.net/cmaf/master.m3u8

Configuration:

const hlsjsDefaults = {
  debug: true,
  enableWorker: true,
  lowLatencyMode: true,
  progressive: true,
  testBandwidth: true,
  capLevelOnFPSDrop: true,
  maxLiveSyncPlaybackRate: 1.3,
  backBufferLength: 60 * 1.5,
};

Checklist

  • The stream has correct Access-Control-Allow-Origin headers (CORS)
  • There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

  1. Just play the video with test stream

Expected behavior

In fps-controller, onMediaAttaching sets a timer to checkFPS from time to time according to the set time interval after Events.MEDIA_ATTACHING event is triggered.

Actual behavior

onMediaAttaching sets a timer to checkFPS only once after the time is up.

Proposed Solution

Change setTimeout to setInterval in line 61 of src/controller/fps-controller.ts.

this.timer = self.setInterval(
  this.checkFPSInterval.bind(this),
  config.fpsDroppedMonitoringPeriod
);
@robwalch robwalch added the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Apr 16, 2021
@robwalch
Copy link
Collaborator

Is this a regression from v0.14.17?

@InanisV
Copy link
Author

InanisV commented Apr 16, 2021

No....It's actually the current version, the piece of code is at

this.timer = self.setTimeout(

@robwalch
Copy link
Collaborator

I see. The regression was introduced in #3072 and is not present in v0.14.17.

@robwalch robwalch added Bug Regression A bug introduced in a recent release and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Apr 16, 2021
@robwalch robwalch added this to the 1.0.2 milestone Apr 16, 2021
robwalch pushed a commit that referenced this issue Apr 19, 2021
amiznikov added a commit to amiznikov/hls.js that referenced this issue Apr 24, 2021
* 'master' of https://github.com/video-dev/hls.js: (327 commits)
  [skip netlify] Update dependency netlify-cli to v3.21.9
  [skip netlify] Update dependency netlify-cli to v3.21.8
  [skip netlify] Update dependency eslint to v7.25.0
  [skip netlify] Update dependency netlify-cli to v3.21.7
  [skip netlify] Update dependency netlify-cli to v3.21.5
  [skip netlify] Update dependency netlify-cli to v3.21.3
  [skip netlify] Update dependency netlify-cli to v3.21.2
  [skip netlify] Update actions/github-script action to v4 (video-dev#3809)
  [skip netlify] Update dependency netlify-cli to v3.21.1
  [skip netlify] Update dependency netlify-cli to v3.21.0
  [skip netlify] Update babel monorepo to v7.13.16
  [skip netlify] Update dependency netlify-cli to v3.20.1
  [skip netlify] Update dependency netlify-cli to v3.19.1
  [skip netlify] Update dependency @microsoft/api-extractor to v7.14.0
  Fix fetch loader stats marked as aborted after loaded Fixes video-dev#3789
  Evict unbuffered audio and main fragments from the tracker on BUFFER_FLUSHED Resolves video-dev#3770
  Fix setInterval/Timer regression in fps-controller Fixes video-dev#3790
  [skip netlify] Update dependency netlify-cli to v3.19.0
  [skip netlify] Lock file maintenance
  [skip netlify] Lock file maintenance
  ...

# Conflicts:
#	.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Regression A bug introduced in a recent release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants