ON
public showVideo(): void {
this.is_iframe = true;
this.iframeLoad$.pipe(delay(1000)).subscribe(() => {
const iframe_document =
this.iframeRef.nativeElement.contentWindow ||
this.iframeRef.nativeElement.contentWindow.document;
iframe_document.postMessage(
'{"event":"command","func":"playVideo","args":""}',
'*',
);
this.iframeRef.nativeElement.dispatchEvent(new Event('click'));
});
this.iframeLoad$.next();
}