From 287f4e21d7b1b89a761abbe7d78473d2df6429e1 Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Sun, 8 Nov 2009 09:31:17 +0000 Subject: [PATCH] * mwEmbed fix to audio interface display --- js2/remoteMwEmbed.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js2/remoteMwEmbed.js b/js2/remoteMwEmbed.js index 55c1a47a04..9e42f5eb94 100644 --- a/js2/remoteMwEmbed.js +++ b/js2/remoteMwEmbed.js @@ -65,7 +65,7 @@ function doPageSpecificRewrite() { // will be depreciated in favor of updates to OggHandler function rewrite_for_OggHandler( vidIdList ){ function procVidId( vidId ){ - //don't proccess empty vids + //don't process empty vids if(!vidId) return ; js_log('vidIdList on: ' + vidId +' length: ' + vidIdList.length + ' left in the set: ' + vidIdList ); @@ -73,16 +73,14 @@ function rewrite_for_OggHandler( vidIdList ){ // Grab the thumbnail and src of the video var pimg = $j( '#' + vidId + ' img' ); var poster_attr = 'poster = "' + pimg.attr( 'src' ) + '" '; - var pwidth = pimg.attr( 'width' ); - var pheight = pimg.attr( 'height' ); + var pwidth = $j( '#' + vidId).width(); + var pheight = $j( '#' + vidId ).height(); var tag_type = 'video'; // Check for audio - if( pwidth == '22' && pheight == '22' ) { - //set width to parent width: - pwidth = $j( '#' + vidId ).width(); - pheight = '100'; + if( pheight == '22' || pheight == '52') { + //set width to parent width: tag_type = 'audio'; poster_attr = ''; } @@ -115,7 +113,7 @@ function rewrite_for_OggHandler( vidIdList ){ offset_attr + ' '; if( tag_type == 'audio' ){ - html_out='' + html_out=''; }else{ html_out='