Doubt about music player for website

Asked

Viewed 59 times

0

I wonder if there’s a way I can make a music player for website, with AJAX, PHP or HTML5, using a youtube playlist. How to make it play in random mode this playlist not to keep repeating the same order every time?

  • Read this link, and browse the youtube api, there are things that can help you there: https://developers.google.com/youtube/v3/docs/playlists/list?hl=pt-br

1 answer

0

According to the Youtube:

Embed a playlist

  1. On a computer, log in to your Youtube account.
  2. On the left side of the page, click Playlists.
  3. Click on the playlist title you want to embed.
  4. Click on Share .
  5. Click on Embed.
  6. Copy the HTML code from the box that will appear.
  7. Paste the code into the HTML of your blog or website.

HTML only.

Editing: as the comment of Leonardo Patrício, if you want, the Youtube provides its API for various applications.

  • ta msi has a way I leave it in random play? so that every time the person enters the site does not start with the same song

  • Will you use the HTML or API option? If it is with the API, you can try something as suggested in the answer http://stackoverflow.com/questions/15866979/youtube-api-playlist-shuffle-not-working In this other link, you have several examples of Java/Python/PHP implementations https://Developers.google.com/youtube/v3/Docs/channelSections/list with Shuffle also

  • But I don’t understand how it worked. I have to do a SCRIPT with the codes on the site player?

  • leonardopessoa used a code you have in the examples you posted but it does not initialize the play list, it loads the video but not the play

  • Which browser did you use? Chrome/Firefox/Safari?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.