0

On my (non-commercial) website, I wonna have an Youtube Playlist, for some music. That's why I've done an Playlist. But I miss there the option, to give it out a random way. I've read that by adding &shuffle=123 that would be work, but it isn't. So Is there an other way? I have many different ideas, but no one of them looks practicable for that amount of vids, it would be (actually 130, planned are 300-400).

And than there's an other important thing, how can I protect Viewer on my website from the negative things, an iframe is coming with. I mean for Facebook, Twitter an Whatsapp I'm using Shariff, but what options have I in this case?

Thanks a lot in before for yours help.

(And please excuse my bad english, I'm not native speaker)

1 Answers1

0

First, there is no protection on the player except for what you put on it. So you make the Playlist, you know what is in it.

As to "Shuffle" the play list, you can do it in a few steps.
1: Use the PlayListItems call to get a list of all the video ID's.
2: Put them into an array.
3: Then choose your method for "shuffle" the array ( like PHP shuffle ).
4: Use embedded player to make a new playlist from the re-ordered array list.

Example of a possible embedded playlist using video ID's

<iframe width="480" height="270" src="https://www.youtube.com/embed/NGJrUWWvDWs?playlist=bP_8EYQ-2RA,7oNd6U-qry0,fkHNgGaYR0I,OMOGaugKpzs" frameborder="0" ></iframe>

========================================================================
Help to make an array in php

Info on the function "shuffle"

Tempus
  • 787
  • 1
  • 8
  • 18
  • sorry, but I think you misunderstood what I meant. I surrely know, waht's in my Playlist. - What I meant is that not every visitor should be catched by google. That's why Heise has produced Shariff, because someusers uses facebook, others not or want be connected by facebook, with a specific site, so that why they developet Shariff. So only this users which clearly click on the Facebook button are sharing their (meta-)datas with facebook, and the others not. That's what I'm searching for, for the Playlist. - Thanks for your way, but can you show me, how that with point 2 and 3 works? Greetings – QuackBrick May 09 '17 at 21:45
  • Sorry, I did not understand what you were after regarding Shariff. Not seen it before. As for the points 2 and 3, I added some links for you to look at. Best is to use php from start. Get 1, make it into 2, use 3 to arrange as required, and then do what you want in 4 to display the info. – Tempus May 13 '17 at 16:41