The task is to write a cross-platform mp3 player (linux, windows, macOS desctops + android, ios mobiles) The player should be able to:

  • download mp3 files from the server and store (on the client), work in offline mode;
  • normalize volume with replayGain;
  • the possibility of audio compression;
  • work with several output channels (select output device).

Now for implementation I consider two solutions: java FX and electron

electron js

PROS:

  • with the framework and web technologies sign;
  • there is a rich web audio api (one is enough to implement all the functions of the player).

MINUSES:

  • does not support mobile development.

Note: with electron js already familiar, using javascript using web audio api will not be difficult to write an mp3 player. The difficulty is that the electron does not support development for mobile devices, it means that for mobile it will be necessary to write a separate player and at the same time, it is desirable to use the existing functions in javascript. So you have to deal with phoneGap / Native Script / React Native. There is no development experience on these frameworks.

Java FX

PROS:

  • possibility of development for mobile devices;
  • a large number of libraries to work with sound;
  • native UI.

MINUSES:

  • I am not familiar with java FX, but I know java.

Note: It is very interesting to try writing in Java FX, but there is no experience writing such applications. There are concerns that java FX (native package) will not be so cross-platform that it will be able to run on all platforms. In java, there is a set of audio APIs (Java Sound API, JAVA FX media API) and it is possible to use third-party libraries such as Minim, jLayer ( http://www.javazoom.net ) - there is a fear that due to a large number of Audio libraries may have difficulty sharing them (since different libraries perform different functions), for example: JAVA FX media API does not support the choice of output devices, but Java Sound API supports, but it does not play mp3 files. In order for him to lose, you need to use add. MP3SPI library, etc.

Considered an option - Qt, but it has no experience + you need a development license.

There are several questions:

  • Does JavaFX really allow you to write an application that will run without problems on both desctop and mobile?
  • Are there any other technologies on which this functionality can be implemented?
  • What do you think of the two technologies chosen?

I find it difficult to decide, on the one hand, the familiar electron js and web technologies, but the lack of support for mobile devices, and on the other, the more native and cross-platform, but not familiar javaFX.

    0