From: Michael Dale Date: Thu, 29 Oct 2009 02:48:13 +0000 (+0000) Subject: * added default 0 height for audio tags X-Git-Tag: 1.31.0-rc.0~39046 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/%22%7B%7Blocalurl:Kerfiss%C3%83%C2%AD%C3%83%C2%B0a:Userlogin%7D%7D/%28?a=commitdiff_plain;h=1197829a28a6dc374b4460be86ec222445ac2da0;p=lhc%2Fweb%2Fwiklou.git * added default 0 height for audio tags --- diff --git a/js2/mwEmbed/example_usage/Player_Audio.html b/js2/mwEmbed/example_usage/Player_Audio.html new file mode 100644 index 0000000000..81e89f9b81 --- /dev/null +++ b/js2/mwEmbed/example_usage/Player_Audio.html @@ -0,0 +1,12 @@ + + + + + +Audio Player sample + + +

Audio Player

+ + + \ No newline at end of file diff --git a/js2/mwEmbed/libEmbedVideo/embedVideo.js b/js2/mwEmbed/libEmbedVideo/embedVideo.js index e4fd1d3f40..55a367bc5c 100644 --- a/js2/mwEmbed/libEmbedVideo/embedVideo.js +++ b/js2/mwEmbed/libEmbedVideo/embedVideo.js @@ -153,8 +153,7 @@ mvEmbed = { mvEmbed.swapEmbedVideoElement( this_elm, videoInterface ); break; case 'audio': - var videoInterface = new embedVideo(this_elm); - videoInterface.type ='audio'; + var videoInterface = new embedVideo(this_elm); mvEmbed.swapEmbedVideoElement( this_elm, videoInterface ); break; case 'playlist': @@ -213,8 +212,8 @@ mvEmbed = { //make sure our div has a hight/width set: $j(embed_video).css({ - 'width':videoInterface.width, - 'height':videoInterface.height + 'width' : videoInterface.width, + 'height' : videoInterface.height }).html( mv_get_loading_img() ); //inherit the video interface for(var method in videoInterface){ //for in loop oky in Element context @@ -782,7 +781,7 @@ embedVideo.prototype = { //for seek thumb updates: cur_thumb_seek_time:0, thumb_seek_interval:null, - + //set the default tag type to video: seeking:false, //set the buffered percent: bufferedPercent:0, @@ -839,10 +838,16 @@ embedVideo.prototype = { //make sure duration is in float: this.duration = parseFloat(this.duration); js_log("duration is: " + this.duration); - //if style is set override width and height + + //get defaults var dwh = $mw.conf['video_size'].split('x'); - this.width = element.style.width ? element.style.width : dwh[0]; - this.height = element.style.height ? element.style.height : dwh[1]; + this.width = element.style.width ? element.style.width : dwh[0]; + if( element.tagName == 'AUDIO' ){ + this.height = element.style.height ? element.style.height : 0; + }else{ + this.height = element.style.height ? element.style.height : dwh[1]; + } + //set the plugin id this.pid = 'pid_' + this.id;