1 import { Component, ElementRef, ViewChild } from '@angular/core'
2 import { Video } from '@app/shared/shared-main'
3 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4 import { LiveVideoService } from './live-video.service'
7 selector: 'my-live-stream-information',
8 templateUrl: './live-stream-information.component.html',
9 styleUrls: [ './live-stream-information.component.scss' ]
11 export class LiveStreamInformationComponent {
12 @ViewChild('modal', { static: true }) modal: ElementRef
19 private modalService: NgbModal,
20 private liveVideoService: LiveVideoService
28 this.loadLiveInfo(video)
31 .open(this.modal, { centered: true })
34 private loadLiveInfo (video: Video) {
35 this.liveVideoService.getVideoLive(video.id)
37 this.rtmpUrl = live.rtmpUrl
38 this.streamKey = live.streamKey