File Manager
Pro
/data/web/virtuals/8819/virtual/www/mp3/jukebox/test
PHP 7.4.33
Linux
/data/web/virtuals/8819/virtual/www/mp3/jukebox/test/option-id.html
1.7 KB
0640
Back
<!DOCTYPE html> <html lang="en-US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta charset="UTF-8"> <title>id</title> <link href="_styles.css" rel="stylesheet" type="text/css"> <script src="_prettify.js"></script> <script src="_test-stuff.js"></script> <!-- Wimpy Engine --> <script src="../wimpy.js"></script><script src="wimpy.js"></script> </head> <body onload="pageReady()"> <div id="mainMenu"></div> <div id="pageWrapper" class="pageWrapper"> <script> function getPlayerPlaylist(theID){ // Get a handle to a player using the "id" var player = wimpy.getPlayer(theID); // Retrieve the player's playlist var playlist = player.getPlaylist(); // Set up a string to return var out = theID + " playlist:<br>"; // Parse the javascript playlist. For each item // in the playlist, get the title and file for(var i=0; i<playlist.length; i++){ // Get the next item var item = playlist[i]; // Add text to the autput out += "title: " + item.title + " file : " + item.file + "<br>"; } // return the text return out + "<p> </p>"; } function doit(){ var out = document.getElementById("showOuptut"); out.innerHTML = getPlayerPlaylist("myPlayer1") + getPlayerPlaylist("myPlayer2"); } </script> <div id="myPlayer1" data-wimpyPlayer data-media="../song1.mp3"></div> <p>myPlayer1</p> <div id="myPlayer2" data-wimpyPlayer data-media="../song2.mp3"></div> <p>myPlayer2</p> <!-- A simple button to ping the "doit" function. --> <p> </p><p><input type="button" onclick="doit()" value="Get Player Info" /></p><p> </p> <pre id="showOuptut"> Results will show up here. </pre> <!-- Description --> </div> <!-- close pageWrapper --> </body> </html>
Cancel
Download
Save changes
File Manager Pro · single-file PHP 7.4.33 on Linux · paths encrypted in URL (AES-256-CTR)