Compare commits

..

10 Commits

Author SHA1 Message Date
263f0f08dd is_call_ended key : ps 2022-07-28 14:09:29 +05:30
venbainfotech
f7e108f9ca flyhi video issue 2022-07-26 17:47:06 +05:30
venbainfotech
d26df4f1a4 FlyHi pd category added 2022-07-23 19:17:10 +05:30
venbatechnologies@gmail.com
fc3ec32121 video record issues fixed 2021-10-27 12:17:50 +05:30
venbatechnologies@gmail.com
f733ffb4f6 for ui changes 2021-10-26 17:13:30 +05:30
venbatechnologies@gmail.com
11c4fa11e2 video issues final fixed 2021-09-25 19:49:51 +05:30
venbatechnologies@gmail.com
1cbb5b036e video issues resolved 2021-09-24 22:59:54 +05:30
venbatechnologies@gmail.com
f93f5f7292 for checking initiate records call 2021-09-20 15:48:11 +05:30
venbatechnologies@gmail.com
84378a14dd for credit manager vodeo intiated 2021-09-18 17:35:19 +05:30
venbatechnologies@gmail.com
35b44f3af4 remove alert msg for testing purpose 2021-09-16 19:26:21 +05:30
4 changed files with 63 additions and 23 deletions

Binary file not shown.

View File

