We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18678
    • 9 Posts
    My first snippet rolleyes
    For some friends in a band I needed a way to play their songs without revealing the path to the MP3’s in your HTML source. Even though I have to admit that the path encryption is based on a GPL encryption scheme, I don’t think web users will look at snippet source code to decrypt an MP3 path..!

    // Snippet: mPlayer
    // Description: Flash MP3 Player with URL encryption
    // Version: 1.0b
    // Author: mattiasdh ([email protected])
    //
    // Usage: [[mPlayer?file=filename.mp3]]
    //
    // 2006.11.21: Version 1.0b
    // - First release
    // - Bugfree (I think) and fully functional
    // - TODO: assign unique ID to each snippet call to implement javascript as_stopAll call
    //
    // Copyright & Licencing:
    // GNU General Public License (GPL) (http://www.gnu.org/copyleft/gpl.html)
    //
    // Credits:
    // Audio Player 1.2.3 from http://www.1pixelout.net/code/audio-player-wordpress-plugin/
    // modified to allow URL encryption.
    // Snippet code based on FlvPlayer snippet by Matt Hobbs.

    Download in attachment.
    Put mplayer.swf in assets/flash/ and your MP3’s in assets/media/
    Create a new snippet ’mPlayer’ and paste mplayer.php into it.
    That’s it!


    The reason I consider this snippet still under development is because you’ll see that at http://www.1pixelout.net/code/audio-player-wordpress-plugin/ starting one player stops the others, using javascript to go through the mplayer ID’s.
    Does anybody know how to get a unique ID for every snippet call?
      • 19132
      • 199 Posts
      Hey, two years later and this is working for me. Thank you for this nifty little player.
        MySQL: 5.0.45
        PHP: 5.2.6
        Linux 2.6.9-023stab048.6-enterprise #1
        cURL enabled
        PDO enabled
        FFox Apple 3.6.8
        Firebug DIS-abled