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

Reference player: liveDelay property ignored due to race condition #3289

Closed
5 tasks done
spoeschel opened this issue Jun 12, 2020 · 2 comments
Closed
5 tasks done

Reference player: liveDelay property ignored due to race condition #3289

spoeschel opened this issue Jun 12, 2020 · 2 comments
Assignees
Milestone

Comments

@spoeschel
Copy link

spoeschel commented Jun 12, 2020

Environment
Steps to reproduce
  1. Use different values for the streaming.liveDelay property (e.g 10 and 30).
  2. Play the stream and observe the displayed Live Latency.
Observed behaviour

The latency should be near the set value - however, the property has no visible impact.

Analysis

Due to a race condition, the default live delay (= null) is used:

The config is updated asynchronously, as soon as the config JSON has been downloaded by:

$scope.player.updateSettings(config);

However, only a few lines later in the same function, the config is retrieved from the player and the values of a few properties processed:

var currentConfig = $scope.player.getSettings();

So if the asynchronous config init takes place after this retrieval (which is case on my system), it will return the default values for the properties used here - instead of the values of the actual config JSON.

These properties may be updated upon certain conditions (or not). At least they are written back to the player when a stream is started:

$scope.player.updateSettings(config);

I have only checked the liveDelay property, but as other properties are processed here as well, they may be affected, too.

Edit: fixed MPD to live stream

@dsilhavy dsilhavy self-assigned this Jun 13, 2020
@dsilhavy dsilhavy added this to the 3.1.2 milestone Jun 13, 2020
@dsilhavy
Copy link
Collaborator

Thanks, fixed in #3301

@spoeschel
Copy link
Author

Thank you; this fixes the issue for me.

I'm not sure whether this could also affect the autoplay feature (which I don't use), as doLoad (where the affected variables are read) could in theory be invoked before the variables have been set. When I just tried with different delay values, it didn't occur on my machine, though (however BrowserSync visibly slows down the page reload).

Example URL: index.html?url=https://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd&autoplay=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants