Call the correct remove()
method on the MEjs instance when exiting the media modal.
See #27016. git-svn-id: https://develop.svn.wordpress.org/trunk@27443 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b727bef3f3
commit
ad3f6ef9d9
@ -6280,7 +6280,7 @@
|
|||||||
template: media.template('video-details'),
|
template: media.template('video-details'),
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
_.bindAll(this, 'player');
|
_.bindAll(this, 'success');
|
||||||
|
|
||||||
this.listenTo( this.controller, 'close', this.close );
|
this.listenTo( this.controller, 'close', this.close );
|
||||||
|
|
||||||
@ -6301,15 +6301,16 @@
|
|||||||
|
|
||||||
close : function() {
|
close : function() {
|
||||||
this.mejs.pause();
|
this.mejs.pause();
|
||||||
|
this.player.remove();
|
||||||
},
|
},
|
||||||
|
|
||||||
player : function (mejs) {
|
success : function (mejs) {
|
||||||
this.mejs = mejs;
|
this.mejs = mejs;
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var video, self = this, settings = {
|
var video, self = this, settings = {
|
||||||
success : this.player
|
success : this.success
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
||||||
@ -6326,7 +6327,7 @@
|
|||||||
(new Date()).getTime()
|
(new Date()).getTime()
|
||||||
].join('');
|
].join('');
|
||||||
|
|
||||||
new MediaElementPlayer( video, settings );
|
this.player = new MediaElementPlayer( video, settings );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user