Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mp3 Player Extended - Based on Mp3 Player 1.0 (Beta) by Michele
#26
dominionit Wrote:Good day

the idea is that the plugin will copy the player self to the root folder if you look at the function called

install_player()

also the plugin is suppose to be like all other plugins where you just unzip it in the plugins folder ander start using.

You could also put the player in a sub directory of your plugin together with a .htaccess file with Allow from all and use it from there.

This way it will work even if the access rights are very restrictive and it is easier to completely remove the plugin.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#27
There actually is an error when running this plugin with GS3;
the error i get when in debug mode is on line 45:

Code:
$bgColor = implode("",@file(GSDATAOTHERPATH. '/mp3playerextended.cfg'));

i guess it can't write the config file for some reason; but this doesn't stop the plugin from working.

I made a modification to the plugin which prevents more than 1 player from playing at the same time on a page;

to get this functionality, here are the steps:

1.) add ascending ID to the player code:

in mp3-pluginextended.php, change the function playerAdd (line 62) to this:

Code:
function playerAdd($targetFile,$bgColor){
        global $SITEURL, $ap_playerID;
        $site = $SITEURL;
        // Get next player ID
        $ap_playerID++;
        if (file_exists(GSDATAUPLOADPATH.'audio/'."$targetFile")) {
          $targetFile = $site."data/uploads/audio/$targetFile";
        }
        
        $player      = "<object type='application/x-shockwave-flash' data='".$site."player.swf'";
        $player    .= " width='310' height='24' id='audioplayer".$ap_playerID."'><param name='movie' value='".$site."player.swf' />";
        $player    .= "<param name='FlashVars'value='playerID=".$ap_playerID."&amp;bg=0xf8f8f8&amp;leftbg=0xeeeeee&amp;lefticon=0x666666&amp;rightbg=0xcccccc&amp;";
        $player    .= "rightbghover=0x999999&amp;righticon=0x666666&amp;righticonhover=0xffffff&amp;text=0x666666&amp;slider=0x666666&amp;";
        $player    .="track=0xFFFFFF&amp;border=0x666666&amp;";
        $player    .="loader=0x9FFFB8&amp;soundFile=$targetFile' /><param name='quality' value='high' /><param name='menu' value='true' />";
        $player    .="<param name='bgcolor' value='$bgColor' /><param name='wmode' value='opaque' /></object>";
        return $player;
}

** also note that the above code has the MP3 files in a subdirectory of the uploads folder, called "audio".

2.)

Replace the player.swf with a different one that can be controlled by the javascript function (attached to this post)

3.)
Place this javascript file somewhere on your site and call the script in your header (prevents 2 players from playing at the same time); usually called audio-player.js

Code:
var ap_instances = new Array();

function ap_stopAll(playerID) {
    for(var i = 0;i<ap_instances.length;i++) {
        try {
            if(ap_instances[i] != playerID) document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 1);
            else document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 0);
        } catch( errorObject ) {
            // stop any errors
        }
    }
}

function ap_registerPlayers() {
    var objectID;
    var objectTags = document.getElementsByTagName("object");
    for(var i=0;i<objectTags.length;i++) {
        objectID = objectTags[i].id;
        if(objectID.indexOf("audioplayer") == 0) {
            ap_instances[i] = objectID.substring(11, objectID.length);
        }
    }
}

var ap_clearID = setInterval( ap_registerPlayers, 100 );

it would be cool to make a new version of the plugin where all of these things are included; I would do it but i'm not sure how to have the plugin itself add the script to the header; maybe one of the original authors can take this info and make the next version...mp3 player ultimate...

-marc
Reply
#28
Hi there Marc

thanks for your contribution. I will look into this player also. Maybe look at making it optional between different players if possible. Was looking to use this one maybe ?

http://flash-mp3-player.net/

Have a look and say if you think it will work ?

tx

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#29
mvlcek Wrote:
dominionit Wrote:Good day

the idea is that the plugin will copy the player self to the root folder if you look at the function called

