Make WordPress Core

Changeset 27443


Ignore:
Timestamp:
03/06/2014 08:12:39 PM (11 years ago)
Author:
wonderboymusic
Message:

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

See #27016.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r27440 r27443  
    62816281
    62826282        initialize: function() {
    6283             _.bindAll(this, 'player');
     6283            _.bindAll(this, 'success');
    62846284
    62856285            this.listenTo( this.controller, 'close', this.close );
     
    63026302        close : function() {
    63036303            this.mejs.pause();
    6304         },
    6305 
    6306         player : function (mejs) {
     6304            this.player.remove();
     6305        },
     6306
     6307        success : function (mejs) {
    63076308            this.mejs = mejs;
    63086309        },
     
    63106311        render: function() {
    63116312            var video, self = this, settings = {
    6312                 success : this.player
     6313                success : this.success
    63136314            };
    63146315
     
    63276328            ].join('');
    63286329
    6329             new MediaElementPlayer( video, settings );
     6330            this.player = new MediaElementPlayer( video, settings );
    63306331            return this;
    63316332        },
Note: See TracChangeset for help on using the changeset viewer.