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

Offline tutorial: sorting tracks for selecting by highest bandwidth is incorrect in the code sample #1608

Closed
gigon opened this issue Oct 8, 2018 · 2 comments
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@gigon
Copy link
Contributor

gigon commented Oct 8, 2018

Have you read the FAQ and checked for duplicate open issues?: Yes

What version of Shaka Player are you using?: v2.5.0-beta-master

Can you reproduce the issue with our latest release version?: yes

Can you reproduce the issue with the latest code from master?: yes

Are you using the demo app or your own custom app?: n/a

If custom app, can you reproduce the issue using our demo app?: n/a

What browser and OS are you using?: Chrome/Windows 10

What are the manifest and license server URIs?: https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd

What did you do?
Modified a bit the sample code from the Offline tutorial, to select the lowest bandwidth track.
You can see an example here: https://jsbin.com/tejutojuvu/2/edit?html,js,console,output
(download the asset to see the issue).

I logged to the console the correct sorting (bandwidths sorted from
189957 to 1544182), as opposed to the current wrong one (bandwidths run from
863227 to 1544182).

What did you expect to happen?

  1. Expected to be able to select the highest or lowest bandwidth track.
  2. Expected to see in the log the selected track bandwidth

What actually happened?
Got tracks sorted by lexicographic rather than numeric order
Saw in the log [object object] instead of selected track's bandwidth.

gigon pushed a commit to gigon/shaka-player that referenced this issue Oct 8, 2018
Sort bandwidths numerically instead of lexicographically.

Fixes shaka-project#1608
@joeyparrish joeyparrish added type: bug Something isn't working correctly and removed needs triage labels Oct 8, 2018
@joeyparrish
Copy link
Member

Thank you for catching this!

@shaka-bot shaka-bot added this to the v2.5 milestone Oct 8, 2018
joeyparrish pushed a commit that referenced this issue Oct 8, 2018
* Fix tracks sorting in Offline tutorial sample code

Sort bandwidths numerically.

Fixes #1608
joeyparrish pushed a commit that referenced this issue Oct 8, 2018
@joeyparrish
Copy link
Member

Fix cherry-picked to v2.4.5.

@shaka-project shaka-project locked and limited conversation to collaborators Dec 7, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants