frontend: add share button and dialog for recording sharing functionality
This commit is contained in:
parent
8959d4721e
commit
fff7fb957c
@ -51,6 +51,14 @@
|
||||
<mat-icon id="delete" aria-label="Delete" title="Delete">delete</mat-icon>
|
||||
</button>
|
||||
}
|
||||
<button
|
||||
mat-icon-button
|
||||
aria-label="Share"
|
||||
title="Share"
|
||||
(click)="openShareDialog(recording)"
|
||||
>
|
||||
<mat-icon id="share">share</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="video-info-container">
|
||||
|
||||
@ -90,6 +90,9 @@
|
||||
.video-btns button #delete {
|
||||
color: var(--ov-error-color);
|
||||
}
|
||||
.video-btns button #share {
|
||||
color: var(--ov-text-primary-color);
|
||||
}
|
||||
|
||||
.video-info-container > div {
|
||||
width: 100%;
|
||||
|
||||
@ -2,9 +2,11 @@ import { CommonModule, DatePipe, DecimalPipe } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ShareRecordingDialogComponent } from '@lib/components';
|
||||
import { ContextService, HttpService } from '@lib/services';
|
||||
import {
|
||||
ActionService,
|
||||
@ -40,7 +42,8 @@ export class RoomRecordingsComponent implements OnInit {
|
||||
protected contextService: ContextService,
|
||||
protected httpService: HttpService,
|
||||
protected actionService: ActionService,
|
||||
protected route: ActivatedRoute
|
||||
protected route: ActivatedRoute,
|
||||
protected dialog: MatDialog
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@ -102,6 +105,13 @@ export class RoomRecordingsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
openShareDialog(recording: MeetRecordingInfo) {
|
||||
this.dialog.open(ShareRecordingDialogComponent, {
|
||||
width: '400px',
|
||||
data: { recordingId: recording.recordingId }
|
||||
});
|
||||
}
|
||||
|
||||
private async loadRecordings() {
|
||||
try {
|
||||
const recordingFilters: MeetRecordingFilters = {
|
||||
|
||||
@ -149,8 +149,16 @@ export class HttpService {
|
||||
return this.getRequest<MeetRecordingInfo>(path);
|
||||
}
|
||||
|
||||
getRecordingMediaUrl(recordingId: string): string {
|
||||
return `${this.API_PATH_PREFIX}/recordings/${recordingId}/media`;
|
||||
getRecordingMediaUrl(recordingId: string, secret?: string): string {
|
||||
let path = `${this.API_PATH_PREFIX}/recordings/${recordingId}/media`;
|
||||
if (secret) {
|
||||
path += `?secret=${secret}`;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
generateRecordingUrl(recordingId: string, privateAccess: boolean): Promise<{ url: string }> {
|
||||
return this.getRequest(`${this.API_PATH_PREFIX}/recordings/${recordingId}/url?privateAccess=${privateAccess}`);
|
||||
}
|
||||
|
||||
startRecording(roomId: string): Promise<MeetRecordingInfo> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user