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

1.5.1 currentPendingRequests removal doesn't remove all requests and breaks seeking #881

Closed
JibberJim opened this issue Nov 11, 2015 · 1 comment

Comments

@JibberJim
Copy link

1.5.1 has various seeking bugs, one of them is related to the removal of cancelled requests being broken due to pendingRequests not being correctly removed in FragmentModel.js, as the reqs/cancelled is copied by reference, this code shows the issue:

function test(quality) {
    var reqs = pendingRequests,
    canceled = reqs;
    pendingRequests = [];
    if (quality !== undefined) {
        pendingRequests = reqs.filter(function(request) {
          if (request.quality === quality) {
              return false;
          }
          canceled.splice(canceled.indexOf(request), 1);
          return true;
                                      });
    }

    alert(JSON.stringify(pendingRequests)+"\n\n"+JSON.stringify(canceled));    

 }

var pendingRequests=[{quality:1},{quality:2},{quality:3},{quality:4},{quality:1},{quality:2},{quality:3},{quality:4}];
test(1);

The result is seeking is broken sometimes when seeking into pending requests.

@dsparacio
Copy link
Contributor

should not be an issue in 2.0

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

No branches or pull requests

2 participants