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

Method to set source #151

Open
rtritto opened this issue Feb 17, 2025 · 2 comments · May be fixed by #153
Open

Method to set source #151

rtritto opened this issue Feb 17, 2025 · 2 comments · May be fixed by #153
Labels
feature New feature or request

Comments

@rtritto
Copy link
Contributor

rtritto commented Feb 17, 2025

If the feature request is for a plugin or provider, specify it here.

No response

If the feature solves a problem you have, specify it here.

After the player loads a source, it can't be updated with a new one.

Describe the proposed feature.

Add a method to update the source of the player:

player.setSource(new_source)  // OR player.setSrc(new_source) OR player.src(new_source)

Describe alternatives you've considered

I tried to update the value of src attribute, but the player doesn't load the new source.

  • Code of the first try:

    <video id="player" class="vlite-js">
      <source src={source_variable} />
    </video>
  • Code of the second try:

    <video id="player" class="vlite-js" src={source_variable} />

Additional context

No response

Related issues

No response

@rtritto rtritto added the feature New feature or request label Feb 17, 2025
@rtritto rtritto linked a pull request Feb 18, 2025 that will close this issue
6 tasks
@yoriiis
Copy link
Member

yoriiis commented Feb 18, 2025

Thank you @rtritto for this problem. Interesting, would you like to try and add this feature?

@rtritto
Copy link
Contributor Author

rtritto commented Feb 18, 2025

Sure, I already did the PR #153, I need to test it.

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

Successfully merging a pull request may close this issue.

2 participants