FlyHi pd category added
This commit is contained in:
parent
fc3ec32121
commit
d26df4f1a4
@ -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(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')
|
||||||
@ -140,7 +143,14 @@ 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}
|
if(this.pd_category == '2'){
|
||||||
|
console.log('pd_category')
|
||||||
|
this.twilioService.user_data = {type:this.type,pd_id:this.pd_id,random_string:this.randomStr,type_name:this.type_name,pd_category:this.pd_category}
|
||||||
|
}else{
|
||||||
|
this.twilioService.user_data = {type:this.type,pd_id:this.pd_id,random_string:this.randomStr,type_name:this.type_name}
|
||||||
|
console.log('151')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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(this.user_data)
|
||||||
}
|
}
|
||||||
getToken(params): Observable<any> {
|
getToken(params): Observable<any> {
|
||||||
// return Observable.create((observer:any)=>{
|
// return Observable.create((observer:any)=>{
|
||||||
@ -545,7 +546,13 @@ disconnect(){
|
|||||||
if (this.roomObj && this.roomObj !== null) {
|
if (this.roomObj && this.roomObj !== null) {
|
||||||
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
|
||||||
|
if(this.user_data.pd_category == '2'){
|
||||||
|
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{
|
||||||
|
params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"1"}
|
||||||
|
}
|
||||||
|
|
||||||
console.log("disconnected api",params)
|
console.log("disconnected api",params)
|
||||||
this.sendRoomandStatus(params).subscribe(rr=>{})
|
this.sendRoomandStatus(params).subscribe(rr=>{})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user