posted 13 years ago
hi,
following problem:
i have an audio player which retrieves a stream from a website and plays it, which works pretty good.
i want the user to be able to play forward. But i dont want the user to be able to play too far forward, so i have to detect how many bytes has been transfered. And thats where i get stuck, because i have a "wrapped" player class which plays the song from an EofSensorInputStream (thats an InputStream from apache which i cannot change to another InputStream) and i have the SliderUI which also uses the stream (passed as constructor argument) which should now detect how many bytes has been transfered.
I can read the the stream only once, so either in my SliderUI, but then the data is lost for the player. Or i play the song, but then the data is lost for the SliderUI.
Does anyone have an idea how to do this?