This repository has been archived by the owner on May 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
index.html
97 lines (74 loc) · 4.71 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Audio Test Page</title>
<script type="text/javascript" src="/js/mootools-1.2.4-core.js "></script>
<script type="text/javascript" src="/js/mootools-cnet-debug.js"></script>
<script type="text/javascript" src="/js/IdleTimer.js"></script>
<script type="text/javascript" src="/js/AudioCheck-nc.js"></script>
<script type="text/javascript" src="/js/mtAudioPlayer-nc.js"></script>
<script type="text/javascript" src="/js/mtAudioPlayerUI-nc.js"></script>
<script type="text/javascript" src="/js/mtAudioPlaylist-nc.js"></script>
<style type="text/css" media="screen">
#mooTunes{
margin:0 auto 100px;
width:300px;
}
</style>
<link rel="stylesheet" href="css/mooTunes/mooTunes-nc.css" type="text/css" media="screen" title="mtAudio Player Style Sheet" charset="utf-8">
<script type="text/javascript" charset="utf-8">
var mooTunes, playlist, mtPlayer, tinyToggle, tinyToggleTimer;
tinyToggle = function(){
this.name.fade("toggle");
this.artist.fade("toggle");
}
window.addEvent("domready", function(){
if(! new AudioCheck().check()){
document.body.adopt(new Element("p", { html : "Your browser does not HTML5 audio"}));
return;
}
playlist = [ {artist : "Kevin MacLeod", mp3:"mp3/Truth of the Legend.mp3",ogg:"ogg/Truth of the Legend.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/MTA.mp3",ogg:"ogg/MTA.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/What You Want ver 2.mp3",ogg:"ogg/What You Want ver 2.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/Chase.mp3",ogg:"ogg/Chase.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/Exciting Trailer.mp3",ogg:"ogg/Exciting Trailer.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/Faceoff.mp3",ogg:"ogg/Faceoff.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/Heavy Interlude.mp3",ogg:"ogg/Heavy Interlude.ogg"},
{artist : "Kevin MacLeod", mp3:"mp3/Just Nasty.mp3",ogg:"ogg/Just Nasty.ogg"}
];
playlist = new mtAudioPlaylist( { tracks : playlist, parent : $("mooTunes") });
$(playlist).store("shrink", new Fx.Tween($(playlist), { onComplete: function(){ dbug.log("complete"); $(playlist).setStyle("display", "none"); } } ));
mtPlayer = new mtAudioPlayer({ auto : true, volume : 10, tracks : playlist })
playlist.setPlayer(mtPlayer);
mooTunes = new mtAudioPlayerUI( mtPlayer, { player : mtPlayer, parent : $('mooTunes'), noShrinker : $('mooTunes'), shrinkable : true,
onShrink : function(){
$(playlist).retrieve("shrink").start("opacity",0);
mooTunes.readoutElems.artist.fade("hide");
tinyToggleTimer = tinyToggle.periodical(2500, mooTunes.readoutElems);
},
onGrow : function(){
$(playlist).fade("in").setStyle("display", "");
tinyToggleTimer = $clear(tinyToggleTimer);
mooTunes.readoutElems.name.fade("show");
mooTunes.readoutElems.artist.fade("show");
}
}).inject();
playlist.inject();
});
</script>
</head>
<body id="at">
<ul style="position:absolute;">
References
<li><a href="http://html5doctor.com/native-audio-in-the-browser/">HTML5 Doctor</a></li>
<li><a href="https://developer.mozilla.org/En/nsIDOMHTMLMediaElement">Mozilla (nsIDOMHTMLMediaElement)</a></li>
<li><a href="https://developer.mozilla.org/en/HTML/Element/audio">Mozilla (audio)</a></li>
<li><a href="http://dev.w3.org/html5/spec/Overview.html#timeranges">W3C</a></li>
<li><a href="http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5">Ogg in HTML5</a></li>
<li><a href="http://jssoundkit.sourceforge.net/">Javascript Sound Kit</a></li>
<li><a href="http://incompetech.com/m/c/royalty-free/">Kevin MacLeod Music</a></li>
</ul>
<div id="mooTunes">
</div>
</body>
</html>