vendredi 2 juin 2023

HTML : Youtube Videos embed

 Need to know Youtube Video ID (pyYgqK-do7g)

Using an <iframe> element in your web page html.

Use src attribute point to the youtube video link.

Use the width and height attributes to specify the dimension of the player.

We can make the video autoplay when vister visite webpage with more attributes in video link.

Use mute=1 after autoplay=1 to let your video start playing automatically and muted.

Exemple:

<iframe width="420" height="315"
src="https://www.youtube.com/embed/
pyYgqK-do7g?autoplay=1&mute=1">
</iframe>
 
 
With Playlist, we can add loop=1 for the video loop forever. 
Exemple:
 
<iframe width="420" height="315"
src="https://www.youtube.com/embed/pyYgqK-do7g&list=PLLcbeR0n_YwRI0Y_tR-FxbIleZW2r8oc9
&loop=1">
</iframe>
 


Aucun commentaire:

Enregistrer un commentaire