Sony Arouje

a programmer's log

Enable Stratus player in Tumblr

with 4 comments

I wanted to install stratus player for my site lumigraphs.com. I tried all the options mentioned in the stratus site but the stratus player is not showing in my tumblr site. I even tried with different versions of jquery and moving the script to Header section from Body, but nothing really worked.

Here is what I did to get it working, it’s very simple.

In stratus site the script to add to the body was like below.

<script type="text/javascript">

$(document).ready(function(){

$stratus({

auto_play: true,

download: false,

links: 'http://soundcloud.com/qotsa',

random: true

});

});

</script>

 

To get it working we need change it as follows and put it inside the body. Below I am giving the whole script including the jquery reference I used.

 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
<script type="text/javascript" src="http://stratus.sc/stratus.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('body').stratus({
      auto_play: true,
      download: false,
      align: 'bottom',
      links: 'https://soundcloud.com/sony-arouje/sets/fortumblr',
      random: true
    });
});
</script>
 

The only change I did was appended $(‘body’) just before calling stratus (marked in bold above).

Edit

When I put the stratus plugin in the body, tumblr is not loading all my photos, only few is showing. So I moved the above script to head, the only change is, instead of $(‘body’).stratus(… to $(‘head’).stratus…

Advertisements

Written by Sony Arouje

March 7, 2014 at 6:57 pm

4 Responses

Subscribe to comments with RSS.

  1. Hi,

    I would like to thank you for this fix, it helped me a lot ! But i still facing some issues with stratus player, i wanted to links my soundcloud likes as a playlist and it seems like stratus does’nt recognize it :

    $(document).ready(function(){
    $(‘body’).stratus({
    auto_play: false,
    download: false,
    align: ‘bottom’,
    links: ‘https://soundcloud.com/wearethechillpeople/likes’,
    random: true
    });
    });

    Maybe you have an idea to deal with it ?

    Thanks,

    John.

    john

    April 11, 2014 at 7:47 pm

  2. Thank u very much. now it works….. *thumbs up*

    TraXim

    October 24, 2014 at 2:38 pm

  3. Thank u very much now it works!!!

    TraXim

    October 24, 2014 at 2:38 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: