Skip to content

A basic radio player application that utilizes JavaFX, FFmpeg, radiobrowser4j and h2 database to fetch, store and play online radio streams.

Notifications You must be signed in to change notification settings

QuackInTheMatrix/RadioPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RadioPlayer


About

A basic radio player application that utilizes JavaFX, FFmpeg, radiobrowser4j and a h2 database to fetch, store and play online radio streams.

Features

  • Searching for radio stations by different criteria such as name, country, codec, bitrate and tags
  • User roles with different functionalities(ex. Admin management of users/stations)
  • Displaying current song name in the title
  • Admin user management(search, add, change, delete)
  • Admin station management(search, add, change, delete)
  • Admin logs overview with all changes made identified by user, action and data changed
  • User personal favourite stations(add/remove)
  • User management of account information(ex. change username, email, etc.)
  • Controllable playback and audio from every page using playback and audio menus
  • Threaded fetching of current song and synchronized access to the title variable

Setup

Note: The docker database container uses linux so make sure you are running it on WSL if you are on Windows.

The recommended way to use RadioPlayer is with a prebuilt jar and a dockerized database.
This process is described in the Automatic section.
If however you wish to tinker with the application yourself or set up the database manually this can also be done. The process of getting everything ready is described in the Build it yourself section below.

Automatic

The process of setting up the application is very simple and can be done in only 3 steps.

  1. Make sure you have java and docker installed.
  2. Run the container which contains the preconfigured database:
    docker run -p 8082:8082 -p 9092:9092 -v h2_data:/home/h2db/ -d --name h2_database duckerize/radioplayer_h2db:latest
  3. Download the latest release from the repository and run it by double-clicking on the jar file.

And that's it, you now have a functional RadioPlayer where you can save, listen to and manage your favourite radio stations.
You can either register or use one of the preconfigured accounts:'user', 'admin' both with password: 'password'.
Enjoy!

Build it yourself

The application requires setting up a h2 database before you can start tinkering with it in your favourite IDE.
Below is a list of steps needed to get everything running:

  1. Make sure you have git, docker(optional but recommended), java and an IDE like IntelliJ installed
  2. Clone the repository with git:
    git clone https://github.com/QuackInTheMatrix/RadioPlayer
  3. Set up the h2 database(it is already included in the project)

    Recommended(with docker)

    docker run -p 8082:8082 -p 9092:9092 -v h2_data:/home/h2db/ -d --name h2_database duckerize/radioplayer_h2db:latest
    Note: The docker database image can be manually built from the dockerize_db directory if needed.

    Alternative 1(with docker compose)

    1. Open a CLI like cmd/bash and navigate to the RadioPlayer/dockerize_db directory:
      cd RadioPlayer/dockerize_db
    2. Create the container using docker compose:
      docker compose up -d

    Alternative 2(without docker)

    1. Open a CLI like cmd/bash and navigate to the RadioPlayer/dockerize_db directory:
      cd RadioPlayer/dockerize_db
    2. Start the database(make sure to replace the '*' in the example with the actual version):
      java -jar h2-*.jar
    3. Go to dat/database.properties and change the path to the radiobrowser database:
      For example if you are on linux, and cloned the repository to the Downloads directory the new path would look something like this:
      jdbc:h2:tcp://localhost/~/Downloads/git/RadioPlayer/dockerize_db/radioplayer
  4. The last step is to load the project in your favourite IDE and build it.
    Note: To build a jar artifact that can be run on multiple platforms uncomment the dependencies for other platforms.

And that's it, you can now start tinkering with the project or just enjoy some music. Have fun with it!

Contributing

Contributions are always welcome and I could always use more hands on this project to: add new features, optimize code, fix bugs etc.
When contributing make sure to describe what you changed/fixed/optimized and title it accordingly.

About

A basic radio player application that utilizes JavaFX, FFmpeg, radiobrowser4j and h2 database to fetch, store and play online radio streams.

Resources

Stars

Watchers

Forks

Packages

No packages published