From b1122743c83e2d787db3087425bd01a0f2bc4c27 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 1 Apr 2014 19:03:24 +0000 Subject: [PATCH] Call MediaElement's shim method for `setSrc()` when dynamically updating the playing source in playlists, which will properly set the source for mobile. Make the labels for playlist items slightly smaller to account for size on mobile. Fixes #27625. git-svn-id: https://develop.svn.wordpress.org/trunk@27895 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/mediaelement/wp-mediaelement.css | 2 +- src/wp-includes/js/mediaelement/wp-playlist.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/js/mediaelement/wp-mediaelement.css b/src/wp-includes/js/mediaelement/wp-mediaelement.css index 11bee2edba..4f75345b41 100644 --- a/src/wp-includes/js/mediaelement/wp-mediaelement.css +++ b/src/wp-includes/js/mediaelement/wp-mediaelement.css @@ -98,7 +98,7 @@ } .wp-playlist-caption { - max-width: 90%; + max-width: 88%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/src/wp-includes/js/mediaelement/wp-playlist.js b/src/wp-includes/js/mediaelement/wp-playlist.js index aea1a610dc..094b5c58e4 100644 --- a/src/wp-includes/js/mediaelement/wp-playlist.js +++ b/src/wp-includes/js/mediaelement/wp-playlist.js @@ -52,7 +52,7 @@ this._player.pause(); this._player.remove(); this.playerNode = this.$( this.data.type ); - this.playerNode.prop( 'src', this.current.get( 'src' ) ); + this.playerNode.attr( 'src', this.current.get( 'src' ) ); this.settings.success = this.bindResetPlayer; } /** @@ -63,6 +63,7 @@ playCurrentSrc : function () { this.renderCurrent(); + this.player.setSrc( this.playerNode.attr( 'src' ) ); this.player.load(); this.player.play(); }, @@ -139,7 +140,7 @@ if ( last !== current ) { this.setPlayer(); } else { - this.playerNode.prop( 'src', this.current.get( 'src' ) ); + this.playerNode.attr( 'src', this.current.get( 'src' ) ); this.playCurrentSrc(); } },