Showing course videos using the Angular YouTube Player
In this section, we'll create a separate video component to display videos that are attached to a course. For simplicity, we'll accept the information as @Input
inside the Video component, like so:
@Component({ selector: 'workspace-video', templateUrl: './video.component.html', styleUrls: ['./video.scss'], }) export class VideoComponent implements OnDestroy, OnInit { private youtubeIframeScript: HTMLScriptElement; @Input() public title!: string; @Input() public name!: string; @Input() public videoId!: string; @Input() public description!: string; @Input() public snippet!: string; get youtubeLink () { return this.title + ": https://www.youtube.com/watch?v...