Call the correct remove() method on the MEjs instance when exiting the media modal.

See #27016.


Built from https://develop.svn.wordpress.org/trunk@27443


git-svn-id: http://core.svn.wordpress.org/trunk@27290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-03-06 20:13:15 +00:00
parent 616205856e
commit 023b419727
2 changed files with 6 additions and 5 deletions

View File

@ -6280,7 +6280,7 @@
template: media.template('video-details'),
initialize: function() {
_.bindAll(this, 'player');
_.bindAll(this, 'success');
this.listenTo( this.controller, 'close', this.close );
@ -6301,15 +6301,16 @@
close : function() {
this.mejs.pause();
this.player.remove();
},
player : function (mejs) {
success : function (mejs) {
this.mejs = mejs;
},
render: function() {
var video, self = this, settings = {
success : this.player
success : this.success
};
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
@ -6326,7 +6327,7 @@
(new Date()).getTime()
].join('');
new MediaElementPlayer( video, settings );
this.player = new MediaElementPlayer( video, settings );
return this;
},

File diff suppressed because one or more lines are too long