We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 867
    • 241 Posts
    vERY Nice

    Is it possible to have différent mp3 to be read one after the other ?
      • 4238
      • 1 Posts
      Great snippet - I’m completely new to Modx and trying to get my head around it. I’ve also been trying to protect (to some extent- never completely possible) MP3’s on the website I’m working on so was very attracted to the URL encryption.

      Just a tip for anyone else in the same position: Whilst the song file names are encrypted in the flash player embed script, you can still see the full path to MP3’s - at least I could in Safari’s activity window. To get round this I put the MP3’s above the web root and created a php file that I put in the assets/media folder which I reference in the call to mPlayer instead of the MP3 itself. The php file reads the content of the MP3 and passes it on to mPlayer so the MP3 is never called client side. Not sure how foolproof this is but for any one interested:

      php code in song.php:
      $filepath='/home/username/music/file.mp3';
      $filename='file.mp3';
      header('Content-type: audio/mpeg');
      header('Content-Length: '.filesize($filepath));
      header('Content-Disposition: filename-"'.$filename.'"');
      header('Content-Transfer-Encoding: binary');
      header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
      
      readfile($filepath);
      exit;
      


      Works in Firefox (Mac) and Safari (Mac) - not tested on internet explorer or windows yet.

      On second thoughts still not secure - if you access the php file directly you can still right click and save as an mp3. Trying to figure out a way to pass a variable from the mplayer to the php file so it wont read the file if accessed someother way. Any thoughts?
        • 31961
        • 23 Posts
        I know this is an old plugin, however I’ve recently installed this plugin on a page that uses SIFR. For some reason I get page not loaded/cancelled message in the status bar. When explored using the activity window in safari the errors come from the sifr flash files not downloading.

        If I remove the mplayer plugin - no errors.

        Any thoughts on what part of the javascript is causing this problem?


          • 26931
          • 2,314 Posts
          Hi there,

          the snippet’s working great ... one question though

          on this site http://www.song.ly/ they use an almost similar player (or the same, but in an updated version with an option to regulate the volume), does anyone know which player they use...and where to download smiley

          thanks, j
            • 14779
            • 256 Posts
            I’m getting this error:

            Parse error: syntax error, unexpected ’"’, expecting T_STRING in /PATH_TO_MODX/public_html/manager/includes/document.parser.class.inc.php(770) : eval()’d code on line 30

            PHP version 5.3.1
            all files added to assets/snippets, and a valid mp3 file in assets/media
              PM me to find out how you can get a FREE ipad 2!
              • 14779
              • 256 Posts
              Never Mind. laugh It was related to Magic Quotes: http://modxcms.com/forums/index.php/topic,45975.0.html
                PM me to find out how you can get a FREE ipad 2!
                • 12147
                • 182 Posts
                Jan,

                Did you have any response to your question about where to find that audio player? I need one, too... smiley

                Wendy
                  • 25803 ☆ A M B ☆
                  • 721 Posts
                  Quote from: sharkbait at Dec 07, 2009, 05:41 AM

                  Hi there,

                  the snippet’s working great ... one question though

                  on this site http://www.song.ly/ they use an almost similar player (or the same, but in an updated version with an option to regulate the volume), does anyone know which player they use...and where to download smiley

                  thanks, j

                  To do this visit this site and download the plugin: http://wordpress.org/extend/plugins/audio-player/

                  Unzip it and upload player.swf to assets/snippets/mplayer.

                  Edit the mPlayer snippet code and change references to mplayer.swf to player.swf in these lines:

                  $output = '<object type="application/x-shockwave-flash" id="'.$id.'" data="'.$playerPath.'/mplayer.swf" width="216" height="18" wmode="transparent"><br />';
                  $output.= '<param name="movie" value="'.$playerPath.'/mplayer.swf" />';


                  To:

                  $output = '<object type="application/x-shockwave-flash" id="'.$id.'" data="'.$playerPath.'/player.swf" width="216" height="18" wmode="transparent"><br />';
                  $output.= '<param name="movie" value="'.$playerPath.'/player.swf" />';


                  Then you’ll have volume control.
                    • 26931
                    • 2,314 Posts
                    hey rx2,

                    thanks for answering! ... i totally forgot to report back that i found the player, too smiley

                    thanks, j

                      • 32004
                      • 24 Posts
                      Hi Does its works with the new Flash-Version of the player?

                      http://wpaudioplayer.com/standalone