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

Add public url getter to return the currently playing url #6411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ibobo
Copy link

@ibobo ibobo commented May 12, 2024

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

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

Copy link
Collaborator

@robwalch robwalch left a 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 👍

@robwalch robwalch added this to the 1.6.0 milestone May 13, 2024
@robwalch
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

None yet

2 participants