r58743 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58742‎ | r58743 | r58744 >
Date:09:31, 8 November 2009
Author:dale
Status:deferred
Tags:
Comment:
* mwEmbed fix to audio interface display
Modified paths:
  • /trunk/phase3/js2/remoteMwEmbed.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/remoteMwEmbed.js
@@ -65,7 +65,7 @@
6666 // will be depreciated in favor of updates to OggHandler
6767 function rewrite_for_OggHandler( vidIdList ){
6868 function procVidId( vidId ){
69 - //don't proccess empty vids
 69+ //don't process empty vids
7070 if(!vidId)
7171 return ;
7272 js_log('vidIdList on: ' + vidId +' length: ' + vidIdList.length + ' left in the set: ' + vidIdList );
@@ -73,16 +73,14 @@
7474 // Grab the thumbnail and src of the video
7575 var pimg = $j( '#' + vidId + ' img' );
7676 var poster_attr = 'poster = "' + pimg.attr( 'src' ) + '" ';
77 - var pwidth = pimg.attr( 'width' );
78 - var pheight = pimg.attr( 'height' );
 77+ var pwidth = $j( '#' + vidId).width();
 78+ var pheight = $j( '#' + vidId ).height();
7979
8080 var tag_type = 'video';
8181
8282 // Check for audio
83 - if( pwidth == '22' && pheight == '22' ) {
84 - //set width to parent width:
85 - pwidth = $j( '#' + vidId ).width();
86 - pheight = '100';
 83+ if( pheight == '22' || pheight == '52') {
 84+ //set width to parent width:
8785 tag_type = 'audio';
8886 poster_attr = '';
8987 }
@@ -115,7 +113,7 @@
116114 offset_attr + ' ';
117115
118116 if( tag_type == 'audio' ){
119 - html_out='<audio' + common_attr + '></audio>'
 117+ html_out='<audio' + common_attr + ' style="width:' + pwidth + 'px;"></audio>';
120118 }else{
121119 html_out='<video' + common_attr +
122120 poster_attr + ' ' +

Status & tagging log