Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

attach stopping procedure to event of player instead of button

  • Loading branch information...
commit de47b01f3a10298701dc46a6adc1628b2fb12a9a 1 parent 5e3a432
@indeyets indeyets authored
Showing with 6 additions and 5 deletions.
  1. +5 −4 code.js
  2. +1 −1  tmradio.manifest
View
9 code.js
@@ -195,6 +195,9 @@ tmradio.iphone = {
tmradio.iphone.is_playing = true;
tmradio.iphone.getCurrentTrackInfo();
})
+ .on('pause', function(){
+ tmradio.iphone.stop();
+ })
.on('emptied', function(){ $('#results_ul').text('Error'); })
.get(0).play();
},
@@ -206,9 +209,7 @@ tmradio.iphone = {
$('#vote_actions').hide();
$('#login_ul').hide();
- var player = $('#tmRadio');
- player.get(0).pause();
- player.remove();
+ $('#tmRadio').remove();
tmradio.iphone.is_playing = false;
tmradio.iphone.track_info = null;
@@ -315,7 +316,7 @@ tmradio.iphone = {
tmradio.iphone.s = $('#stop');
tmradio.iphone.p.click(tmradio.iphone.play)
- tmradio.iphone.s.click(tmradio.iphone.stop)
+ tmradio.iphone.s.click(function(){ $('#tmRadio').trigger('pause'); })
$('#save_token_btn').click(tmradio.iphone.saveToken);
$('#request_token_btn').click(tmradio.iphone.requestToken)
View
2  tmradio.manifest
@@ -1,6 +1,6 @@
CACHE MANIFEST
#
-# Cache manifest version 28
+# Cache manifest version 29
#
code.js
cover.png
Please sign in to comment.
Something went wrong with that request. Please try again.