Fairoj : user reset issue for vendor and video playback status issue
This commit is contained in:
parent
cfd8334fab
commit
10510dcaf8
@ -796,6 +796,14 @@ adminSetpassword(awsuser,lenname){
|
|||||||
Permanent: false
|
Permanent: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
else if(lenname == 'VENDOR') {
|
||||||
|
var params = {
|
||||||
|
Password: 'temp1234', /* required */
|
||||||
|
UserPoolId: vendor_poolData.UserPoolId, /* required */
|
||||||
|
Username: awsuser, /* required */
|
||||||
|
Permanent: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -211,9 +211,9 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
// this.vendor_form_status_arr = JSON.stringify(data.records.vendor_form_status)
|
// this.vendor_form_status_arr = JSON.stringify(data.records.vendor_form_status)
|
||||||
// localStorage.setItem("vendorFormStatus_arr",this.vendor_form_status_arr)
|
// localStorage.setItem("vendorFormStatus_arr",this.vendor_form_status_arr)
|
||||||
}
|
}
|
||||||
this._pd.updateTwlioVideoStatus({"pd_id":this.viewID,"random_string":this.masterRandomString}).subscribe(rr=>{
|
// this._pd.updateTwlioVideoStatus({"pd_id":this.viewID,"random_string":this.masterRandomString}).subscribe(rr=>{
|
||||||
|
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, error => {
|
}, error => {
|
||||||
@ -683,7 +683,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{
|
this._pd.getRecordedPlaybackUrl(params).subscribe(result=>{
|
||||||
if(result && result['dataStatus'] && result['records'] && result['records'].length > 0) {
|
if(result && result['dataStatus'] && result['records'] && result['records'].length > 0) {
|
||||||
let dialogRef = this.dialog.open(VideoPlayerComponent,{
|
let dialogRef = this.dialog.open(VideoPlayerComponent,{
|
||||||
data:{videoUrl:result['records']},
|
data:{videoUrl:result['records'],masterData:this.pdMasterData[0]},
|
||||||
maxWidth: '100vw',
|
maxWidth: '100vw',
|
||||||
maxHeight: '100vh',
|
maxHeight: '100vh',
|
||||||
height: '90%',
|
height: '90%',
|
||||||
|
|||||||
@ -26,8 +26,8 @@
|
|||||||
<!-- <track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="Norwegian"> -->
|
<!-- <track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="Norwegian"> -->
|
||||||
<mat-card style="background-color: black;margin:0px;margin-top: 3px;">
|
<mat-card style="background-color: black;margin:0px;margin-top: 3px;">
|
||||||
<mat-card-content >
|
<mat-card-content >
|
||||||
<div class="playbackListClass" fxLayout="row" *ngFor="let item of playbackList;let i=index" (click)="playVideo(i,item)">
|
<div fxLayout="row" *ngFor="let item of playbackList;let i=index" >
|
||||||
<div fxLayout="column" fxFlex="85%" fxLayoutGap="10px">
|
<div class="playbackListClass" fxLayout="column" fxFlex="85%" fxLayoutGap="10px" (click)="playVideo(i,item)">
|
||||||
<div>
|
<div>
|
||||||
<p style="color:white;margin:0px;font-size: 20px;font-weight: bold;white-space:pre-wrap">{{item.video_name}}</p>
|
<p style="color:white;margin:0px;font-size: 20px;font-weight: bold;white-space:pre-wrap">{{item.video_name}}</p>
|
||||||
<p *ngIf="item.date" style="color:white;margin:0px;font-size:16px;">{{item.date}}</p>
|
<p *ngIf="item.date" style="color:white;margin:0px;font-size:16px;">{{item.date}}</p>
|
||||||
@ -45,10 +45,14 @@
|
|||||||
<p *ngIf="item.status" style="color:white;margin:0px;font-size:14px;">{{item.status}}</p>
|
<p *ngIf="item.status" style="color:white;margin:0px;font-size:14px;">{{item.status}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="column" align="end" fxLayoutAlign="flex-end">
|
<div fxLayout="column" align="end" fxLayoutAlign="flex-end">
|
||||||
<button align="end" style="float: right" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Copy Link" [disabled]="item.url == ''"
|
<button *ngIf="item.url != '' && item.url" align="end" style="float: right" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Copy Link"
|
||||||
matTooltipPosition="right" (click)="_pd.copyToClipBoard(item.url)">
|
matTooltipPosition="right" (click)="_pd.copyToClipBoard(item.url)">
|
||||||
<mat-icon>link</mat-icon>
|
<mat-icon>link</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
<!-- <button *ngIf="item.url == '' || !item.url" align="end" style="float: right" mat-stroked-button class="mr-1 mb-1 hover-icon" type="button"
|
||||||
|
(click)="checkVideoStatus(i,item)">
|
||||||
|
Check Status
|
||||||
|
</button> -->
|
||||||
</div>
|
</div>
|
||||||
<mat-divider style="border-top:1px solid rgb(105, 105, 105) !important"></mat-divider>
|
<mat-divider style="border-top:1px solid rgb(105, 105, 105) !important"></mat-divider>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -8,6 +8,11 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: #ffffff5c;
|
background: #ffffff5c;
|
||||||
}
|
}
|
||||||
|
.mat-stroked-button{
|
||||||
|
color: #ffffff;
|
||||||
|
// background: #ffffff5c;
|
||||||
|
border-color: #ffffff;
|
||||||
|
}
|
||||||
.playbackListClass{
|
.playbackListClass{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// padding:5px;
|
// padding:5px;
|
||||||
@ -15,5 +20,7 @@
|
|||||||
}
|
}
|
||||||
.playbackListClass :hover{
|
.playbackListClass :hover{
|
||||||
background-color: darkred;
|
background-color: darkred;
|
||||||
|
padding-bottom:5px;
|
||||||
|
padding-top: 5px;
|
||||||
// box-shadow: 2px 3px rgba(255, 0, 0, 0.308)
|
// box-shadow: 2px 3px rgba(255, 0, 0, 0.308)
|
||||||
}
|
}
|
||||||
@ -24,6 +24,7 @@ export class VideoPlayerComponent implements OnInit {
|
|||||||
// = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4'
|
// = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4'
|
||||||
@ViewChild('videoPlayer') videoPlayerEle:ElementRef
|
@ViewChild('videoPlayer') videoPlayerEle:ElementRef
|
||||||
notifier: NotifierService;
|
notifier: NotifierService;
|
||||||
|
pdMasterData: any = {};
|
||||||
constructor( @Inject(MAT_DIALOG_DATA) public data:any,private matDialogRef:MatDialogRef<VideoPlayerComponent>,
|
constructor( @Inject(MAT_DIALOG_DATA) public data:any,private matDialogRef:MatDialogRef<VideoPlayerComponent>,
|
||||||
notifier:NotifierService,private _pd:PdTrigerService) {
|
notifier:NotifierService,private _pd:PdTrigerService) {
|
||||||
this.notifier=notifier
|
this.notifier=notifier
|
||||||
@ -33,9 +34,27 @@ export class VideoPlayerComponent implements OnInit {
|
|||||||
// this.playbackList.push({video_name:"Sample 1",url : "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"},
|
// 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"})
|
// {video_name:"Sample 2",url : "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"})
|
||||||
// this.videoSrc = data.videoUrl
|
// this.videoSrc = data.videoUrl
|
||||||
|
if(data && data.hasOwnProperty('masterData')) {
|
||||||
|
this.pdMasterData = data.masterData
|
||||||
|
console.log(this.pdMasterData)
|
||||||
|
}
|
||||||
|
if(this.playbackList.length > 0) {
|
||||||
|
let processingStatus = this.playbackList.filter(vv=>vv.url == '')
|
||||||
|
if(processingStatus.length > 0 ){
|
||||||
|
processingStatus.forEach((re,index)=>{
|
||||||
|
if(re && re.url == '') {
|
||||||
|
this.checkVideoStatus(index,re)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(this.playbackList[0].url != ''){
|
||||||
this.playVideo(0,this.playbackList[0]);
|
this.playVideo(0,this.playbackList[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -62,5 +81,18 @@ export class VideoPlayerComponent implements OnInit {
|
|||||||
console.log(url)
|
console.log(url)
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
|
checkVideoStatus(i,obj) {
|
||||||
|
if(obj && obj.hasOwnProperty('room_id') && obj.room_id) {
|
||||||
|
this._pd.updateTwlioVideoStatus({"pd_id":this.pdMasterData.pd_id,"random_string":this.pdMasterData.random_string,"room_id":obj.room_id}).subscribe(result=>{
|
||||||
|
if(result && result['dataStatus']){
|
||||||
|
if(result['records']) {
|
||||||
|
this.playbackList[i].url = result['records']
|
||||||
|
this.playbackList[i].status = 'completed'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user