2020-06-02 00:33:42 +01:00
|
|
|
class station{
|
2023-10-02 10:49:28 +01:00
|
|
|
constructor(url, radio){
|
2020-06-02 00:33:42 +01:00
|
|
|
this.url= url;
|
2023-10-02 10:49:28 +01:00
|
|
|
this.radio= radio;
|
|
|
|
}
|
|
|
|
play(){
|
|
|
|
var title = document.getElementById('radio-title')
|
|
|
|
var stream = document.getElementById('stream');
|
|
|
|
title.innerText = "Escoltant " + this.radio;
|
|
|
|
stream.src = this.url;
|
|
|
|
stream.play();
|
|
|
|
const playPauseButtonIcon = playPauseButton.querySelector('i.fas')
|
|
|
|
playPauseButtonIcon.classList.remove('fa-play')
|
|
|
|
playPauseButtonIcon.classList.add('fa-pause')
|
2020-06-02 00:33:42 +01:00
|
|
|
}
|
|
|
|
show(){
|
2023-10-02 10:49:28 +01:00
|
|
|
var stream = document.getElementById('stream');
|
|
|
|
stream.pause();
|
|
|
|
const playPauseButtonIcon = playPauseButton.querySelector('i.fas')
|
|
|
|
playPauseButtonIcon.classList.remove('fa-pause')
|
|
|
|
playPauseButtonIcon.classList.add('fa-play')
|
2020-06-02 00:33:42 +01:00
|
|
|
var win=window.open(this.url, '_blank');
|
|
|
|
win.focus();
|
2023-10-02 10:49:28 +01:00
|
|
|
|
2020-06-02 00:33:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-02 10:49:28 +01:00
|
|
|
var catRadio = new station('http://shoutcast.ccma.cat/ccma/catalunyaradioHD.mp3', 'Catalunya Ràdio');
|
|
|
|
var catInfo = new station('http://shoutcast.ccma.cat/ccma/catalunyainformacioHD.mp3', 'Catalunya Informació');
|
|
|
|
var iCat = new station('http://shoutcast.ccma.cat/ccma/icatHD.mp3', 'iCat');
|
|
|
|
var catMusic = new station('http://shoutcast.ccma.cat/ccma/catalunyamusicaHD.mp3', 'Catalunya Música');
|
|
|
|
var vallekas = new station('https://radio.radiobot.org/listen/rvk/rvk.mp3', 'Radio Vallekas');
|
2024-02-28 16:52:23 +00:00
|
|
|
var punk = new station('https://punkirratia.net:8443/punk', 'Punk Irratia');
|
2023-10-02 10:49:28 +01:00
|
|
|
var irola = new station('http://s.streampunk.cc/_stream/irola_irratia.mp3', 'Irola Radio');
|
|
|
|
var almaina = new station('http://zeppelin.streampunk.cc/_stream/almaina.ogg', 'Radio Almaina');
|
|
|
|
var rac1 = new station('https://streaming.rac1.cat/', 'Rac 1');
|
|
|
|
var rac105 = new station('https://streaming.rac105.cat/', 'Rac 105');
|
|
|
|
var franceInfo = new station('https://icecast.radiofrance.fr/franceinfo-midfi.mp3', 'France Info');
|
|
|
|
var rne = new station('rne.html', 'RNE');
|
|
|
|
var serCat = new station('sercat.html', 'SER Catalunya');
|