Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/jwheare/www.playdar.org

  • Loading branch information...
commit 4f73e4f7708b722afe98fc4c994c497e233f6a17 2 parents 0aedb9a + 188d038
@jwheare jwheare authored
Showing with 18 additions and 6 deletions.
  1. +12 −6 js.html
  2. +6 −0 static/0.4-changes.txt
View
18 js.html
@@ -1,7 +1,7 @@
<!--#set var="title" value="Playdar - Music Content Resolver" --><!--#include virtual="/inc/header.html" -->
<h2>Playdar Javascript Library</h2>
<p>
- <a href="/static/playdar.js"><code>playdar.js</code></a> is a Javascript library for interacting with the Playdar HTTP API.
+ <a href="/static/playdar.js"><code>playdar.js</code></a> (0.4.3 <a href="/static/0.4-changes.txt">revision history</a>) is a Javascript library for interacting with the Playdar HTTP API.
</p>
<p>
Here's how you use it:
@@ -149,11 +149,17 @@ <h3 id="streaming">Streaming</h3>
// Play a specific sound. Calls togglePause on the SM Sound object
Playdar.player.play_stream(sid);
-// Stop all playing sounds
-Playdar.player.stop_all();
-
-// togglePause on the latest sound
+// togglePause on the current sound
Playdar.player.toggle_nowplaying();
+
+// Stop the current playing sound
+Playdar.player.stop_current();
+
+// Stops a specific sound if it's now playing
+Playdar.player.stop_stream(sid);
+
+// Whether any sound is playing at the moment
+Playdar.player.is_now_playing();
</code></pre>
<h3 id="scrobbling">Scrobbling</h3>
@@ -169,7 +175,7 @@ <h3 id="scrobbling">Scrobbling</h3>
scrobbler.stop();
</code></pre>
<p>
- Calling these will keep the Playdar daemon's audioscrobbler plugin up to date with your playback process and automatically handle the scrobbling protocol.
+ Calling these according to the will keep the Playdar daemon's audioscrobbler plugin up to date with your playback process and automatically handle the scrobbling protocol.
</p>
<h3 id="utility">Utility Functions</h3>
View
6 static/0.4-changes.txt
@@ -1,3 +1,9 @@
+0.4.3
+
+Playdar.player.stop_all is now Playdar.player.stop_current as we only keep track of one playing track at a time. Playdar.player.play_stream stops any current tracks before playing.
+
+0.4
+
Setup
=====
Instead of:
Please sign in to comment.
Something went wrong with that request. Please try again.