Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since there are very few answers on this subject, I thought I would answer my own question.</p> <p>I went ahead and downloaded Sound Manager 2 and placed the necessary files where they needed to be (you can find this in the basic tutorials section of the sound manager2 page.)</p> <p><a href="http://www.schillmania.com/projects/soundmanager2/demo/template/" rel="nofollow">http://www.schillmania.com/projects/soundmanager2/demo/template/</a></p> <p>The trick wass to locate the SoundCloud mp3 associated with the user I wanted to embed. To do this, I had to use a RESTClient and enter the appropriate api url. It looks like this.</p> <p><a href="http://api.soundcloud.com/tracks/12758186.json?client_id=" rel="nofollow">http://api.soundcloud.com/tracks/12758186.json?client_id=</a>{MyClient_ID_number}</p> <p>The <a href="http://api.soundcloud.com/tracks/" rel="nofollow">http://api.soundcloud.com/tracks/</a> is a general pointer to the track id="12758186". This is followed by the JSONP inclusion of my personal client_id to validate my request to the soundcloud server.</p> <p>Once I had this url, I tried it in my browser and it redirected me to ** another url ** with an HTML5 mp3 player, which automatically played the song.</p> <p>I got the idea to do this from this soundcloud doc: <a href="http://developers.soundcloud.com/docs#playing" rel="nofollow">http://developers.soundcloud.com/docs#playing</a></p> <p>I then copied this url and mashed the code from my original question to the basic tutorial mentioned above (<a href="http://www.schillmania.com/projects/soundmanager2/demo/template/" rel="nofollow">http://www.schillmania.com/projects/soundmanager2/demo/template/</a>).</p> <p>Final Code:</p> <pre><code> var is_playing = false; $("#stream").live("click", function(){ soundManager.setup({ url: './swf/soundmanager2.swf', onready: function() { var mySound = soundManager.createSound({ id: 'aSound', url: {**another url**}, autoplay: false }); if (is_playing===false) { mySound.play(); is_playing = true; } else if (is_playing=== true) { mySound.stop(); is_playing = false; } }, ontimeout: function() { // Hrmm, SM2 could not start. Missing SWF? Flash blocked? Show an error, etc.? } }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload