ngx-embed-video icon indicating copy to clipboard operation
ngx-embed-video copied to clipboard

how do i autoplay ?

Open linkswapnil opened this issue 6 years ago • 1 comments

linkswapnil avatar Oct 19 '19 09:10 linkswapnil

It is as simple as setting autoplay to 1 in query parameters of embed src as described on the youtube documentation.

This is how you do it:

this.embedService.embed_youtube(this.youtubeId, {
	query: { autoplay: 1 }
});

It results in code such as:

<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1" allowfullscreen="" frameborder="0"></iframe>

SavageCore avatar Oct 22 '19 16:10 SavageCore