flyhi video issue

This commit is contained in:
venbainfotech 2022-07-26 17:47:06 +05:30
parent d26df4f1a4
commit f7e108f9ca
2 changed files with 44 additions and 11 deletions

View File

@ -71,6 +71,14 @@ 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(this.pd_category == '2'){
if(window.location.origin.includes('localhost')){
this.cusUrl = window.location.origin+'/#/chat/'+this.randomStr+";id="+this.pd_id+";type=1"+";pd_category=2";
}
else{
this.cusUrl = window.location.origin+'/vchat/#/chat/'+this.randomStr+";id="+this.pd_id+";type=1"+";pd_category=2";
}
}else{
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;";
} }
@ -78,6 +86,8 @@ export class ChatComponentComponent implements OnInit {
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;";
} }
} }
}
this.username = this.route.snapshot.paramMap.get('name') this.username = this.route.snapshot.paramMap.get('name')
if (this.username == null) { if (this.username == null) {
this.username = this.type_name this.username = this.type_name

View File

@ -148,14 +148,29 @@ export class TwilioService {
console.log('sineedge'); console.log('sineedge');
// alert('record'); // alert('record');
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"} console.log(this.user_data.pd_category)
let params
if(this.user_data.pd_category == '2'){
console.log('pd cat')
params = {"pd_category":this.user_data.pd_category,"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
}else{
console.log('pd cat else')
params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
}
console.log("connected api",params) console.log("connected api",params)
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
else if(this.user_data.type == '3' && withoutcustomer == '1'){ else if(this.user_data.type == '3' && withoutcustomer == '1'){
console.log('lenderdemo'); console.log('lenderdemo');
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
if(this.user_data.pd_category == '2'){
console.log('pd cat')
params = {"pd_category":this.user_data.pd_category,"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
}else{
console.log('pd cat else')
params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
}
console.log("connected api",params) console.log("connected api",params)
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
@ -548,8 +563,10 @@ disconnect(){
if(this.user_data.type == '2' && this.remoteVideo.nativeElement.firstChild != null) { if(this.user_data.type == '2' && this.remoteVideo.nativeElement.firstChild != null) {
let params let params
if(this.user_data.pd_category == '2'){ if(this.user_data.pd_category == '2'){
console.log('pd cat')
params = {"pd_category":this.user_data.pd_category,"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"} params = {"pd_category":this.user_data.pd_category,"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
}else{ }else{
console.log('pd cat else')
params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"} params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
} }
@ -558,8 +575,14 @@ disconnect(){
} }
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
console.log("disconnected api",params) if(this.user_data.pd_category == '2'){
console.log('pd cat')
params = {"pd_category":this.user_data.pd_category,"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
}else{
console.log('pd cat else')
params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
} console.log("disconnected api",params)
this.sendRoomandStatus(params).subscribe(rr=>{}) this.sendRoomandStatus(params).subscribe(rr=>{})
} }
this.roomObj.disconnect(); this.roomObj.disconnect();