Add public url getter to return the currently playing url
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
- [x] changes have been done against master branch, and PR does not conflict
- [x] new unit / functional tests have been added (whenever applicable)
- [x] API or design changes are documented in API.md
Hi @ibobo,
Would you mind adding an entry to docs/API.md for this new getter? Adding hls.url with description like the other getters ("get : string of current HLS asset passed to loadSource, otherwise null") under Network Loading Control API: https://github.com/video-dev/hls.js/blob/master/docs/API.md#network-loading-control-api
Sorry for the late response @robwalch, did that now!
Thanks