I use soundmanager to play all kind of music with Media module, but for now i want to play a radio stream.

So how could i use the player if soundmanager module is enabled in a block or anywhere else?

When i call soundManager.setup() it's undefined.

To play a stream as i saw in manual - i would just have to put something like:

soundManager.createSound({
      id: 'aStream',
      url: 'http://radio.com:8000/8148/;'
  });

So i've even tried to do it kind like this and still no result.

function loadSM2() {
  loadJS('/sites/all/libraries/soundmanager2/script/soundmanager2-jsmin.js', function() {
    // path is just as an example - i've tried the working one
    // once soundmanager2.js has loaded, call soundManager.setup().
  soundManager.setup({
    url: '/sites/all/libraries/soundmanager2/swf',
    // optional: use 100% HTML5 mode where available
    preferFlash: false,
    onready: function() {
      var mySound = soundManager.createSound({
        id: 'aSound',
        url: 'http://listen2.myradio24.com:9000/8148/;'
      });
      mySound.play();

      console.log('play');
    },
    ontimeout: function() {
      console.log('smth wrong');
    }
  });
  });
}

</script> 

So how could embed soundmanager2 player with a stream to a block or to a page? Any help is appreciated. Thanks in advance!

Comments

rootical’s picture

Issue summary: View changes

rootical’s picture

Issue summary: View changes

double sense

rootical’s picture

Issue summary: View changes

sorry, messages by accident (

Vemma-1’s picture

Did you ever figure out how to play your radio stream file? I'm wanting to play M3U or PLS files.

rootical’s picture

Unfortunately, not.

gnaag’s picture

Issue summary: View changes

I am also curious about the way how to achieve this.

rootical’s picture

Any news, please?