penambahan logic pada cctv

This commit is contained in:
2024-06-25 14:45:11 +07:00
parent 873e24a6ac
commit e27493171e
5 changed files with 143 additions and 36 deletions

View File

@@ -60,4 +60,14 @@ export class DeviceService {
});
return this.http.post<any>(url, data, { headers });
}
getStreamUrl(id): Observable<any> {
const endpoint = `/devices`;
const url = `${BASE_URL}${endpoint}/live-stream?device_id=${id}`;
const headers = new HttpHeaders({
'Content-Type': 'application/json',
'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT'
});
return this.http.get<any>(url, { headers });
}
}