Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Array traversing for children opts - closes #1070 #1093
This should allow two additional ways to specify children for turning on specific components and ordering them:
There is no an additional
Thanks for this. I get the need for this, since chrome will reorder object keys and potentially change the order of children, which is bad. This should definitely be fixed. The changes in this pull request are a little hard to track because it looks like your editor changed a lot of the spacing around things. Can you remove the spacing changes that don't specifically apply to this?
@heff Here is a link with all the whitespace removed: https://github.com/videojs/video.js/pull/1093/files?w=1
Github has the feature baked in of adding ?w=1 onto the end to ignore all whitespace changes.
Going to think in the open a bit here...
The order of components is important, and I'm surprised we haven't run into issues with Chrome and the default
So an array would be better to use, however there's currently a feature of using an object here that allows you to disable just one of the child components instead of rebuilding the whole children list. e.g. the following would block the bigPlayButton from being added
If we used an array for the
As far as the array items, when they include options, I think it'd be better if we include an component option setting to provide the class type of the child. Possibly just
As opposed to the originally suggested:
As far as adding
How do you feel about those updates?