Giter Site home page Giter Site logo

Comments (4)

vonclutch avatar vonclutch commented on August 11, 2024

hey,
You need to use a streaming mediaplayer lib like VLC or exoplayer. Not all mediplayer has a correct implementation for streaming. Take a look to exomedia, it's a wrapper for exoplayer, the new mediaplayer from Google. It's rly light unlike VLC (30/40mb) and works pretty well.

And by the way, you should implement a service for the download part to avoid conflict.

from torrentstream-android.

4gus71n avatar 4gus71n commented on August 11, 2024

Thanks! Using the ExoMedia library solved the issue, here's the snippet that I used:

compile 'com.devbrackets.android:exomedia:3.1.0'

final EMAudioPlayer mediaPlayer = new EMAudioPlayer (getApplicationContext());
            mediaPlayer.setOnPreparedListener(new OnPreparedListener() {
                @Override
                public void onPrepared() {
                    mediaPlayer.start();
                }
            });
            mediaPlayer.setDataSource(getApplicationContext(), Uri.parse(mCurrentTrack));
            mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
            mediaPlayer.prepareAsync();

from torrentstream-android.

se-bastiaan avatar se-bastiaan commented on August 11, 2024

I actually never tried playing music using this library, but I understand that it does work? Maybe I should change the library a bit to make it more convenient for both video and audio usage 🤔

ExoMedia is indeed a perfect way of using ExoPlayer and a great alternative to VLC, since they still do not have an easy way of using it as a library. Another alternative that you could that a look at is ijkplayer.

from torrentstream-android.

vonclutch avatar vonclutch commented on August 11, 2024

I don't think it's rly usefull to make change for the music, it's not rly the purpose of this lib to take care of what you're doing with your media you download. The mediplayer should take care of that, it's not the job of a lib-torrent :)

from torrentstream-android.

Related Issues (20)

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.