mirror of https://github.com/calzoneman/sync.git
Fix livestream bug
This commit is contained in:
parent
96bd8aa9bd
commit
bee58b421d
|
@ -371,7 +371,7 @@ Channel.prototype.playNext = function() {
|
||||||
idx: this.currentPosition
|
idx: this.currentPosition
|
||||||
});
|
});
|
||||||
// Enable autolead for non-twitch
|
// 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();
|
time = new Date().getTime();
|
||||||
channelVideoUpdate(this, this.currentMedia.id);
|
channelVideoUpdate(this, this.currentMedia.id);
|
||||||
}
|
}
|
||||||
|
@ -561,9 +561,13 @@ Channel.prototype.sendRecentChat = function(user) {
|
||||||
|
|
||||||
// Send a sync packet
|
// Send a sync packet
|
||||||
Channel.prototype.sendMediaUpdate = function(user) {
|
Channel.prototype.sendMediaUpdate = function(user) {
|
||||||
if(this.currentMedia != null)
|
if(this.currentMedia != null) {
|
||||||
user.socket.emit('mediaUpdate', this.currentMedia.packupdate());
|
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
|
// Sent when someone logs in, to add them to the user list
|
||||||
Channel.prototype.broadcastNewUser = function(user) {
|
Channel.prototype.broadcastNewUser = function(user) {
|
||||||
|
|
Loading…
Reference in New Issue