@ -183,12 +183,15 @@ body{
// "A B" // "A B"
// "C C"; // "C C";
grid-template-areas: grid-template-areas:
"A B"; "A B C";
// "B C";
//height:50%;
//width:100%;
::ng-deep .my-video{ ::ng-deep .my-video{
position: absolute; position: absolute;
top: 0; top: 0;
height:145px; height:50%;
width: 140px; width: 100%;
} }
} }
} }
@ -197,7 +200,18 @@ body{
grid-template-rows: $two-rows; grid-template-rows: $two-rows;
grid-template-areas: grid-template-areas:
"A B" "A B"
"C D"; "A C"
"A D";
background-color: #0f0f0f;
padding-left: 150px;
padding-right: 150px;
height:50%;
width:100%;
@media (orientation: portrait) {
padding-left:0px;
padding-right:0px;
}
} }
.grid--5 { .grid--5 {
@ -262,19 +276,21 @@ body{
} }
::ng-deep .video-wrapper { ::ng-deep .video-wrapper {
background-color: black;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
padding: 2px; padding: 20px;
.identity-name { .identity-name {
position: relative; position: relative;
background-color: #b1b1b1; background-color: #0f0f0f;
text-align: center; text-align: center;
opacity: 0.8; opacity: 0.8;
padding: 0; padding: 0;
bottom: 39px; bottom: 39px;
left: 0%; left: 0%;
.praticipant-name { .praticipant-name {
color:white;
// width: 80%; // width: 80%;
margin-left: 30px; margin-left: 30px;
margin-right: 30px; margin-right: 30px;

View File

@ -45,6 +45,7 @@ export class ChatComponentComponent implements OnInit {
cusUrl: string = ''; cusUrl: string = '';
private renderer: Renderer2; private renderer: Renderer2;
cm_name: string; cm_name: string;
pd_category: string;
constructor( constructor(
private router: Router, private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
@ -53,6 +54,8 @@ export class ChatComponentComponent implements OnInit {
this.renderer = rendererFactory.createRenderer(null, null) this.renderer = rendererFactory.createRenderer(null, null)
this.randomStr = this.route.snapshot.paramMap.get('randomStr') this.randomStr = this.route.snapshot.paramMap.get('randomStr')
// this.flag= this.route.snapshot.paramMap.get('flag'); // this.flag= this.route.snapshot.paramMap.get('flag');
this.pd_category = this.route.snapshot.paramMap.get('pd_category')
console.log("pd category in compnt ",this.pd_category);
this.type = this.route.snapshot.paramMap.get('type') this.type = this.route.snapshot.paramMap.get('type')
this.pd_id = this.route.snapshot.paramMap.get('id') this.pd_id = this.route.snapshot.paramMap.get('id')
this.cm_name = this.route.snapshot.paramMap.get('uid') this.cm_name = this.route.snapshot.paramMap.get('uid')
@ -69,10 +72,13 @@ export class ChatComponentComponent implements OnInit {
this.type_name = this.type == '1' ? 'CUSTOMER' : this.type == '2' ? 'PDOFFICER' : this.type == '3' ? this.cm_name : 'UNKNOWN' this.type_name = this.type == '1' ? 'CUSTOMER' : this.type == '2' ? 'PDOFFICER' : this.type == '3' ? this.cm_name : 'UNKNOWN'
if(this.type == '2' || this.type == '3') { if(this.type == '2' || this.type == '3') {
if(window.location.origin.includes('localhost')){ if(window.location.origin.includes('localhost')){
this.cusUrl = window.location.origin+'/#/chat/'+this.randomStr+";id="+this.pd_id+";type=1;"; this.cusUrl = window.location.origin+'/#/chat/'+this.randomStr+";id="+this.pd_id+";type=1;";
} }
else{ else{
this.cusUrl = window.location.origin+'/vchat/#/chat/'+this.randomStr+";id="+this.pd_id+";type=1;"; this.cusUrl = window.location.origin+'/vchat/#/chat/'+this.randomStr+";id="+this.pd_id+";type=1;";
}
if(this.pd_category == '2'){
this.cusUrl = this.cusUrl+"pd_category=2";
} }
} }
this.username = this.route.snapshot.paramMap.get('name') this.username = this.route.snapshot.paramMap.get('name')
@ -94,7 +100,7 @@ export class ChatComponentComponent implements OnInit {
}) })
console.log(navigator.getUserMedia) // console.log(navigator.getUserMedia)
// if (navigator.getUserMedia) // if (navigator.getUserMedia)
// navigator.getUserMedia({ audio: true, video: true }, function (stream) { // navigator.getUserMedia({ audio: true, video: true }, function (stream) {
@ -141,7 +147,10 @@ export class ChatComponentComponent implements OnInit {
this.twilioService.localVideo = this.localVideo; this.twilioService.localVideo = this.localVideo;
this.twilioService.remoteVideo = this.remoteVideo; this.twilioService.remoteVideo = this.remoteVideo;
this.twilioService.user_data = {type:this.type,pd_id:this.pd_id,random_string:this.randomStr,type_name:this.type_name} this.twilioService.user_data = {type:this.type,pd_id:this.pd_id,random_string:this.randomStr,type_name:this.type_name}
if(this.pd_category == '2'){
this.twilioService.user_data['pd_category']=this.pd_category ;
}
// console.log(this.twilioService.user_data);
console.log("Getting token", this.twilioService.localVideo, this.localVideo, this.remoteVideo, this.type_name); console.log("Getting token", this.twilioService.localVideo, this.localVideo, this.remoteVideo, this.type_name);
} }

View File

@ -34,6 +34,7 @@ export class TwilioService {
private router: Router, private router: Router,
private rendererFactory: RendererFactory2,private _snackBar:MatSnackBar) { private rendererFactory: RendererFactory2,private _snackBar:MatSnackBar) {
this.renderer = rendererFactory.createRenderer(null, null); this.renderer = rendererFactory.createRenderer(null, null);
console.log("User Data From Component",this.user_data);
} }
getToken(params): Observable<any> { getToken(params): Observable<any> {
// return Observable.create((observer:any)=>{ // return Observable.create((observer:any)=>{
@ -136,22 +137,30 @@ export class TwilioService {
}); });
console.log(this.getWithOutCustomer);
let withoutcustomer = this.getWithOutCustomer(this.roomParticipants) let withoutcustomer = this.getWithOutCustomer(this.roomParticipants)
console.log('getWithOutCustomer',withoutcustomer) console.log('getWithOutCustomer',withoutcustomer)
alert(this.user_data.type);
alert(withoutcustomer);
if((this.user_data.type == '2'|| this.user_data.type == '1') && (withoutcustomer == '1')) { if((this.user_data.type == '1' && withoutcustomer == '1') ||(this.user_data.type == '2' && withoutcustomer == '1')){
console.log("User type in service",this.user_data) console.log("User type in service",this.user_data)
let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"0"} let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"0"}
console.log("connected api",params) console.log(this.user_data.pd_category)
if(this.user_data.pd_category == '2'){
params["pd_category"] = this.user_data.pd_category;
}
console.log("connected api",params)
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
else if(this.user_data.type == '3' && withoutcustomer == '0'){ else if(this.user_data.type == '3' && withoutcustomer == '1'){
console.log("User type in service",this.user_data) console.log("User type in service",this.user_data)
let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"0"} let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"0"}
console.log("connected api",params) if(this.user_data.pd_category == '2'){
params["pd_category"] = this.user_data.pd_category;
}
console.log("connected api",params)
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
// } // }
@ -307,9 +316,9 @@ export class TwilioService {
getWithOutCustomer(participant){ getWithOutCustomer(participant){
let participantWOC: any = [] let participantWOC: any = []
participant.forEach(element => { participant.forEach(element => {
if(element.identity != 'CUSTOMER'){ //if(element.identity != 'CUSTOMER'){
participantWOC.push(element) participantWOC.push(element)
} // }
}); });
return participantWOC.length return participantWOC.length
} }
@ -542,13 +551,19 @@ disconnect(){
console.log("User type in service",this.user_data,this.remoteVideo) console.log("User type in service",this.user_data,this.remoteVideo)
if(this.user_data.type == '2' && this.remoteVideo.nativeElement.firstChild != null) { if(this.user_data.type == '2' && this.remoteVideo.nativeElement.firstChild != null) {
let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"} let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
console.log("disconnected api",params) if(this.user_data.pd_category == '2'){
params["pd_category"] = this.user_data.pd_category;
}
console.log("disconnected Fns in twilioservice t2 ",params);
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
else if(this.user_data.type == '3' && withoutcustomer == '0'){ else if(this.user_data.type == '3' && withoutcustomer == '0'){
console.log("User type in service",this.user_data) console.log("User type in service",this.user_data)
let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"} let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
console.log("disconnected api",params) if(this.user_data.pd_category == '2'){
params["pd_category"] = this.user_data.pd_category;
}
console.log("disconnected Fns in twilioservice t3 ",params);
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
this.roomObj.disconnect(); this.roomObj.disconnect();