Commit 5454ae62 authored by Valentin Buck's avatar Valentin Buck
Browse files

Fixed playback event

parent 1a87e65f
import { Services, ServiceBarrier } from "./Services";
export class FlexibleTimeBaseService {
export class FlexibleTimeBaseService extends EventTarget{
private tracked_rt = Date.now();
private internal_time = this.tracked_rt;
......@@ -10,6 +10,7 @@ export class FlexibleTimeBaseService {
private locked_framerate = false;
public constructor() {
super();
ServiceBarrier.wait().then(() => {
Services.GLService.addEventListener("FrameDone", () => {
this.count_frame();
......
......@@ -92,7 +92,7 @@ export class RecordingService extends EventTarget{
this.callback_id = null;
if(!this.isPlayingBack) return;
this.isPlayingBack = false;
this.dispatchEvent(new PlaybackStateEvent(true, this.event_number));
this.dispatchEvent(new PlaybackStateEvent(false, this.event_number));
}
public goEndPlayback(){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment