diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts index 29855d128..416ffd1de 100755 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts @@ -377,7 +377,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { }) autoCloseDialog = setTimeout(()=>{ this.dialogRef.close() - },15000) + },30000) this.dialogRef.afterClosed().subscribe(data=>{ console.log(data) if(autoCloseDialog != undefined && autoCloseDialog) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 847ebee10..2e8991728 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -163,7 +163,8 @@ - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 832a643e0..6abba62e8 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -129,7 +129,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { // } ] }; - videoplayback: any = {enableBtn:false,url:null}; + videoplayback: any = {enableBtn:true,url:null}; openvendorallocation: any; vendor_form_status_arr: any =[]; @@ -165,10 +165,10 @@ export class ViewPdComponent 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; - } + // 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.mandatoryFieldsValidations = masterData[1].mandatory_fields; this.pd_QC_Rating = Number(this.pdMasterData.qc_rating); this.pdApplicantData = data.records.applicants_details; @@ -658,7 +658,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { openVideoChat(){ let dialogRef = this.dialog.open(VideoChatComponent,{ - data:{type:'init',random_string:this.pdMasterData[0].random_string}, + data:{type:'init',random_string:this.pdMasterData[0].random_string,pd_id:this.viewID}, maxWidth: '100vw', maxHeight: '100vh', height: '100%', @@ -668,25 +668,33 @@ export class ViewPdComponent implements OnInit, OnDestroy { }) } openPlayer(){ - if(this.videoplayback.url == null) { - this.notifier.notify('info',"No Videos Found"); - return; - } + // if(this.videoplayback.url == null) { + // this.notifier.notify('info',"No Videos Found"); + // return; + // } + let params = {"pd_id":this.viewID,"random_string":this.masterRandomString} + this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ + if(result && result['dataStatus'] && result['records'] && result['records'].length > 0) { let dialogRef = this.dialog.open(VideoPlayerComponent,{ - data:{videoUrl:this.videoplayback.url}, + data:{videoUrl:result['records']}, maxWidth: '100vw', maxHeight: '100vh', - height: '80%', - width: '80%', + height: '90%', + width: '70%', disableClose: false, panelClass:'video-player' }) } -getVideoUrl(pd_id,randomStr){ - let params = {"pd_id":pd_id,"random_string":randomStr} - this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ - this.videoplayback.url=result['url']; - }) +else { + this.notifier.notify('info',"No Videos Found"); } +}) +} +// getVideoUrl(pd_id,randomStr){ +// let params = {"pd_id":pd_id,"random_string":randomStr} +// this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{ +// this.videoplayback.url=result['url']; +// }) +// } } \ No newline at end of file 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 81cf14054..7b4e194d8 100755 --- a/ng6-seed/src/app/video-chat/video-chat.component.ts +++ b/ng6-seed/src/app/video-chat/video-chat.component.ts @@ -157,7 +157,7 @@ export class VideoChatComponent implements OnInit { this.callDisconnectTimer = setTimeout(()=>{ this.notify("User is Busy !!.", "Try calling again later") this.disconnect() - },15000); + },30000); let event_data = {JSON_to_connect:data,type:'offer',random_string:this.chat_info.random_string,user_type:"officer"} this.socket.emit('Offer', event_data) } diff --git a/ng6-seed/src/app/video-chat/video-player/video-player.component.html b/ng6-seed/src/app/video-chat/video-player/video-player.component.html index 755bd2183..3bd40062b 100755 --- a/ng6-seed/src/app/video-chat/video-player/video-player.component.html +++ b/ng6-seed/src/app/video-chat/video-player/video-player.component.html @@ -1,4 +1,4 @@ -
+
- +
+
+ + + +
-
\ No newline at end of file + + +
+
+
+

Video {{item.video_name}}

+

{{item.date}}

+
+
+
+ +
+ +
+

{{item.duration}}

+
+ +
+
+
\ No newline at end of file diff --git a/ng6-seed/src/app/video-chat/video-player/video-player.component.scss b/ng6-seed/src/app/video-chat/video-player/video-player.component.scss index 146c20da7..d72f8f297 100755 --- a/ng6-seed/src/app/video-chat/video-player/video-player.component.scss +++ b/ng6-seed/src/app/video-chat/video-player/video-player.component.scss @@ -1,9 +1,18 @@ ::ng-deep { .video-player > mat-dialog-container { - background: rgba(255, 0, 0, 0.705); + background: black; padding: 0; } } .mat-raised-button{ color: #ffffff; background: #ffffff5c; +} +.playbackListClass{ + cursor: pointer; + // padding:5px; + min-height: 50px; +} +.playbackListClass :hover{ + background-color: darkred; + // box-shadow: 2px 3px rgba(255, 0, 0, 0.308) } \ No newline at end of file diff --git a/ng6-seed/src/app/video-chat/video-player/video-player.component.ts b/ng6-seed/src/app/video-chat/video-player/video-player.component.ts index b99550dd7..e178410fa 100755 --- a/ng6-seed/src/app/video-chat/video-player/video-player.component.ts +++ b/ng6-seed/src/app/video-chat/video-player/video-player.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, Inject, ViewChild, ElementRef } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; @Component({ @@ -7,13 +7,28 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; styleUrls: ['./video-player.component.scss'] }) export class VideoPlayerComponent implements OnInit { + playbackList = [] + // [{name:"Playback 1",duration:"20:01",date:"2020-05-20"}, + // {name:"Playback 2",duration:"20:01",date:"2020-05-20"}, + // {name:"Playback 3",duration:"20:01",date:"2020-05-20"}, + // {name:"Playback 4",duration:"20:01",date:"2020-05-20"}, + // {name:"Playback 5",duration:"20:01",date:"2020-05-20"}, + // {name:"Playback 6",duration:"20:01",date:"2020-05-20"}, + // {name:"Playback 7",duration:"20:01",date:"2020-05-20"},] videoSrc + selectedVideoIndex: Number; + // videos_arr: any; // = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' // = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4' + @ViewChild('videoPlayer') videoPlayerEle:ElementRef constructor( @Inject(MAT_DIALOG_DATA) public data:any,private matDialogRef:MatDialogRef) { if(data) { - if(data.hasOwnProperty('videoUrl') && data.videoUrl && data.videoUrl != null) { - this.videoSrc = data.videoUrl + if(data.hasOwnProperty('videoUrl') && data.videoUrl && data.videoUrl.length > 0) { + this.playbackList = data.videoUrl + // this.playbackList.push({video_name:"Sample 1",url : "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"}, + // {video_name:"Sample 2",url : "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"}) + // this.videoSrc = data.videoUrl + this.playVideo(0,this.playbackList[0]); } } } @@ -25,5 +40,18 @@ export class VideoPlayerComponent implements OnInit { console.log(this.videoSrc); } } + playVideo(i,obj) { + console.log(obj,this.videoPlayerEle); + this.selectedVideoIndex= i; + this.videoSrc = obj.url + + if(this.videoPlayerEle && this.videoPlayerEle.nativeElement) { + this.videoPlayerEle.nativeElement.scrollIntoView({ behavior: "smooth", block: "start" }) + } + } + downloadVideo(url) { + console.log(url) + window.open(url); + } } diff --git a/ng6-seed/src/assets/spinner/equalizer.gif b/ng6-seed/src/assets/spinner/equalizer.gif new file mode 100644 index 000000000..12ce5f0d1 Binary files /dev/null and b/ng6-seed/src/assets/spinner/equalizer.gif differ diff --git a/ng6-seed/src/environments/environment.stage.ts b/ng6-seed/src/environments/environment.stage.ts index b90a99fbf..e012d20d8 100755 --- a/ng6-seed/src/environments/environment.stage.ts +++ b/ng6-seed/src/environments/environment.stage.ts @@ -7,18 +7,30 @@ export const environment = { socketServerUrl:'https://morning-garden-90282.herokuapp.com', authorization: 'sparqvenba2018', - login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO", - seIdentityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961', - seUserPoolId: 'ap-south-1_qQ85yQZJO', - seClientId: '67b4fnbuols5upms5to8bvqddh', + login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_GqN9ZKRne", + // seIdentityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961', + // seUserPoolId: 'ap-south-1_qQ85yQZJO', + // seClientId: '67b4fnbuols5upms5to8bvqddh', + seIdentityPoolId : 'ap-south-1:d490a5f1-39d3-488b-ad5e-1b8c02d0b582', + seUserPoolId:'ap-south-1_GqN9ZKRne', + seClientId:'3na5nl7jascp007mg5s93rbj97', lenIdentityPoolId:"ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907", //This value is not used in the project - lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username :SPARQ_LENDER_DEV - lenClientId: "vkotfqgqorgjh3fvp1r26hslv", // ClientName:LENDER_DEV_WEB +// OLD ONE + // lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username + // lenClientId: "vkotfqgqorgjh3fvp1r26hslv", // ClientName - venIdentityPoolId: "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874", - venUserPoolId: "ap-south-1_K57yPaWxV", - venClientId: "6coneo2783pdhr30nstq32o86i", + lenUserPoolId:"ap-south-1_4kkhgsYo0", + lenClientId:"3fn24p62t3k7ja0pa50g453p30", + + + venIdentityPoolId: "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874", +// OLD ONE + // venUserPoolId: "ap-south-1_K57yPaWxV", + // venClientId: "6coneo2783pdhr30nstq32o86i", + + venUserPoolId:"ap-south-1_cBDvQB1ok", + venClientId:"6coneo2783pdhr30nstq32o86i", // firebase: { // apiKey: "AIzaSyCzmyM0WJ0wdLf8UsYoZ4GreICimyt7SEk", diff --git a/ng6-seed/src/environments/environment.ts b/ng6-seed/src/environments/environment.ts index 29face7a0..a629a9b84 100755 --- a/ng6-seed/src/environments/environment.ts +++ b/ng6-seed/src/environments/environment.ts @@ -39,7 +39,7 @@ export const environment = { }, region: 'ap-south-1', - login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO", + login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_GqN9ZKRne", // identityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961', // UserPoolId: 'ap-south-1_qQ85yQZJO', @@ -47,18 +47,31 @@ export const environment = { // lenClientId: "6egsdssf0i7h2o9mscqgqbn788" // ClientName - seIdentityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961', - seUserPoolId: 'ap-south-1_qQ85yQZJO', - seClientId: '67b4fnbuols5upms5to8bvqddh', +// OLD ONE + // seIdentityPoolId: 'ap-south-1:9a551eab-97cf-4991-b677-2f9bcd058961', + // seUserPoolId: 'ap-south-1_qQ85yQZJO', + // seClientId: '67b4fnbuols5upms5to8bvqddh', + + seIdentityPoolId : 'ap-south-1:d490a5f1-39d3-488b-ad5e-1b8c02d0b582', + seUserPoolId:'ap-south-1_GqN9ZKRne', + seClientId:'3na5nl7jascp007mg5s93rbj97', lenIdentityPoolId:"ap-south-1:ca22dabc-db59-4af5-9bb8-265f7ec95907", //This value is not used in the project - lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username - lenClientId: "vkotfqgqorgjh3fvp1r26hslv", // ClientName +// OLD ONE + // lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username + // lenClientId: "vkotfqgqorgjh3fvp1r26hslv", // ClientName + + lenUserPoolId:"ap-south-1_4kkhgsYo0", + lenClientId:"3fn24p62t3k7ja0pa50g453p30", venIdentityPoolId: "ap-south-1:5ad3ce43-4260-4273-87b2-e6a377b8e874", - venUserPoolId: "ap-south-1_K57yPaWxV", - venClientId: "6coneo2783pdhr30nstq32o86i", +// OLD ONE + // venUserPoolId: "ap-south-1_K57yPaWxV", + // venClientId: "6coneo2783pdhr30nstq32o86i", + + venUserPoolId:"ap-south-1_cBDvQB1ok", + venClientId:"6coneo2783pdhr30nstq32o86i", rekognitionBucket: '',