brightcove / videojs-thumbnails

A video.js plugin that displays thumbnail images over the scrubber.
Other
168 stars 97 forks source link

Old thumbnails when reloading the VideoJS player and thumbnail plugin for an other video #4

Closed troger closed 11 years ago

troger commented 11 years ago

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.

bcjwilson commented 11 years ago

Whoops, thanks troger!