diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
index 516365c2d..8e88ac5ce 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
@@ -146,6 +146,12 @@
collections
Customer Images
+
+
+
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
index cc35ec89e..de939a125 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
@@ -20,6 +20,7 @@ import {DatePipe } from '@angular/common';
import { VendorPdAllocationComponent } from 'app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent';
import { QcCusImagesComponent } from 'app/quality-check/qc-cus-images/qc-cus-images.component';
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
+import { VideoPlayerComponent } from 'app/video-chat/video-player/video-player.component';
@Component({
selector: 'app-qc-view',
@@ -60,6 +61,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
public _EditPDtriggerForm:FormGroup;
pdCollectedDocument:any=[];
pd_QC_Rating: Number;
+ videoplayback: any = {enableBtn:false,url:null};
constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder,
private _qc: QcService,private route: ActivatedRoute,private router: Router, private QcListComponent: QcListComponent,private pdService:PdTrigerService) {
this.notifier=notifier
@@ -82,6 +84,10 @@ export class QcViewComponent implements OnInit, OnDestroy {
if (data.status == 200) {
let masterData: any = data.records.pd_master_details;
this.pdMasterData.push(masterData[0]);
+ if((this.pdMasterData[0].fk_pd_type == '3' || this.pdMasterData[0].fk_pd_type == '2') && (this.pdMasterData[0].pd_status == 'COMPLETED' || this.pdMasterData[0].pd_status == 'QC_COMPLETED')) {
+ this.getVideoUrl(this.viewID,this.masterRandomString)
+ this.videoplayback.enableBtn = true;
+ }
this.reportRandomString = btoa(masterData[0].random_string);
let parent_pd_id=masterData[0].parent_pd_id
localStorage.setItem('parent_pd_id_for_Genie',parent_pd_id);
@@ -354,6 +360,27 @@ export class QcViewComponent implements OnInit, OnDestroy {
}
})
}
+ openPlayer(){
+ if(this.videoplayback.url == null) {
+ this.notifier.notify('info',"No Videos Found");
+ return;
+ }
+ let dialogRef = this.dialog.open(VideoPlayerComponent,{
+ data:{videoUrl:this.videoplayback.url},
+ maxWidth: '100vw',
+ maxHeight: '100vh',
+ height: '80%',
+ width: '80%',
+ disableClose: false,
+ panelClass:'video-player'
+ })
+ }
+ getVideoUrl(pd_id,randomStr){
+ let params = {"pd_id":pd_id,"random_string":randomStr}
+ this.pdService.getRecordedPlaybackUrl(params).subscribe(result=>{
+ this.videoplayback.url=result['url'];
+ })
+ }
ngOnDestroy(): void {
if(this.destroyType==1){
this.QcListComponent.pdListLoad(true);
diff --git a/ng6-seed/src/app/video-chat/video-chat.component.ts b/ng6-seed/src/app/video-chat/video-chat.component.ts
index 48324c3c2..3e197343f 100755
--- a/ng6-seed/src/app/video-chat/video-chat.component.ts
+++ b/ng6-seed/src/app/video-chat/video-chat.component.ts
@@ -177,7 +177,7 @@ export class VideoChatComponent implements OnInit {
peerx.on('error', (err) => {
console.log("Fatal Error ",err);
this.disconnect();
- alert("Fatal Error" +JSON.stringify(err))
+ // alert("Fatal Error" +JSON.stringify(err))
})
peerx.on('stream', (stream)=> {
console.log("@##################33",stream)