diff --git a/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.html b/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.html index f8b54f7..9f1be77 100644 --- a/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.html +++ b/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.html @@ -101,7 +101,7 @@
- Total Device + Total CCTV

123123

@@ -125,7 +125,7 @@
- Total Device Active + Total CCTV Active

13123

@@ -149,7 +149,7 @@
- Total Device Non-Active + Total CCTV Non-Active

13123

diff --git a/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts b/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts index 435307e..e4b8c5f 100644 --- a/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts +++ b/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts @@ -10,8 +10,8 @@ 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 = ""; buildingSelected: any; @@ -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'); - const iframe = this.videoIframe.nativeElement; - iframe.src = camera.videoUrl; - + 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; } }