Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switched to regular playback api.

Signed-off-by: Diwank Singh Tomer <diwank.singh@gmail.com>
  • Loading branch information...
commit 72fb627b7c259d2dcd121323fa928ba97e378d4f 1 parent 5f57e34
Diwank Singh Tomer authored
Showing with 17 additions and 10 deletions.
  1. +1 −2  package.json
  2. +15 −7 src/pages.coffee
  3. +1 −1  src/routes.coffee
3  package.json
View
@@ -24,6 +24,5 @@
"author": "creatorrr",
"license": "BSD",
"readmeFilename": "README.md",
- "devDependencies": {},
- "gitHead": "9b901c9f859aaee89c7237acdd56e87e7cfaf3a4"
+ "devDependencies": {}
}
22 src/pages.coffee
View
@@ -7,8 +7,7 @@ helpers =
head ->
script src: '/socket.io/socket.io.js'
script src: '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'
-
- script src: '/jquery.rdio.js'
+ script src: '//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js'
body ->
partial()
@@ -42,14 +41,23 @@ pages =
player: ->
layout =>
- div '#rdio', -> @playbackToken
+ h1 'Rdio Playback API simple example'
+ div '#apiswf'
+
+ input '#play_key', value: 'a997982'
+ button '#play', -> 'Play'
+ button '#stop', -> 'stop'
+ button '#pause', -> 'pause'
+ button '#previous', -> 'previous'
+ button '#next', -> 'next'
+
- input {type: 'hidden', id: 'playbackToken', value: @playbackToken}
+ input type: 'hidden', id: 'playback_token', value: @playbackToken
coffeescript ->
- playbackToken = $('#playbackToken').val()
- $('#rdio').rdio playbackToken
+ window.playback_token = $('#playback_token').val()
+ window.domain = window.location.hostname
- $('#rdio').on 'rdio.ready', (e, user) -> console.log user
+ script src: 'https://raw.github.com/rdio/hello-web-playback/master/hello.js'
# Precompile pages and export.
module.exports[name] = compile page, hardcode: helpers for name, page of pages
2  src/routes.coffee
View
@@ -97,4 +97,4 @@ module.exports = routes = (robot) ->
else
res.end pages.player
- playbackToken: data
+ playbackToken: data.result
Please sign in to comment.
Something went wrong with that request. Please try again.