Skip to content

ndlopez/web_player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Display current song playing on streams

live demo

Since VLC displays stream after opening lapaz.fm or when opening thirdRock. I decided to build a web app to display the current song playing on lapaz.fm or thirdrockradio.net

Two pages work as web player: index and fmlapaz. The latter one is not maintained and might not work due to several changes on main CSS.

Web Player <index.html>

The Strumbellas - Spirits I Don't Wanna Know If You Are Lonely - Husker Du

Display the current playing song out of 13 (currently) differents streams. LaPaz.fm, 181.fm (Awesome80s,90s Alternative, The Buzz), Third Rock Radio, 113.fm ClassicOne, News Radio x3.
As for thirdRock, I can no longer request the stream due to location error?, apparently no longer streaming via streamguys1.com. Although tune.in still returns current playing track. In any way, removed and replaced by KEXP-fm.

FM La Paz - <fmlapaz.html> No longer maintained.

new design

Display and store in a playlist on the same page current song and the previously listened songs.
The URL has some security issues (expired SSL certificate) but JavaScript's fetch does not seem to care and gets data without problems. I cannot say the same with C#'s json lib.

About the expired certificate:
The URL I am using is hosted somewhere on the west (where the Sun sets), where I am the Sun is rising, there's a UTC+9 hour difference. The URL's certificate is renewed every day at midnight, so by the time I am fetching data it already expired. Perhaps if the URL's server would be connected to some CloudFlare service, this issue might not matter.

small issue
Update time is set to 3min40s (assumed average length of a song). Because of this sometimes a song might me missed and not included in the Playlist, in such case the user can update the list by clicking the button.

By clicking on the cloud icon, it is possible to download the playlist in JSON format, obviously from the moment the page was opened.

NHK radio 5min-news every hour

fetch("https://www.nhk.or.jp/s-media/news/podcast/list/v1/all.xml") .then((response) => response.text()) .then((text) => { const parser = new DOMParser(); const doc = parser.parseFromString(text, "text/xml"); console.log(doc.documentElement.nodeName); });

Unrelated?

Resize images using imageMagick (on Debian)

$ mogrify -resize 256x256 rfi_logo.png

$ mogrify -resize 50% rfi_logo.png

$ mogrify -format jpg *.png

more info here

To create some wavy path in CSS3 and SVG