When reloading the VideoJS player and then the thumbnail plugin for an other video (through an AJAX request for instance), without reloading the scripts, old values for the thumbnails are kept for the new video because they are stored in the default object:
settings = extend(defaults, options);
This will copy the options properties to defaults and then returns defaults.
Extending from a empty {} object fixes the issue: this will ensure we always have a new settings object that's never defaults.
When reloading the VideoJS player and then the thumbnail plugin for an other video (through an AJAX request for instance), without reloading the scripts, old values for the thumbnails are kept for the new video because they are stored in the
default
object:This will copy the
options
properties todefaults
and then returnsdefaults
.Extending from a empty
{}
object fixes the issue: this will ensure we always have a newsettings
object that's neverdefaults
.