Add a class property to `wp.media.view.MediaDetails` called `instances` that is incremented every time the class is invoked. This mimics what happens in the shortcodes: the sources receive an incremented cache-buster so that the browser won't ignore the file when `preload="metadata"` is set.
See #26779. Built from https://develop.svn.wordpress.org/trunk@27520 git-svn-id: http://core.svn.wordpress.org/trunk@27363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
be70cf26fe
commit
a945b2738f
|
@ -6549,12 +6549,13 @@
|
|||
* @returns {HTMLElement}
|
||||
*/
|
||||
prepareSrc : function (media) {
|
||||
var t = (new Date()).getTime();
|
||||
var i = wp.media.view.MediaDetails.instances++;
|
||||
_.each( $(media).find('source'), function (source) {
|
||||
source.src = [
|
||||
source.src,
|
||||
source.src.indexOf('?') > -1 ? '&' : '?',
|
||||
t
|
||||
'_=',
|
||||
i
|
||||
].join('');
|
||||
});
|
||||
|
||||
|
@ -6673,6 +6674,8 @@
|
|||
resetFocus: function() {
|
||||
this.$( '.embed-media-settings' ).scrollTop( 0 );
|
||||
}
|
||||
}, {
|
||||
instances : 0
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue