-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
executable file
·195 lines (185 loc) · 9.06 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>Beatbar - Media player that beats in the browser address bar</title>
<meta name="description" content="The big O inside the address bar represents the current mouse position. Move the mouse pointer on the document to left and right to move O in the corresponding directions. When it appears over the controls, click the mouse button to take an action.">
<meta name="author" content="Jai Pandya">
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<link rel="stylesheet" href="css/style.css">
<!-- open graph meta tags -->
<meta property="og:title" content="Beatbar - media player that beats in the browser address bar" />
<meta property="og:description" content="The big O inside the address bar represents the current mouse position. Move the mouse pointer on the document to left and right to move O in the corresponding directions. When it appears over the controls, click the mouse button to take an action." />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://jaipandya.github.com/beatbar/" />
<meta property="og:image" content="http://jaipandya.github.com/beatbar/img/facebook.jpg" />
<meta property="fb:admins" content="621098783" />
<script src="js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
<!-- include SM2 library -->
<script type="text/javascript" src="js/libs/soundmanager/soundmanager2.js"></script>
<script src="js/libs/keymaster.js"></script>
<!-- Initialize soundManager -->
<script type="text/javascript">
soundManager.url = 'swf/';
soundManager.flashVersion = 9; // optional: shiny features (default = 8)
soundManager.useFlashBlock = false; // optionally, enable when you're ready to dive in
soundManager.debugFlash = false;
soundManager.debugMode = false;
soundManager.useConsole = true;
</script>
<script src="js/beatbar.js"></script>
<script src="http://connect.soundcloud.com/sdk.js" type="text/JavaScript"></script>
<script type="text/JavaScript">
// Initialize SoundCloud API
// Get some tracks
// Initialize Beatbar with the returned array of track URLs
var tracks, beatbar;
SC.initialize({
client_id: "04dd99b58b8be275394ad3ca3dd660e4"
});
SC.get('/tracks', {
'filter':'public,streamable',
'order':'hotness',
'bpm[to]':120,
'q':'love',
'duration[to]':80000
}, function(data){
tracks = $.map(data, function(track, i){
return track.stream_url + '?client_id=' + SC.options.client_id;
});
soundManager.onready(function() {
beatbar = new Beatbar();
});
}
);
$(document).ready(function(){
$('#play-button').click(function(){
var config = {
playlist : tracks
};
beatbar.init(config);
$(this).addClass('disabled');
})
});
</script>
<!-- Google analytics tracking code -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3405077-23']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<!-- facebook SDK-->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=230145113756041";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- twitter SDK -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<div class="container">
<div class='masthead'>
<img id='arrow' src='img/arrow.jpg' width='174' height='199' />
<div class="intro">
<a id='play-button' class="btn btn-large btn-success" href="#">Start playing</a>
<h1>Beatbar</h1>
<div class='social row'>
<div class='span1 offset5 fblike'>
<fb:like send="false" layout="button_count" width="200" show_faces="false"></fb:like>
</div>
<div class='span1 tweetbtton'>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://jaipandya.github.com/beatbar" data-text="Beatbar - a media player that beats in the browser address bar" data-via="jaipandya" data-related="jaipandya">Tweet</a>
</div>
</div>
<p>Media player that beats in the browser address bar</p>
</div>
<img src='img/screenshot.jpg' width='1140' height='294' />
</div>
<div class="description row">
<div class='span8 offset2'>
<h2>Usage</h1>
<p>
The big O inside the address bar represents the current mouse position.
Move the mouse pointer on the document to left and right to move O in the corresponding directions.
When it appears over the controls, click the mouse button to take an action.<br />
</p>
<h2>Keyboard shortcuts</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>Key</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label">p / k</span></td>
<td>Previous</td>
</tr>
<tr>
<td><span class="label">n / j</span></td>
<td>Next</td>
</tr>
<tr>
<td><span class="label">Space</span></td>
<td>Play / Pause</td>
</tr>
<tr>
<td><span class="label">Right</span></td>
<td>Seek forward by 5 seconds</td>
</tr>
<tr>
<td><span class="label">Left</span></td>
<td>Seek backward by 5 seconds</td>
</tr>
<tr>
<td><span class="label">Up / Down</span></td>
<td>Increase / Decrease volume</td>
</tr>
</tbody>
</table>
<h2>FAQs</h2>
<p class='faq'>
<strong>Q</strong>: How does it work?<br />
<strong>A</strong>: Beatbar uses <a href="http://www.schillmania.com/projects/soundmanager2/">soundManager</a> awesomeness to play audio. Using HTML5 and Flash, SoundManager 2 provides reliable cross-platform audio under a single JavaScript API. The player streams audio from <a href="http://soundcloud.com">SoundCloud</a> using their JS SDK.<br />
</p>
<p class='faq'>
<strong>Q</strong>: Why inside address bar?<br />
<strong>A</strong>: Because <a href="http://twitter.com/cameronmcefee">@cameronmcefee</a> and <a href="http://twitter.com/probablycorey">@probablycorey</a> had left this experiment for me. (Read <a href="http://cameronmcefee.com/parallax-url">parallex URL</a> and <strong>URL hunter</strong>)<br />
</p>
<p class='faq'>
<strong>Q</strong>: Source code?<br />
<strong>A</strong>: Check out <a href="http://jaipandya.github.com/beatbar/docs/beatbar.html">annotated source code</a> or explore it on <a href="http://github.com/jaipandya/beatbar">github</a>.
</p>
</div>
<div class='span8 offset2 hn'>
<em>Check HN discussion at <a href='http://news.ycombinator.com/item?id=3905318'>http://news.ycombinator.com/item?id=3905318</a></em>
</div>
</div>
<div class="footer">
<p>
<a href="http://jai.im">Jai Pandya</a> | <a href="http://twitter.com/jaipandya">@jaipandya</a> | <a href='http://github.com/jaipandya'>Fork me on github</a>
</p>
</div>
</div>
</body>
</html>