api로 구현한 라디오 방송국 청취입니다.
허접하지만 꼭 필요해서 급조했습니다.
방송국이 https로 송출하지 않는 곳은 청취가 안되네요.
desktop & mobile 다 잘 작동됩니다.
test:
https://atlanta.infinityfreeapp.com/radio.html
API를 동적으로 검색하게 해서 찾지 못하는 에러를 획기적으로 줄였습니다.
부수적으로 세게 TOP 30 & 세계 한인 TOP 30 라디오도 새로 추가하였습니다.
인제 서버에러는 더이상 안나올 듯 합니다.
기존 받으셨던 분들은 다시 radio.html을 새로 받아주세요.
댓글 25개
제 소스를 보시면 radio.html에서
[code]
const apiUrl = `https://de1.api.radio-browser.info/json/stations/search?limit=20&countrycode=KR&hidebroken=true&order=votes&reverse=true`;
[/code]
여길 보시면 search뒤에 country option이 보이는데 그게 나라별입니다.
한국은 kr입니다.
참고는 https://www.radio-browser.info/countries
*참고로 stream은 꼭 https되어 있는 곳만 청취가능하다는 것이구요..
*만약 위 api 링크외에 개별로 url만 알면 streaming site를 연결할수도 있습니다.
[code]
<button class="button-85" role="button" onclick="play()">ATLANTA RADIO KOREA</button>
<audio id="audio" src="https://s2.radio.co/s481a3f747/listen"></audio>
<script>let play = function(){document.getElementById("audio").play()}</script>
<button class="button-85" role="button" onclick="playAudio1()">CALIFORNIA RADIO KOREA</button>
<audio id="audio1" src="https://onair.radiokorea.com/"></audio>
<script>const playAudio1 = function(){document.getElementById("audio1").play()}</script>
<button class="button-85" role="button" onclick="playAudio2()">NEW YORK RADIO KOREA</button>
<audio id="audio2" src="https://streams.radio.co/s839c1142b/listen"></audio>
<script>const playAudio2 = function(){document.getElementById("audio2").play()}</script>
[/code]
test: https://atlanta.infinityfreeapp.com/radio.html
게시글 목록
| 번호 | 제목 |
|---|---|
| 13281 | |
| 13259 | |
| 13250 | |
| 13228 | |
| 13204 | |
| 13193 | |
| 13176 | |
| 13175 | |
| 13170 | |
| 13159 | |
| 13145 | |
| 13144 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기