Permalink
Browse files

permalinks

  • Loading branch information...
1 parent 1f79ef7 commit 565cbcd34a51240441e42a535be32e74b0e23836 @substack committed Feb 7, 2012
Showing with 10 additions and 0 deletions.
  1. +1 −0 index.html
  2. +9 −0 play.js
View
@@ -77,6 +77,7 @@ <h3>playlist</h3>
<div id="buttons">
<input type="button" id="play" value="play">
<input type="button" id="reload" value="reload">
+ <a id="link" href="#">permalink</a>
</div>
<div id="talk"></div>
View
@@ -121,6 +121,15 @@ $(document).ready(function () {
if (!ready.player) return queue.push(reload);
ready = { player : true };
+ $('#link').attr('href', '?' + [
+ 'talkUri=' + escape($('#talk-uri').val()),
+ 'talkVolume=' + escape($('#talk-volume').val()),
+ 'talkOffset=' + escape($('#talk-offset').val()),
+ 'musicUri=' + escape($('#music-uri').val()),
+ 'musicVolume=' + escape($('#music-volume').val()),
+ 'musicOffset=' + escape($('#music-offset').val())
+ ].join('&'));
+
talk = $('#talk-api');
var talkUri = $('#talk-uri').val();
var talkId = talkUri.match(/\bv=([^&]+)/)[1];

0 comments on commit 565cbcd

Please sign in to comment.