silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

Add buttonPositionIndex option #44

Closed locpd closed 5 years ago

locpd commented 5 years ago

Add option to set Chromecast button's position among the Video.js control bar's child components.

yokuze commented 5 years ago

Thank you for the PR! Well done on the documentation as well.

@locpd is there a reason you wouldn't want to specify the order of the Chromecast button within the control bar's child components using the method described here: https://github.com/silvermine/videojs-chromecast/blob/master/src/js/components/ChromecastButton.js#L131 ?

locpd commented 5 years ago

I found that method a bit too verbose. Also you have to maintain this list if you ever want to add more button/control to the control bar (either default or custom ones).

Basically I just want a quick way to add the Chromecast button near the end of the control bar, before the full screen button (like Youtube player), hence this feature.

jthomerson commented 5 years ago

Merged. @yokuze please give your input on whether we should cut a release with just this, or wait for #45 (or other open PRs / issues) to be included.

yokuze commented 5 years ago

@jthomerson let's wait please, until I can look at #45.

jthomerson commented 5 years ago

@locpd this is available in 1.2.0 that was just pushed