Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/jwheare/www.playdar.org
Browse files Browse the repository at this point in the history
  • Loading branch information
jwheare committed Jul 19, 2009
2 parents 0aedb9a + 188d038 commit 4f73e4f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 12 additions & 6 deletions js.html
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--#set var="title" value="Playdar - Music Content Resolver" --><!--#include virtual="/inc/header.html" --> <!--#set var="title" value="Playdar - Music Content Resolver" --><!--#include virtual="/inc/header.html" -->
<h2>Playdar Javascript Library</h2> <h2>Playdar Javascript Library</h2>
<p> <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>
<p> <p>
Here's how you use it: Here's how you use it:
Expand Down Expand Up @@ -149,11 +149,17 @@ <h3 id="streaming">Streaming</h3>
// Play a specific sound. Calls togglePause on the SM Sound object // Play a specific sound. Calls togglePause on the SM Sound object
Playdar.player.play_stream(sid); Playdar.player.play_stream(sid);


// Stop all playing sounds // togglePause on the current sound
Playdar.player.stop_all();

// togglePause on the latest sound
Playdar.player.toggle_nowplaying(); 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> </code></pre>


<h3 id="scrobbling">Scrobbling</h3> <h3 id="scrobbling">Scrobbling</h3>
Expand All @@ -169,7 +175,7 @@ <h3 id="scrobbling">Scrobbling</h3>
scrobbler.stop(); scrobbler.stop();
</code></pre> </code></pre>
<p> <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> </p>


<h3 id="utility">Utility Functions</h3> <h3 id="utility">Utility Functions</h3>
Expand Down
6 changes: 6 additions & 0 deletions static/0.4-changes.txt
Original file line number Original file line Diff line number Diff line change
@@ -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 Setup
===== =====
Instead of: Instead of:
Expand Down

0 comments on commit 4f73e4f

Please sign in to comment.