Index: trunk/phase3/js2/remoteMwEmbed.js |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | // will be depreciated in favor of updates to OggHandler |
67 | 67 | function rewrite_for_OggHandler( vidIdList ){ |
68 | 68 | function procVidId( vidId ){ |
69 | | - //don't proccess empty vids |
| 69 | + //don't process empty vids |
70 | 70 | if(!vidId) |
71 | 71 | return ; |
72 | 72 | js_log('vidIdList on: ' + vidId +' length: ' + vidIdList.length + ' left in the set: ' + vidIdList ); |
— | — | @@ -73,16 +73,14 @@ |
74 | 74 | // Grab the thumbnail and src of the video |
75 | 75 | var pimg = $j( '#' + vidId + ' img' ); |
76 | 76 | 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(); |
79 | 79 | |
80 | 80 | var tag_type = 'video'; |
81 | 81 | |
82 | 82 | // 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: |
87 | 85 | tag_type = 'audio'; |
88 | 86 | poster_attr = ''; |
89 | 87 | } |
— | — | @@ -115,7 +113,7 @@ |
116 | 114 | offset_attr + ' '; |
117 | 115 | |
118 | 116 | if( tag_type == 'audio' ){ |
119 | | - html_out='<audio' + common_attr + '></audio>' |
| 117 | + html_out='<audio' + common_attr + ' style="width:' + pwidth + 'px;"></audio>'; |
120 | 118 | }else{ |
121 | 119 | html_out='<video' + common_attr + |
122 | 120 | poster_attr + ' ' + |