dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82e9106
)
* mwEmbed fix to audio interface display
author
Michael Dale
<dale@users.mediawiki.org>
Sun, 8 Nov 2009 09:31:17 +0000
(09:31 +0000)
committer
Michael Dale
<dale@users.mediawiki.org>
Sun, 8 Nov 2009 09:31:17 +0000
(09:31 +0000)
js2/remoteMwEmbed.js
patch
|
blob
|
history
diff --git
a/js2/remoteMwEmbed.js
b/js2/remoteMwEmbed.js
index
55c1a47
..
9e42f5e
100644
(file)
--- 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 ){
// will be depreciated in favor of updates to OggHandler
function rewrite_for_OggHandler( vidIdList ){
function procVidId( vidId ){
- //don't proc
c
ess empty vids
+ //don't process empty vids
if(!vidId)
return ;
js_log('vidIdList on: ' + vidId +' length: ' + vidIdList.length + ' left in the set: ' + vidIdList );
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' ) + '" ';
// 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
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 = '';
}
tag_type = 'audio';
poster_attr = '';
}
@@
-115,7
+113,7
@@
function rewrite_for_OggHandler( vidIdList ){
offset_attr + ' ';
if( tag_type == 'audio' ){
offset_attr + ' ';
if( tag_type == 'audio' ){
- html_out='<audio' + common_attr + '
></audio>'
+ html_out='<audio' + common_attr + '
style="width:' + pwidth + 'px;"></audio>';
}else{
html_out='<video' + common_attr +
poster_attr + ' ' +
}else{
html_out='<video' + common_attr +
poster_attr + ' ' +