Merged
Conversation
Contributor
Is this the DOM element? |
Collaborator
Author
|
@ghostdevv yeah, i was trying to think of how to show an example with a reference without it being confusing but couldn't think of one. now that im thinking again i coulda just done like document.querySelector('#player') or something, but i dont think any of us do that anyways 🤷 |
Contributor
|
Awesome - I have just enough knowledge of React to see what you were getting at 😂 |
|
🎉 This PR is included in version @cloudinary-util/url-loader-v5.3.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This lifts the player options logic from Next Cloudinary, which should basically reflect Nuxt and Svelte.
This allows us to maintain a single set of configuration options for the player that will support each framework that creates a similar CldVideoPlayer component.
It would work as such:
You can see some examples inside of the tests.
As of now, I left out
classNameandidas returned options as the function's intent is to return "player options", which would be invalid values for the player. This in come cases could cause unintentional side effects, so opting to not return those.A potential solution would be to return an object, with player options as a property, but i'm leaning towards it being an unintuitive return shape given the name of the function. Open to thoughts on this.
As far as where this module is located, I opted to include it in
/url-loaderwith the idea being that the family of component support functions could live under that package and in a future major release, we could rename it to something more appropriate for all. I'm open to other ideas / suggestions on this.Issue Ticket Number
Fixes #155
Type of change
Checklist