Search the Community
Showing results for tags 'playlist'.
-
Hey guys, I am looking for someone who can design an audio player that can also play a playlist for a website. The player I am looking for needs certain details. 1) Needs to hide src of file 2) Needs to have controls including attractive progress bar 3) Needs to read from mysql database. I am a bit of a programmer myself so I will be tweaking it but the skeleton must be there. Obviously willing to pay for your time please contact back.
-
Hi I have an .m3u playlist file on my server, it has links to different songs on my server. The .m3u playlist streams all the music. The thing I want the .m3u file to do is shuffle the music instead of going in the same order. I've been using this method to do it but it doesn't work. Any other ways or something wrong with my code? <?php $playlist = “/DONTFUCKWITHME/playlist.m3u"; if ($_SERVER['PATH_INFO'] == "/playlist.m3u") { # This a request for the actual playlist. playlist(); } else { # Fall through to end of script and display # the player HTML. } function playlist() { header("Content-type: audio/mpeg"); # Needed for PHP versions OLDER than 4.2.0 only. # If your host still has PHP older than 4.2.0, shame on them. # Find a better web host. srand(make_seed()); # Fetch our list of songs from a file. $songs = file($playlist); shuffle($songs); # Now output the URLs in random order. foreach ($songs as $song) { # Remove newline and any other leading and trailing # whitespace from URL of song. $song = trim($song); echo "$song\n"; } # Now exit before any HTML is produced. exit(0); } # Needed only for very old versions of PHP, # see srand call earlier. function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } ?> <html> <head> <title>MP3s Playing in Random Order</title> </head> <body> <h1 align="center">MP3s Playing in Random Order</h1> <embed src="/examples/randomsongs.php/playlist.m3u" width="0" height="0" autostart="true" type="audio/mpeg" loop="true"/> </body> </html>
-
Hi guys I needed some help and I found this forum so I thought I'd give it a try. I have this lab that Im doing and instructor really didnt go into detail on how to do it even the code that was demoed was not really helpful in the class . My issue is that I cant seem to get my foreach loop to read the files in the directory i specified and display the name along with being able to play the file as well . Any pointers would be great its over my head at this point . Thanks <!DOCTYPE html > <head> <title>Music Viewer</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="http://www.cs.washington.edu/education/courses/cse190m/09sp/labs/3-music/viewer.css" type="text/css" rel="stylesheet" /> </head> <body> <div id="header"> <h1>190M Music Playlist Viewer</h1> <h2>Search Through Your Playlists and Music</h2> </div> <div id="listarea"> <ul id="musiclist"> <!-- *means is equivalent to windows explorer search --> <?php foreach (scandir(C:\Users\test\Desktop\Main\xampp\htdocs\mp3)("./mp3/*.mp3") as $song) { ?> <li class="mp3item"> <a href="./<?= $song ?>"> <?= basename($song) ?> </a> <!--end of href -- > </li> </ul> </div> </body> </html>