Note that there are some explanatory texts on larger screens.

plurals
  1. POVery Basic JS Coding, and SoundManager2 or not?
    primarykey
    data
    text
    <p>I would like to include an audio/possible video player on my website with the following attributes:</p> <ul> <li>Must be placeable via a <code>&lt;div&gt;</code>;</li> <li>Styled via CSS;</li> <li>Can read all ID3 info;</li> <li>Can pull the file from a database (probably GoDaddy's Easy Database);</li> <li>No flash;</li> <li>Transferrable to smartphones etc.</li> </ul> <p>I have been herded to SoundManager2 which appears to fit the bill, but I seem to be having real trouble just making a clickable image to begin playing my mp3. I have zero JS skills so am going from silly basic and building up slowly. I suppose I have two questions:</p> <ol> <li>Is there another media player that is better suited?</li> <li><p>I can't create a Fiddle with what I have so far, but this is the very simple HTML - what is going wrong?:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="script/soundmanager2.js"&gt;&lt;/script&gt; &lt;script&gt; // Path to Flash Files soundManager.url = 'swf/'; soundManager.onload(function(){ // SM2 is ready to Play Audio // Create "mySound" soundManager.createSound({ id:"mySound", url:"audiofiles/my.mp3", onfinish:function(){window.location.href='index.html}}); }; // Play File //soundManager.play('mySound','my.mp3');}); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;img src="image.jpg" alt="Previous" border="0" width="400" height="400" onclick="soundManager.play('mySound',{volume:100})";&gt; &lt;/body&gt; &lt;/html&gt; </code></pre></li> </ol> <p>I had copied this code from <a href="http://en.wikiaudio.org/SoundManager2%3aHow_to_play_and_trigger_sound" rel="nofollow">another website</a>, but I have a sneaking suspicion that the code was incomplete, so any help would be...err...helpful.</p>
    singulars
    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.
 

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