Permalink
Browse files

MB server side hacking

  • Loading branch information...
1 parent 2b8532c commit 696cfd99c106b704f2c11aab1dbfc81c4aef6735 @ciudilo ciudilo committed Sep 21, 2012
Showing with 42 additions and 4 deletions.
  1. +1 −1 scripts/start.sh
  2. +2 −2 static/js/musictionary.js
  3. +39 −1 templates/room.html
View
@@ -4,7 +4,7 @@ cd /opt/shoutfb
. /opt/shoutfb/shoutfb/bin/activate
-python server.fcgi 1 2 3 &> shoutd.log &
+python server.fcgi 28046 383257af105f06f75f48 ca119b4d8e4385802d8d &> shoutd.log &
echo $! > /tmp/shoutd.pid
@@ -17,7 +17,7 @@ self.matrix = [
];
//*/
self.cursor = 0;
-self.tempo = 140;
+self.tempo = 120;
// Matrix is included by Flask on initial load
self.matrix = MusictionaryMatrix;
self.secret = MusictionarySecret();
@@ -102,4 +102,4 @@ $(function(){
return self;
-})(jQuery);
+})(jQuery);
View
@@ -6,6 +6,7 @@
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script>
<script src="//js.pusher.com/1.12/pusher.min.js" type="text/javascript"></script>
+ <script src="http://cdn-files.deezer.com/js/min/dz.js"></script>
<script type="text/javascript">
// TODO MRB: fold these into an individual config global?
MusictionaryMatrix = {{ matrix|safe }}
@@ -49,6 +50,12 @@ <h3 id="room_name">Room {{ room }}</h3>
<button id="stop" class="btn"><img src="{{ url_for('static', filename='img/stop.png') }}" /></button>
</div>
</div>
+ <div class="span6">
+ <h2>Recreate <strong>Thriller - Michael Jackson</strong>!</h2>
+ </div>
+ <div class="span2">
+ <button id="playclip">Play Clip</button>
+ </div>
</div>
</div>
</div>
@@ -61,4 +68,35 @@ <h3 id="room_name">Room {{ room }}</h3>
</div>
</div>
-</body>
+<div id="dz-root"></div>
+<script type="text/javascript">
+
+function stopPlayingClip()
+{
+ DZ.player.seek(0);
+ DZ.player.pause();
+}
+
+function seekToInterest()
+{
+ console.log("seeking to interest");
+ DZ.player.seek(11.5);
+ // Stop playing the clip in a bit
+ setTimeout(stopPlayingClip, 10000);
+}
+
+function playClip()
+{
+ DZ.player.playTracks([541000]);
+ setTimeout(seekToInterest, 1500);
+}
+
+ DZ.init({
+ appId: '106761',
+ channelUrl: 'http://x.afterwrk.com/static/html/channelDeezer.html',
+ player: {
+ onload: function(){}
+ }
+ });
+ </script>
+</body>

0 comments on commit 696cfd9

Please sign in to comment.