« Web, HTML, Tech Forum

Your music player doesn't work no matter what you do? This might be the solution

Posted by RustedMako

posted
updated

Forum: Web, HTML, Tech


Ok, I troubleshoot A LOT with the iframes used to add music in your page and nothing seem to work with me, apparently, spacehey create embed links on the src="" property of the iframe, therefore, it breaks the main rule link used to autoplay and loop, if you change the quotation marks of the src="" property to single quotation marks like this: src='' it prevents the embed problem from spacehey



Your code should be like this:



iframe width="0" height="0" src='https://www.youtube.com/embed/YOURID?playlist=YOURID&loop=1&controls=1&autoplay=1' title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy"


Just change YOURID with the ID of the desired video, i hope this help someone



Report Topic

0 Replies