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