This commit is contained in:
Fabian Stamm 2017-06-20 13:58:01 +02:00
parent 65a690ed07
commit bdabac2623
3 changed files with 7 additions and 4 deletions

View File

@ -137,6 +137,8 @@ class Timecode {
ioClient.emit("play", { file: this.filePlaying });
ioClient.on("playing", () => {
this.startTime = new Date().getTime();
this.interval = setInterval(this.update.bind(this), 1000 / 25);
this.playing = true;
});
ioClient.on("update", (data) => {
this.vlcUpdate(data);
@ -146,8 +148,8 @@ class Timecode {
else {
this.startTime = new Date().getTime();
this.playing = true;
this.interval = setInterval(this.update.bind(this), 1000 / 25);
}
this.interval = setInterval(this.update.bind(this), 1000 / 25);
}
stop() {
clearInterval(this.interval);

File diff suppressed because one or more lines are too long

View File

@ -159,6 +159,8 @@ class Timecode {
ioClient.emit("play", {file:this.filePlaying});
ioClient.on("playing", ()=>{
this.startTime = new Date().getTime();
this.interval = setInterval(this.update.bind(this), 1000/25);
this.playing = true;
});
ioClient.on("update", (data)=>{
this.vlcUpdate(data);
@ -167,9 +169,8 @@ class Timecode {
} else {
this.startTime = new Date().getTime();
this.playing = true;
this.interval = setInterval(this.update.bind(this), 1000/25);
}
this.interval = setInterval(this.update.bind(this), 1000/25);
}
stop() {