PlayStream not working in a rule

  • Platform information:
    • Hardware: RPI4
    • OS: raspbian
    • Java Runtime Environment: Corretto-11.0.10.9.1
    • openHAB version: 3.0.1-2

I’m trying to play an mp3 that starts trough a rule. This rule gets created with the UI using the “Rule DSL” feature.
The rule basically looks like this:
playStream("enhancedjavasound", "http://icecast.vrtcdn.be/stubru-high.mp3")

This does not work. I hear a short pop coming out of the speakers, it feels like the stream starts, but gets aborted once the rule is done executing.
Playing a sound via playSound() works fine.
Also playing that same stream with the openhab-cli works perfectly fine.

Any idea on what I’m doing wrong?

Seems there’s something odd with the “Rule DSL” when you use the UI designed. I added it as a classic rule in a .rule file, and then it works fine:

rule "audio_bureau_stubru"
  when
    Item audio_bureau_stubru received command ON
  then
    playStream("http://icecast.vrtcdn.be/stubru-high.mp3")
end

Also, I could not find any way to use Audio when using the JavaScript syntax, is that missing there?

What is the default audiosink set to in case of the last post, if it is not enhancedjavasound you have your solution.

True. enhancedjavasound is the default. Tried both solutions with and without, did not make a different.
Only difference I had was when the rule was created from the UI vs a rules file.