Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
handle pause
Browse files Browse the repository at this point in the history
  • Loading branch information
irony committed Jan 23, 2014
1 parent 8980862 commit 3edc8d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion partial/room/room.js
Expand Up @@ -59,12 +59,13 @@ angular.module('wejay').controller('RoomCtrl',function(socket, $rootScope, $scop

console.log('change', p, song);

// next
if (p.data.index === 1 && p.data.playing ){
socket.emit('skip', song);
} else {
// new song
if (p.data.track && !p.data.track.adversiment && song){
if (p.data.track.uri !== song.spotifyId){
if (p.data.track.uri !== song.spotifyId || !p.data.playing){
$scope.master = false;
} else {
$scope.master = true;
Expand Down

0 comments on commit 3edc8d5

Please sign in to comment.