GithubHelp home page GithubHelp logo

calne-ca / subsonic-java-client Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 181 KB

A Java Client for the Subsonic API

License: GNU General Public License v3.0

Java 100.00%
subsonic airsonic music java libresonic api-client subsonic-client subsonic-library java-client java11

subsonic-java-client's People

Contributors

calne-ca avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

subsonic-java-client's Issues

New URLOfStream method (Problems with stream() method)

Problem: Unable to play InputStream of file with API method, problems with UI binding
Solution: (Temp) Write stream to file then play it

Description:
I'm trying to make Linux Client based on this API with JavaFX (it's not published yet)
I have problems with InputStream returned by method:

net.beardbot.subsonic.client.api.media.MediaService.stream(String id)

When I pass it to the https://github.com/goxr3plus/java-stream-player there are problems with properly transcoded (mp3 or wav) stream doesn't support mark/reset (Fixed by creating BufferedInputStream), music plays, however I'm unable to create bindings with slider etc. because It seems that It doesn't offer such features.

I decided to try with something more core like javax.sound.sampled.Clip I got exception: java.lang.IllegalArgumentException: Audio data < 0 when I try to pass there mentioned InputStream

Finally I managed to play file by wring stream to file (javafx.Media doesn't support Streams). But it's not the point to bypass it. Streaming is much more efficient (e.g. memory: especially when we want lossless files) and better for file security.

Java has some core constraints when it comes to media, like javafx.Media (Which only worked for me) doesn't support InpuStream or Codecs representing libraries are badly documented/has their own limits.

Well, actually we do streaming using http(s) and I checked mentioned stream() method. It creates URL (Line 53).

Do you think that creating net.beardbot.subsonic.client.api.media.MediaService.URLOfStream(String id) is good idea? With it we can pass the URL to the chosen Media Library and let it create proper stream with all functionalities like seeking and UI binding methods.

I'm not really experienced so if you find another solution that's probably my lack of knowledge, then please give me a hint. I've spent hours trying to figure out what's going on, reading tons of docs.

Thanks in advance :)

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.