fixing logic cctv

This commit is contained in:
Fuzi_fauzia 2024-06-22 02:58:33 +07:00
parent 1433c55fce
commit 2bc467b381
2 changed files with 31 additions and 24 deletions

View File

@ -101,7 +101,7 @@
<div class="media d-flex">
<div class="media-body text-left">
<h6 class="text-muted" style="color: #ffffff !important">
Total Device
Total CCTV
</h6>
<h3 style="color: #ffffff !important">123123</h3>
</div>
@ -125,7 +125,7 @@
<div class="media d-flex">
<div class="media-body text-left">
<h6 class="text-light" style="color: #ffffff !important">
Total Device Active
Total CCTV Active
</h6>
<h3 style="color: #ffffff !important">13123</h3>
</div>
@ -149,7 +149,7 @@
<div class="media d-flex">
<div class="media-body text-left">
<h6 class="text-muted" style="color: #ffffff !important">
Total Device Non-Active
Total CCTV Non-Active
</h6>
<h3 style="color: #ffffff !important">13123</h3>
</div>

View File

@ -10,7 +10,7 @@ import videojs from "video.js";
styleUrls: ["./surveillance.component.css"],
})
export class SurveillanceComponent {
@ViewChild('videoIframe', { static: false }) videoIframe: ElementRef;
@ViewChild("videoIframe", { static: false }) videoIframe: ElementRef;
filteredRows: any[];
searchTerm: string = "";
@ -24,28 +24,33 @@ export class SurveillanceComponent {
spinnerFilterActive = false;
switchState: boolean;
public breadcrumb: any;
showIframe = false;
showIframe = false;
clicktrue = false;
cameras = [
{
id: 1,
name: 'Pengadilan Agama Padang Cam 1',
videoUrl: 'https://pdg2.cctvbadilag.my.id:5443/401900PTAPADANG/play.html?name=034163533934088379392939'
name: "Pengadilan Agama Padang Cam 1",
videoUrl:
"https://pdg2.cctvbadilag.my.id:5443/401900PTAPADANG/play.html?name=034163533934088379392939",
},
{
id: 2,
name: 'Pengadilan Agama Padang Cam 2',
videoUrl: 'https://pdg2.cctvbadilag.my.id:5443/401900PTAPADANG/play.html?name=671014455048381705129283'
name: "Pengadilan Agama Padang Cam 2",
videoUrl:
"https://pdg2.cctvbadilag.my.id:5443/401900PTAPADANG/play.html?name=671014455048381705129283",
},
{
id: 3,
name: 'Pengadilan Agama Purwakarta Cam 1',
videoUrl: 'https://bdg2.cctvbadilag.my.id:5443/400854PAPURWAKARTA/play.html?name=194533247298993755522217'
name: "Pengadilan Agama Purwakarta Cam 1",
videoUrl:
"https://bdg2.cctvbadilag.my.id:5443/400854PAPURWAKARTA/play.html?name=194533247298993755522217",
},
{
id: 4,
name: 'Pengadilan Agama Purwakarta Cam 2',
videoUrl: 'https://bdg2.cctvbadilag.my.id:5443/400854PAPURWAKARTA/play.html?name=113658520181242556385273'
}
name: "Pengadilan Agama Purwakarta Cam 2",
videoUrl:
"https://bdg2.cctvbadilag.my.id:5443/400854PAPURWAKARTA/play.html?name=113658520181242556385273",
},
];
constructor(
@ -83,7 +88,6 @@ showIframe = false;
ngAfterViewInit() {
//Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
//Add 'implements AfterViewInit' to the class.
}
fetchData(buildingSelected, categorySelected, statusSelected) {
@ -131,22 +135,25 @@ showIframe = false;
onClick(videoUrl: string) {
const iframe = this.videoIframe.nativeElement;
iframe.src = videoUrl;
this.clicktrue = true;
}
onMouseEnter(camera: any) {
console.log('enter');
console.log("enter");
if (this.clicktrue === false) {
const iframe = this.videoIframe.nativeElement;
iframe.src = camera.videoUrl;
}
this.showIframe = true;
}
onMouseLeave() {
console.log('leave');
console.log("leave");
const iframe = this.videoIframe.nativeElement;
iframe.src = '';
if (this.clicktrue === false) {
iframe.src = "";
}
this.showIframe = false;
}
}