This commit is contained in:
Fabian Stamm
2017-06-20 17:25:12 +02:00
parent dcbb81ddd3
commit 31a040b03c
6 changed files with 20 additions and 131 deletions

View File

@ -140,10 +140,11 @@ class Timecode {
data.time = new FrameTime(d);
data.track = this.activeTrack.id;
data.filePlaying = this.filePlaying;
data.playing = this.playing;
ios.emit("update", data);
}
update(time:FrameTime) {
update() {
var d = new Date().getTime() - this.startTime;
this.toTrigger.forEach(e=>{
if(e.time.milliseconds <= d) {
@ -158,6 +159,7 @@ class Timecode {
data.time = new FrameTime(d);
data.track = this.activeTrack.id;
data.filePlaying = this.filePlaying;
data.playing = this.playing;
ios.emit("update", data);
}
@ -201,6 +203,7 @@ class Timecode {
stop() {
clearInterval(this.interval);
this.playing = false;
this.update();
if(this.filePlaying){
ioClient.emit("stop");
ios.emit("stopped");