-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add public url getter to return the currently playing url #6411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's missing a new entry in docs/API.md. Otherwise 👍
Hi @ibobo, Would you mind adding an entry to docs/API.md for this new getter? Adding |
Sorry for the late response @robwalch, did that now! Thanks |
docs/API.md
Outdated
- [Level](#level) | ||
- [LevelDetails](#leveldetails) | ||
- [Fragment](#fragment) | ||
- [HLS.js v1 API](#hlsjs-v1-api) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did "HLS.js v1 API" get added to the TOCs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response @robwalch, did that now!
Thanks @ibobo,
Did you run npm run docs
or tocdoc
to update the table of contents? I only expect to see the addition of hls.url, not a new top level header (HLS.js v1 API). Please remove and/or only update the table of contents using npm run docs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't see that. I'm running npm run docs
now.
This PR will...
Make the
url
property a public getter, and create a private_url
for internal use.Why is this Pull Request needed?
As discussed in issue #6376, reading the currently playing url can be beneficial in some situations, and, since the url property exists and is marked as private, this was the best solution for the issue (as suggested by @robwalch).
Are there any points in the code the reviewer needs to double check?
No. But I didn't find a suitable spot to add something in the documentation, since also
loadSource
isn't documented.Resolves issues:
#6376
Checklist