WordPress.org

Make WordPress Core

Changeset 29194


Ignore:
Timestamp:
07/16/2014 07:35:55 PM (7 years ago)
Author:
wonderboymusic
Message:

Cleanup after [29179]:

  • Remove wp.media.mixin.pauseAllPlayers() - was only ever intended to be used in MCE views, reaches too far into global scope. Rendered irrelevant since [28364].
  • Remove wp.media.mixin.pausePlayers() - added in [28364]. MCE views no longer keep track of player instances and call mixin methods, they refer to their child iframes and call MEjs methods on the iframe's window.mejs.players.

See #28905.

File:
1 edited

Legend:

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

    r29179 r29194  
    1515    wp.media.mixin = {
    1616        mejsSettings: baseSettings,
    17         /**
    18          * Pauses every instance of MediaElementPlayer
    19          */
    20         pauseAllPlayers: function() {
    21             var p;
    22             if ( window.mejs && window.mejs.players ) {
    23                 for ( p in window.mejs.players ) {
    24                     window.mejs.players[p].pause();
    25                 }
    26             }
    27         },
    2817
    2918        removeAllPlayers: function() {
     
    3625                }
    3726            }
    38         },
    39 
    40         /**
    41          * Pauses the current object's instances of MediaElementPlayer
    42          */
    43         pausePlayers: function() {
    44             _.each( this.players, function (player) {
    45                 player.pause();
    46             } );
    4727        },
    4828
Note: See TracChangeset for help on using the changeset viewer.