Skip to content

Commit

Permalink
don't use debounceTime for converter events
Browse files Browse the repository at this point in the history
  • Loading branch information
adlerre committed May 27, 2020
1 parent 83d75c4 commit a9cd78e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ui/src/app/converter/converter.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Component, OnInit, OnDestroy } from "@angular/core";

import { timer, Subscription, Observable } from "rxjs";
import { debounceTime } from "rxjs/operators";

import videojs from "video.js";
import videojsPluginQualitySelector from "@silvermine/videojs-quality-selector";

import { environment } from "../../environments/environment";

import { ConverterApiService } from "./api.service";
import { ConverterJobService, AppEventData, AppEvent } from "./converterJob.service";
import { ConverterJobService, AppEventData } from "./converterJob.service";
import { ErrorService } from "../_services/error.service";

import { Job } from "./definitions";
Expand All @@ -36,8 +35,6 @@ export class ConverterComponent implements OnInit, OnDestroy {

end = this.limit;

debounceObservable: Observable<AppEvent<Job>>;

timer: Subscription;

socket: Subscription;
Expand All @@ -61,8 +58,7 @@ export class ConverterComponent implements OnInit, OnDestroy {
}

ngOnInit() {
this.debounceObservable = this.$jobsvc.events.pipe(debounceTime(1000));
this.socket = this.debounceObservable.subscribe(evt => {
this.socket = this.$jobsvc.events.subscribe(evt => {
this.handleEvent(evt.event);
});

Expand Down

0 comments on commit a9cd78e

Please sign in to comment.