title: <cfmediaplayer> how to automatically play next track
body: <p>I've been working on creating a pop-up player for my site in which users can play a playlist of music that other users have uploaded to the site. However currently i'm having to manually click each track to play it, i was wondering if anyone has managed to create a <code>&lt;cfmediaplayer&gt;</code> which automatically plays the next song in the playlist. The way it knows which song to play currently is defined within a url variable that sends the track name the user clicks on, and then calls the database to see if it can find a match, then i use the source to output the location of the track i stored. Ill post code to give a much more clarified view of what i'm doing:</p>
  
  <pre><code>&lt;cfquery datasource="#mydatabase#" name="getsongs"&gt;
      Select *
      From artists, songs
      Where artist_id = song_artistid
  &lt;/cfquery&gt;
  
  &lt;cfif IsDefined("URL.song")&gt;
      &lt;cfquery datasource="#mydatabase#" name="playsong"&gt;
          Select *
          From songs
          Where artist_id = song_artistid
          And song_name = '#URL.song#'
      &lt;/cfquery&gt;
  &lt;/cfif&gt;
  
  &lt;div style="margin: 0 auto; width: 800px;&gt;
      &lt;div style="width: 300px; float: left; overflow: scroll;"&gt;
          &lt;cfoutput query="getartists"&gt;
              &lt;a href="popup_player.cfm?song=#song_name#&gt;#artist_name# - #song_name#&lt;/a&gt;
          &lt;/cfoutput&gt;
      &lt;/div&gt;
  
      &lt;cfif IsDefined("URL.song")&gt;
          &lt;div style="width: 500px; float: right;"&gt;
              &lt;cfoutput&gt;
                  &lt;cfmediaplayer name="song" source="artists/songs/#playsong.song_location#" autoplay="yes" height="500" width="500"&gt;&lt;/cfmediaplayer&gt;
              &lt;/cfoutput&gt;
          &lt;/div&gt;
      &lt;/cfif&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As you can see, i have a scrolling div which lists all the songs that would be in the users playlist. By clicking on the song, it updates which track is played in the media player. I was wondering if there is anyway the next link could be automatically clicked when the song is finished and perhaps have a way that if a variable has been set to repeat the playlist when it reaches the last track it goes back to the first one again.</p>