Update on 15 Jun 2022: There is another way to loop videos using YouTube Music.
How do you make your interested YouTube videos or playlists autoplay and loop forever? By googling a while, I found a way for doing this although I think that it could be difficult for a number of audiences. However, it helps me solve my need at least. Following are the steps I used to do my own simple autoplay/loop YouTube player.
Table of Contents
Simple
Create an HTML page with the following content
<!DOCTYPE html> <html> <head> <title>Chương trình nghe nhạc Youtube</title> <style> #myhtml5player { position: absolute; top:0; bottom: 0; left: 0; right: 0; display: inline-block; margin: auto; } </style> </head> <body> <div id="wrapper" style="text-align: center"> <div id="myhtml5player"> <h1>Chuong trinh nghe nhac</h1> <iframe id="ytplayer" type="text/html" width="800" height="640" src="https://www.youtube.com/embed?listType=playlist&list=PL2F99_jPfm5rCC-uU4lhqfQ5WtYltyBj1&loop=1" frameborder="0"></iframe> </div> </div> <!-- src="https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&loop=1" --> </body> </html>
Go on YouTube, and get a video id or playlist id that you want to play. Then replace the value following the attribute list with it (i.e. PL2F99_jPfm5rCC-uU4lhqfQ5WtYltyBj1).
If you want to play a video, alter the value of the attribute src with the link in the comment below (in the snapshot) and use video id instead.
Open the HTML web page you have created in Google Chrome. The result would look like the following image.
Advanced
Will be updated soon.
Functionalities should be added:
- Allow changing videos/playlists via the friendly web interface.
- Off/On autoplay/loop.
- Insert a customised autoplay/loop YouTube player into this page.
- Provide downloadable materials for audiences.
- Allow our audiences to create their own autoplay/loop YouTube player and download it.