3

I was asked to add Stratus 2 Beta to our website so we can stream music. I went to the stratus website and they make it seem really simple to add the code they have to the website HTML but I can't get it to work.

This is what I have for it (including the jQuery file):

<script type="text/javascript" src="jquery.js"></script>    
<script type="text/javascript" src="http://stratus.sc/stratus.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
     $.stratus({
       links: 'http://soundcloud.com/wearelisten/listen_2'
     });
   });
</script>

I have this between the </head> and <body> script.

Sir Crispalot
  • 4,792
  • 1
  • 39
  • 64

5 Answers5

6

I recently had the same problem and it was solved using an older jQuery library - stratus uses $.browser which was removed in jQuery 1.9. I used version 1.7.2:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

and my player finally worked! You can see the test page demo here: www.tworoxdesign.com/EliotCurtis

Hope this helps anyone having this problem!

Matt

MDizzleDogg
  • 61
  • 1
  • 3
1

make sure you have jQuery installed

The <script type="text/javascript" src="jquery.js"> points to the jquery.js file that is the main library for jQuery. That's what's giving you issues.

Download Jquery production from their site, unzip it and upload to your website (I put mine in a jquery folder) and change the src="jquery.js" to src="jquery/jquery.js" (assuming jquery is your folder)

OR

reference the Google hosted one, change the tag to method 1 as is described in "Using Google to host your jQuery (or other) JavaScript libraries":

gpoo
  • 8,408
  • 3
  • 38
  • 53
Josh
  • 11
  • 2
  • thanks for that! Still can't seem to make it work... I tried directing to google as well as uploading the jquery folder to my server (calling it jquery and referencing the jquery.min.js file). it might be something with the actual website then- I'll keep at it – user1754569 Oct 17 '12 at 22:00
0

what browser are you using? if it is internet explorer its not working. check -> stratus.sc and IE

Community
  • 1
  • 1
unknown_b
  • 172
  • 2
  • 7
0

Always put scripts at the bottom of the page just before the closing body tag.

Looks like you are missing a jQuery string selector. Update your code to the sample below.

<script type="text/javascript" src="jquery.js"></script>    
<script type="text/javascript" src="http://stratus.sc/stratus.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $('body').stratus({
            links: 'http://soundcloud.com/wearelisten/listen_2'
        });
    });
</script>
Lenin
  • 1
0

Took a little jazzing it seems there were two issues to getting this to work with the examples on the project's site.

As MDizzleDogg said... .browser is deprecated. What you can do is either A) Use an old version of jQuery. or B) Use the migrate plugin found here.

The next problem is in the customize example. It says:

<script type="text/javascript">
$(document).ready(function(){
 $stratus({
  auto_play: true,
  download: false,
  links: 'http://soundcloud.com/qotsa',
  random: true
 });
});
</script> 

The issue is that javascript thinks $stratus is a variable and it is never defined. To fix it, simply change $stratus to $.stratus

I hope that makes sense.

Cpage
  • 76
  • 8