forked from dodo/AudioJS
/
demo.html
112 lines (90 loc) · 3.83 KB
/
demo.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML5 Audio Player</title>
<!-- Include the AudioJS Library -->
<script src="audio.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// Must come after the audio.js library
// Add AudioJS to all audio tags on the page when the DOM is ready
AudioJS.setupAllWhenReady();
/* ============= OR ============ */
// Setup and store a reference to the player(s).
// Must happen after the DOM is loaded
// You can use any library's DOM Ready method instead of AudioJS.DOMReady
/*
AudioJS.DOMReady(function(){
// Using the video's ID or element
var myPlayer = AudioJS.setup("example_video_1");
// OR using an array of video elements/IDs
// Note: It returns an array of players
var myManyPlayers = AudioJS.setup(["example_video_1", "example_video_2", video3Element]);
// OR all videos on the page
var myManyPlayers = AudioJS.setup("All");
// After you have references to your players you can...(example)
myPlayer.play(); // Starts playing the video for this player.
});
*/
/* ========= SETTING OPTIONS ========= */
// Set options when setting up the videos. The defaults are shown here.
/*
AudioJS.setupAllWhenReady({
controlsBelow: false, // Display control bar below video instead of in front of
controlsHiding: true, // Hide controls when mouse is not over the video
defaultVolume: 0.85, // Will be overridden by user's last volume if available
flashVersion: 9, // Required flash version for fallback
linksHiding: true // Hide download links when video is supported
});
*/
// Or as the second option of AudioJS.setup
/*
AudioJS.DOMReady(function(){
var myPlayer = AudioJS.setup("example_video_1", {
// Same options
});
});
*/
</script>
<!-- Include the AudioJS Stylesheet -->
<link rel="stylesheet" href="audio-js.css" type="text/css" media="screen" title="Audio JS" charset="utf-8">
<link rel="stylesheet" href="skins/hu.css" type="text/css" media="screen" title="Audio JS" charset="utf-8">
<link rel="stylesheet" href="skins/tube.css" type="text/css" media="screen" title="Audio JS" charset="utf-8">
<link rel="stylesheet" href="skins/vim.css" type="text/css" media="screen" title="Audio JS" charset="utf-8">
</head>
<body>
<p>Audio sample is <a href="http://palacecat.bandcamp.com/track/crookshanks">“Crookshanks” by Palace Cat</a>, via <a href="http://duplokat.tumblr.com/post/12695092003/geek-friday-ringtone">duplokat</a></p>
<!-- Begin AudioJS -->
<div class="audio-js-box tube-css">
<!-- Using the Audio for Everybody Embed Code http://camendesign.com/code/audio_for_everybody -->
<audio class="audio-js" controls preload>
<source src="Palace Cat - Crookshanks.mp3">
</audio>
</div>
<!-- End AudioJS -->
<!-- Begin AudioJS -->
<div class="audio-js-box vim-css">
<!-- Using the Audio for Everybody Embed Code http://camendesign.com/code/audio_for_everybody -->
<audio class="audio-js" controls preload>
<source src="Palace Cat - Crookshanks.mp3">
</audio>
</div>
<!-- End AudioJS -->
<!-- Begin AudioJS -->
<div class="audio-js-box hu-css">
<!-- Using the Audio for Everybody Embed Code http://camendesign.com/code/audio_for_everybody -->
<audio class="audio-js" controls preload>
<source src="Palace Cat - Crookshanks.mp3">
</audio>
</div>
<!-- End AudioJS -->
<!-- Begin AudioJS -->
<div class="audio-js-box">
<!-- Using the Audio for Everybody Embed Code http://camendesign.com/code/audio_for_everybody -->
<audio class="audio-js" controls preload>
<source src="Palace Cat - Crookshanks.mp3">
</audio>
</div>
<!-- End AudioJS -->
</body>
</html>