A lot of folks will likely want to provide custom icons for the autoplay toggle to match the look and feel of their brand/site.
Since the autoplay button actually contains two different icon/sr-only text pairs (pause and play) that are conditionally toggled, I think it would be better to not allow an entire <button> DOM node or string to be provided so we can guarantee that the visibility toggling logic always works.
Instead, let's provide two new options that people can use to pass jQuery or DOM nodes / strings for just the icons so that they can customize the visual appearance with no risk of making the buttons inaccessible.
[x] Expose new settings to allow customization of the pause and play icons (pauseIcon and playIcon).
[x] Document these new options in the main README.
A lot of folks will likely want to provide custom icons for the autoplay toggle to match the look and feel of their brand/site.
Since the autoplay button actually contains two different icon/sr-only text pairs (pause and play) that are conditionally toggled, I think it would be better to not allow an entire
<button>
DOM node or string to be provided so we can guarantee that the visibility toggling logic always works.Instead, let's provide two new options that people can use to pass jQuery or DOM nodes / strings for just the icons so that they can customize the visual appearance with no risk of making the buttons inaccessible.
pauseIcon
andplayIcon
).