--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <script type="text/javascript" src="../mv_embed.js?debug=true"></script>
+<title>Audio Player sample</title>
+</head>
+<body>
+<h3> Audio Player </h3>
+<audio src="http://upload.wikimedia.org/wikipedia/commons/4/4c/Faurepiece.ogg" durationHint="164"></audio>
+</body>
+</html>
\ No newline at end of file
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':
//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
//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,
//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;