Code Monkey home page Code Monkey logo

radio-player's Introduction

Azuracast PWA Player

Full documentation is coming soon.

Install AzuraCast Player

You can play locally with the player. Todo so you can clone the project then install all the dependencies .

git clone https://github.com/oussamatn/radio-player.git
cd radio-player
npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Player customization

Stations

To add you stations logo, you need to drop your images inside the folder public/images/stations and change the file name the corresponded station shortcode

Example

We are going to add this station logo. First, we check station shortcode using the API

// https://backend.com/api/stations

[
  {
    "id": 1,
    "name": "Radio test 1",
    "shortcode": "radio_test_1",
    "description": "",
    "frontend": "icecast",
    "backend": "liquidsoap",
    "listen_url": "https://backend.com/radio/8000/radio.mp3",
    "url": ""
  }
]

This station shortcode is : radio_test_1.

radio-player/
|-public
| `-img
|    |   `-stations
|    |   |- radio_test_1.png
|    |   |- ...

Deployment

You can deploy the player in the same server as AzuraCast Core and serve the player trough Nginx-Reverse proxy.

First you need to create a new domain or sub-domain name and configure it as you did with Azuracast domain. ( same ip address)

Docker Compose

Go to your Azuracast installation folder then clone the project

git clone https://github.com/oussamatn/radio-player.git

config.json

Update you API URL and radio name inside the configuration file : config.json ( file inside public/assets)

{
  "api_url" : "https://azuracast-backend-link.com/api",
  "title": "Azuracast | Radio Station",
  "description" : "Live Radio 24/7 Hits music Only ",
  "manifest" : {
    "short_name": "Joujma FM",
    "orientation": "portrait",
    "display": "standalone",
    ...

.env

# Additional Environment Variables
PLAYER_HOSTNAME=player.yourdomain.com

docker-compose.override.yml

version: '2.2'
services:
    radio-player:
        restart: always
        container_name: radio-player
        build:
          context: ./radio-player
        env_file : azuracast.env
        hostname: ${PLAYER_HOSTNAME}
        volumes:
            - letsencrypt:/etc/nginx/certs:ro
            - /var/run/docker.sock:/var/run/docker.sock
        ports:
            - "8080:8080"
        environment:
            VIRTUAL_HOST : ${PLAYER_HOSTNAME:-player.local}
            VIRTUAL_PORT : 8080
            NODE_ENV : production
            LETSENCRYPT_HOST : ${PLAYER_HOSTNAME}
            LETSENCRYPT_EMAIL : ${LETSENCRYPT_EMAIL}
            
        networks :
            - frontend

On your server side go to AzuraCast directory then run :

user@host:~$ docker-compose build radio-player

user@host:~$ docker-compose up -d

Private server

If you are planning to deploy the app on a private hosting provider, you have to add a .htaccess file in the same directory as the index.html file. .htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

Support AzuraPlayer developpement

This player will always be available free of charge, but if you find it useful and would like to support the project developer, you make donation. Your support is greatly appreciated.

Buy Me a Coffee at ko-fi.com

radio-player's People

Contributors

oussamatn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

radio-player's Issues

Hi Bro.

I have a Radio in Azura Cast and I trying to build a app with this API, you finished this project?

Bad Gateway

after docker installation on my azuracast, my azuracast is giving me bad gateway

Blank page

Hi, just got blank page when run :

npm run serve

Got nothink to display.

Thanks.

Production

How does one start the production node?

Do i have to run it with container for sll?

cPanel installation GUIDE

Hi, I found amazing your code. However, your installation guide was not clear at all. I would like to suggest instructions for installing into subdomains with the Azuracast's API. Thanks!!!!

radio-player failed to deploy

Hello,
I tried to run player script, but something got wrong) Could you please help to solve these issues?
root@dc2:/var/azuracast/radio-player# npm run serve

[email protected] serve /var/azuracast/radio-player
vue-cli-service serve

INFO Starting development server...

ERROR Failed to compile with 1 error 6:27:24 PM

error in ./src/store/nowplaying.js

image

Addition charsets are not aviable

Testing the web app after cloning and adding my own station API link. As relust i have the next error:

For your own testing you can use my API link: https://air.waveradio.ru/api

Russian and japanese names on the track names are not showing, if the track name is on russian, then script writes the N/A. Igf traclk has many non-latin symbools and ONLY 1 x letter, then opnl;y x letter is shown on the track name.
изображение

No display Cyrillic and Symbols "(", ")", "!", ... in right menu.

I have trouble with display artist and title in right item menu. If artist or title have Russian Symbols or etc Symbols like as ( ) ! ? & — that's symbols no showed in right menu. Check screenshot.

image
Main menu

image
Player

image
Right Menu

I'm trying change Font on Cyrillic - that not fixed this trouble.

How I can fix that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.