UIAngular/Client/src/app/components/live-stream/live-stream.component.ts

47 lines
1.2 KiB
TypeScript

import { BibleVerseService } from './../../services/bible-verse.service';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'live-stream-component',
templateUrl: './live-stream.component.html',
styleUrls: ['./live-stream.component.css']
})
export class LiveStreamComponent implements OnInit {
public sermonVideo: string = 'https://ofbbutte.com/static/media/video/sermon.mp4';
public pleaseWait: string = 'https://ofbbutte.com/static/media/video/PleaseWait.jpg';
public clickToPlay: string = 'https://ofbbutte.com/static/media/video/ClickToPlay.jpg';
public videoSrc: string = this.sermonVideo;
public poster: string = this.clickToPlay;
public error: boolean = false;
public showVideo: boolean = false;
constructor() { }
ngOnInit() {
setTimeout(() => {
if (!this.error) {
this.showVideo = true;
}
}, 3000)
}
public async vidError() {
if (this.videoSrc === '') return;
this.error = true;
setTimeout(async () => {
this.error = false;
setTimeout(() => {
if (!this.error) {
this.showVideo = true;
}
}, 3000);
}, 3000);
}
}