install_player()

also the plugin is suppose to be like all other plugins where you just unzip it in the plugins folder ander start using.

You could also put the player in a sub directory of your plugin together with a .htaccess file with Allow from all and use it from there.

This way it will work even if the access rights are very restrictive and it is easier to completely remove the plugin.

will do this thanks, Plugin was originally based on
Michele de Angelis plugin and this was how he did it, I learned alot with the other plugins I did
and will redo it with a newer structure.

tx

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#30
the flash mp3 player is indeed good; but i really like how the onepixelout player can sense when other players are started and then close the one currently playing; allows you to place the players on different parts of the page and not have to worry about someone playing them all at once..

here are some non-flash options which could be cool to include..
http://neutroncreations.com/blog/buildin...th-jquery/

or this:
http://www.jplayer.org/

dewplayer is also nice.

-marc
Reply
#31
alienee2 Wrote:the flash mp3 player is indeed good; but i really like how the onepixelout player can sense when other players are started and then close the one currently playing; allows you to place the players on different parts of the page and not have to worry about someone playing them all at once..

here are some non-flash options which could be cool to include..
http://neutroncreations.com/blog/buildin...th-jquery/

or this:
http://www.jplayer.org/

dewplayer is also nice.

-marc

WOW. Absolutely love IT !! I Love jQuery and this is just really so much better than anything. I think I will look more into this, what I can do with it (want to add list of mp3 files to 1 player) but. this is good route to follow. Will make the flash player a alternative and this primary !

Tx
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#32
alienee2 Wrote:the flash mp3 player is indeed good; but i really like how the onepixelout player can sense when other players are started and then close the one currently playing; allows you to place the players on different parts of the page and not have to worry about someone playing them all at once..

here are some non-flash options which could be cool to include..
http://neutroncreations.com/blog/buildin...th-jquery/

or this:
http://www.jplayer.org/

dewplayer is also nice.

-marc

Founds some interesting ones also

This one actually looks simple and picks up if other players gets a play click and has
external JavaScript functionality also. Actually like this one

http://devreactor.com/projects/drplayer.aspx


Looks nice, flash as fallback if html5 fails
http://www.codebasehero.com/files/music-player/demo/

Same as one above but just fancy, might be bigger as might need th mb library
http://pupunzi.com/#mb.components/mb.min...layer.html

say what you think ?

tx

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#33
Also something to look at. Actually interesting

http://www.openbeelden.nl/oiplayer/
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#34
hi there.

I think we need to decide what the main things are we want from a mp3 player ?

I personally feel it must not make the html bulky or have to weird stuff to do to get it to work.
Also adding it to current message body must not bugger the body up and some can as some is not that friendly.
I also think a inline small player works will work nice. But what do you think ? Is play lists a requirement ? Or a phase 2. Is simple inline play,pause, volume main requirement ? mulitplayers on same page I see as obviously needs to be supported and detection between each other on play clicking. but if you can give your views it can help to get the correct player to chose.

tx

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#35
Hi there. Okay added all your changes and others people suggested as a first phase to get the plugin more in order and working correctly for GS3. Have changed name also to ultimate. Note this version is more meant to clean code more correctly and have your changes in. Also another note. this version has something I changed on the tags. if file inside a subdir of uploads then add the subdir name first / filename for example if mp3 files in a dir caleld mp3 then make the tag name

(% mp3:mp3/xecutionerstyle.mp3 %).

then it will pick it up in that dir,thus no hardcoded dirs or seeking for files (more processing) just add dir name infront with slash.

Hope this can help a little.

PS : Remove the previous mp3 plugin totally for this one not to clash.
mp3-plugin -> directory
mp3-pluginextended.php -> file
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#36
hi there all. create a new plugin for GS3 and up.

http://get-simple.info/forum/topic/2226/...-ultimate/

This will be more actively developed and I hope will be flexible for any player required in the future.

thanks

Johannes
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply




Users browsing this thread: 1 Guest(s)