Fix livestream bug

This commit is contained in:
calzoneman 2013-03-16 19:58:38 -05:00
parent 96bd8aa9bd
commit bee58b421d
1 changed files with 6 additions and 2 deletions

View File

@ -371,7 +371,7 @@ Channel.prototype.playNext = function() {
idx: this.currentPosition
});
// Enable autolead for non-twitch
if(this.leader == null && this.currentMedia.type != "tw") {
if(this.leader == null && this.currentMedia.type != "tw" && this.currentMedia.type != "li") {
time = new Date().getTime();
channelVideoUpdate(this, this.currentMedia.id);
}
@ -561,8 +561,12 @@ Channel.prototype.sendRecentChat = function(user) {
// Send a sync packet
Channel.prototype.sendMediaUpdate = function(user) {
if(this.currentMedia != null)
if(this.currentMedia != null) {
user.socket.emit('mediaUpdate', this.currentMedia.packupdate());
}
else {
console.log('currentMedia is null');
}
}
// Sent when someone logs in, to add them to the user list