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

View File

@ -45,6 +45,7 @@ export class ChatComponentComponent implements OnInit {
cusUrl: string = '';
private renderer: Renderer2;
cm_name: string;
pd_category: string;
constructor(
private router: Router,
private route: ActivatedRoute,
@ -53,6 +54,8 @@ export class ChatComponentComponent implements OnInit {
this.renderer = rendererFactory.createRenderer(null, null)
this.randomStr = this.route.snapshot.paramMap.get('randomStr')
// 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.pd_id = this.route.snapshot.paramMap.get('id')
this.cm_name = this.route.snapshot.paramMap.get('uid')
@ -74,6 +77,9 @@ export class ChatComponentComponent implements OnInit {
else{
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')
if (this.username == null) {
@ -94,7 +100,7 @@ export class ChatComponentComponent implements OnInit {
})
console.log(navigator.getUserMedia)
// console.log(navigator.getUserMedia)
// if (navigator.getUserMedia)
// navigator.getUserMedia({ audio: true, video: true }, function (stream) {
@ -141,7 +147,10 @@ export class ChatComponentComponent implements OnInit {
this.twilioService.localVideo = this.localVideo;
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'){
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);
}

View File

@ -34,6 +34,7 @@ export class TwilioService {
private router: Router,
private rendererFactory: RendererFactory2,private _snackBar:MatSnackBar) {
this.renderer = rendererFactory.createRenderer(null, null);
console.log("User Data From Component",this.user_data);
}
getToken(params): Observable<any> {
// return Observable.create((observer:any)=>{
@ -136,21 +137,29 @@ export class TwilioService {
});
console.log(this.getWithOutCustomer);
let withoutcustomer = this.getWithOutCustomer(this.roomParticipants)
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)
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)
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=>{})
}
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)
let params = {"fk_pd_id":this.user_data.pd_id,"room_id":this.roomObj.sid,"is_call_ended":"0"}
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=>{})
}
@ -307,9 +316,9 @@ export class TwilioService {
getWithOutCustomer(participant){
let participantWOC: any = []
participant.forEach(element => {
if(element.identity != 'CUSTOMER'){
//if(element.identity != 'CUSTOMER'){
participantWOC.push(element)
}
// }
});
return participantWOC.length
}
@ -542,13 +551,19 @@ disconnect(){
console.log("User type in service",this.user_data,this.remoteVideo)
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"}
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=>{})
}
else if(this.user_data.type == '3' && withoutcustomer == '0'){
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"}
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.roomObj.disconnect();