Permalink
Browse files

Final fixes.

  • Loading branch information...
1 parent 814ed98 commit 48f08b3b47b04ab8f90c3cf8e50d7f4c60af49af @millenomi committed Sep 17, 2011
@@ -253,4 +253,46 @@ $(document).ready ->
overlay.updateChannelPicker()
overlay.hide()
-
+ remote = ->
+ $.ajax
+ url: '/poll'
+ method: 'GET'
+ dataType: 'json'
+ success: (x) ->
+ console.log 'tick', x.action
+ if x and x.action
+ switch x.action
+ when 'next'
+ index = player.currentChannelIndex
+ index++
+ if index >= player.channels.length
+ index = 0
+
+ player.loadChannel player.channels[index]
+
+ if inside
+ window.clearTimeout(mouseTimeout)
+ hide = -> overlay.hide()
+ mouseTimeout = window.setTimeout(hide, 5000)
+
+ overlay.show() unless overlay.visible
+
+ when 'prev'
+ index = player.currentChannelIndex
+ index--
+ if index < 0
+ index = player.channels.length - 1
+
+ player.loadChannel player.channels[index]
+
+ if inside
+ window.clearTimeout(mouseTimeout)
+ hide = -> overlay.hide()
+ mouseTimeout = window.setTimeout(hide, 5000)
+
+ overlay.show() unless overlay.visible
+
+
+
+ window.setInterval remote, 2000
+
@@ -91,7 +91,10 @@
#overlay #channel-picker .channel h1 {
color: white;
+ line-height: 53px;
+ height: 53px;
font: 3em "D-SC", "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
+ text-overflow: ellipsis-word;
}
#overlay #channel-picker .channel img {
@@ -119,8 +119,7 @@ def login
@body_id = 'login'
client = GData::Client::YouTube.new
- next_url = 'http://localhost:3000/sign_up'
- next_url = 'http://primetime-dev2.infinite-labs.net/sign_up' if request.user_agent =~ /Mobile|webOS/
+ next_url = 'http://primetime-dev2.infinite-labs.net/sign_up'
secure = false # set secure = true for signed AuthSub requests
sess = true
@authsub_link = client.authsub_url(next_url, secure, sess)

0 comments on commit 48f08b3

Please sign in to comment.