Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #0.0
rootical CreditAttribution: rootical commentedComment #0.1
rootical CreditAttribution: rootical commenteddouble sense
Comment #0.2
rootical CreditAttribution: rootical commentedsorry, messages by accident (
Comment #1
Vemma-1 CreditAttribution: Vemma-1 commentedDid you ever figure out how to play your radio stream file? I'm wanting to play M3U or PLS files.
Comment #2
rootical CreditAttribution: rootical commentedUnfortunately, not.
Comment #3
gnaag CreditAttribution: gnaag commentedI am also curious about the way how to achieve this.
Comment #4
rootical CreditAttribution: rootical commentedAny news, please?