In Liquidsoap:
out_icecast(music, '/flac', 'password', %ogg(%flac(channels=2, compression=0, bits_per_sample=24, samplerate=48000)))
(The flac encoding format comes in two flavors:
%flac is the native flac format, useful for file output but not for streaming purpose
%ogg(%flac,...) is the ogg/flac format, which can be used to broadcast data with icecast)
URL working in Chrome browser, but in demo html:
<html>
<head>
</head>
<script src="/js/icecast-metadata-player-1.16.0.main.min.js"></script>
<script>
const player = new IcecastMetadataPlayer("https://endorphin-radio.online/radiohi/", {
onMetadata: (metadata) => {console.log(metadata)},
metadataTypes: ["icy", "ogg"]
})
</script>
<body>
<button onclick="player.play();"> Play </button>
<button onclick="player.stop();"> Stop </button>
<p> Now Playing: <span id="metadata"></span> </p>
</body>
</html>
I get an error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'then')
at st.Ci (MediaSourcePlayer.js:166:8)
at st.fi (MediaSourcePlayer.js:100:28)
at new st (MediaSourcePlayer.js:25:10)
at et.le (PlayerFactory.js:349:18)
at et.readIcecastResponse (PlayerFactory.js:191:51)
In Liquidsoap: out_icecast(music, '/flac', 'password', %ogg(%flac(channels=2, compression=0, bits_per_sample=24, samplerate=48000))) (The flac encoding format comes in two flavors: %flac is the native flac format, useful for file output but not for streaming purpose %ogg(%flac,...) is the ogg/flac format, which can be used to broadcast data with icecast) URL working in Chrome browser, but in demo html:
I get an error: