first commit

This commit is contained in:
Joris Bertomeu
2024-09-26 11:34:18 +02:00
commit 023f263361
18 changed files with 598 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class VideoProcessingService {
private apiUrl = 'http://localhost:3000';
constructor(private http: HttpClient) { }
startProcess(data: any): Observable<{ jobId: string }> {
return this.http.post<{ jobId: string }>(`${this.apiUrl}/start-process`, data);
}
getJobsStatus(): Observable<Array<any>> {
return this.http.get<Array<any>>(`${this.apiUrl}/jobs-status`);
}
downloadFile(filePath: string): Observable<Blob> {
return this.http.get(`${this.apiUrl}/download/${filePath}`, { responseType: 'blob' });
}
}