0 Replies Latest reply on Jul 8, 2015 3:14 PM by sorryaboutyourcats

    Random YouTube videos from a playlist to emulate a TV..


      First and foremost - hello!


      I just started playing with Edge Animate and was wondering if what I'm trying to accomplish is feasible.

      What do I want exactly? The ability to, say, click on "Gaming" to then have a random gaming video play.


      My programming skills are definitely not up to par, but I put together something that kind of works.

      By kind of works, I mean that it displays a random video from my playlist - but then if you click for another video, it duplicates the video.

      [Instead of, you know, replacing the video - emulating what a television does.]


      var youtube = $("<iframe/>");
      var ranPlay = Math.floor (Math.random () * 11);
      youtube.attr('type', 'text/html');
      youtube.attr('width', '640');
      youtube.attr('height', '360');
      youtube.attr('src', '//www.youtube.com/embed/videoseries?list=PL4_jMFibmkIOIaV1YzQhCufS2VWDSrpKD&index=' + ranPlay);
      youtube.attr('frameborder', '0');
      youtube.attr('allowfullscreen', '0');
      youtube.attr('controls', '0');


      I have attached the ghetto screenshot below to better demonstrate my issue.

      Any assistance will be greatly appreciated and gratitude will be presented in the form of tacos.


      Thanks in advance!