From f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 Nov 2020 10:56:23 +0100 Subject: Add live info in watch page --- .../modals/live-stream-information.component.html | 35 ------------------- .../modals/live-stream-information.component.scss | 10 ------ .../modals/live-stream-information.component.ts | 40 ---------------------- .../my-account-videos.component.ts | 2 +- 4 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html delete mode 100644 client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss delete mode 100644 client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts (limited to 'client/src/app/+my-account/my-account-videos') diff --git a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html b/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html deleted file mode 100644 index 2e65e1de9..000000000 --- a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - diff --git a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss b/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss deleted file mode 100644 index a79fec179..000000000 --- a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss +++ /dev/null @@ -1,10 +0,0 @@ -@import '_variables'; -@import '_mixins'; - -p-autocomplete { - display: block; -} - -.form-group { - margin: 20px 0; -} \ No newline at end of file diff --git a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts b/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts deleted file mode 100644 index a5885a8e7..000000000 --- a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Component, ElementRef, ViewChild } from '@angular/core' -import { LiveVideoService, Video } from '@app/shared/shared-main' -import { NgbModal } from '@ng-bootstrap/ng-bootstrap' - -@Component({ - selector: 'my-live-stream-information', - templateUrl: './live-stream-information.component.html', - styleUrls: [ './live-stream-information.component.scss' ] -}) -export class LiveStreamInformationComponent { - @ViewChild('modal', { static: true }) modal: ElementRef - - video: Video - rtmpUrl = '' - streamKey = '' - - constructor ( - private modalService: NgbModal, - private liveVideoService: LiveVideoService - ) { } - - show (video: Video) { - this.video = video - this.rtmpUrl = '' - this.streamKey = '' - - this.loadLiveInfo(video) - - this.modalService - .open(this.modal, { centered: true }) - } - - private loadLiveInfo (video: Video) { - this.liveVideoService.getVideoLive(video.id) - .subscribe(live => { - this.rtmpUrl = live.rtmpUrl - this.streamKey = live.streamKey - }) - } -} diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 7a3019239..84f022ad2 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts @@ -6,10 +6,10 @@ import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenServi import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' import { immutableAssign } from '@app/helpers' import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' +import { LiveStreamInformationComponent } from '@app/shared/shared-video-live' import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' import { VideoSortField } from '@shared/models' import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' -import { LiveStreamInformationComponent } from './modals/live-stream-information.component' @Component({ selector: 'my-account-videos', -- cgit v1.2.3