Fairoj : Playback button is enabled after the pd is completed
This commit is contained in:
parent
d602d11346
commit
b441cb8814
@ -146,10 +146,12 @@
|
|||||||
</button> </span>
|
</button> </span>
|
||||||
<!-- <div class="fab-group" *ngIf="master.fk_pd_type == '3'"> -->
|
<!-- <div class="fab-group" *ngIf="master.fk_pd_type == '3'"> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<button *ngIf="master.fk_pd_type == '3'" mat-stroked-button class="mr-1 mb-1" color="primary" (click)="openPlayer()">
|
<span matTooltip="{{!videoplayback.enableBtn ? 'Recorded video is available after the PD is completed' : 'Play Recorded Video'}}" matTooltipPosition="above">
|
||||||
|
<button *ngIf="master.fk_pd_type == '3'" mat-stroked-button class="mr-1 mb-1" color="primary" (click)="openPlayer()" [disabled]="!videoplayback.enableBtn" >
|
||||||
<mat-icon>play_circle_filled</mat-icon>
|
<mat-icon>play_circle_filled</mat-icon>
|
||||||
<strong>Play</strong>
|
<strong>Play</strong>
|
||||||
</button>
|
</button>
|
||||||
|
</span>
|
||||||
<button *ngIf="master.fk_pd_type == '3'" mat-button mat-raised-button class="mr-1 mb-1" color="primary" (click)="openVideoChat()">
|
<button *ngIf="master.fk_pd_type == '3'" mat-button mat-raised-button class="mr-1 mb-1" color="primary" (click)="openVideoChat()">
|
||||||
<mat-icon>videocam</mat-icon>
|
<mat-icon>videocam</mat-icon>
|
||||||
<strong>Call</strong>
|
<strong>Call</strong>
|
||||||
|
|||||||
@ -87,3 +87,6 @@
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
.mat-tooltip{
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
@ -127,7 +127,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
videoSrc: any = null;
|
videoplayback: any = {enableBtn:false,url:null};
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
|
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
|
||||||
@ -147,7 +147,6 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
// this.masterRandomString = this.route.snapshot.params['rdmstr'];
|
// this.masterRandomString = this.route.snapshot.params['rdmstr'];
|
||||||
this.viewPdDetails(this.viewID,this.masterRandomString);
|
this.viewPdDetails(this.viewID,this.masterRandomString);
|
||||||
this.getAllNotes();
|
this.getAllNotes();
|
||||||
this.getVideoUrl(this.viewID,this.masterRandomString)
|
|
||||||
}
|
}
|
||||||
pd_QC_Rating: Number;
|
pd_QC_Rating: Number;
|
||||||
|
|
||||||
@ -162,6 +161,10 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
let masterData: any = data.records.pd_master_details;
|
let masterData: any = data.records.pd_master_details;
|
||||||
this.pdMasterData.push(masterData[0]);
|
this.pdMasterData.push(masterData[0]);
|
||||||
|
if(this.pdMasterData[0].pd_status == 'COMPLETED') {
|
||||||
|
this.getVideoUrl(this.viewID,this.masterRandomString)
|
||||||
|
this.videoplayback.enableBtn = true;
|
||||||
|
}
|
||||||
this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
||||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||||
this.pdApplicantData = data.records.applicants_details;
|
this.pdApplicantData = data.records.applicants_details;
|
||||||
@ -631,12 +634,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
openPlayer(){
|
openPlayer(){
|
||||||
if(this.videoSrc == null) {
|
if(this.videoplayback.url == null) {
|
||||||
this.notifier.notify('info',"No Videos Found");
|
this.notifier.notify('info',"No Videos Found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let dialogRef = this.dialog.open(VideoPlayerComponent,{
|
let dialogRef = this.dialog.open(VideoPlayerComponent,{
|
||||||
data:{videoUrl:this.videoSrc},
|
data:{videoUrl:this.videoplayback.url},
|
||||||
maxWidth: '100vw',
|
maxWidth: '100vw',
|
||||||
maxHeight: '100vh',
|
maxHeight: '100vh',
|
||||||
height: '80%',
|
height: '80%',
|
||||||
@ -648,7 +651,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
getVideoUrl(pd_id,randomStr){
|
getVideoUrl(pd_id,randomStr){
|
||||||
let params = {"pd_id":pd_id,"random_string":randomStr}
|
let params = {"pd_id":pd_id,"random_string":randomStr}
|
||||||
this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{
|
this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{
|
||||||
this.videoSrc=result['url'];
|
this.videoplayback.url=result['url'];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user