-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playback from InputStream comes back [enhancement]. #4212
Comments
If this is what you want to do then you can implement an ExoPlayer
Whether this is true depends on what type of encryption you're using. If you use a type that supports random access, like |
Thanks, I will try. Can you give me some example of |
|
This is my custom
and
As you can see the P.S.: P.P.S.: Something strange there - |
Ok, I have found all answers by myself :) I suppose it will useful for others. The solution is:
Initialization of player (somewhere in the PlayerActivity):
Works fine with a real |
Glad you've got something working. Just taking a quick look at your code: If you want this to work with any |
Thanks for clarification. As I understand |
Random access to data is achieved by closing a
|
I have read #1086 and I have some arguments for the direct support of playback from
InputStream
.If you need to play video file from an encrypted container there is no alternative for playback by means of InputStream since you can't copy this video file to disk before playback because it is a privacy breaking.
To implement a playback from
InputStream
forMediaPlayer
, I have been forced to set up anHTTP-server
on the local host of my device and send video file throw it to theHTTP
interface ofMediaPlayer
. It was awful and looks very stupid but Google did not left us a choice.The simplest way to get a
random acceess
to theInputStream
is to skip unwanted bytes, read wanted and recreateInputStream
again for next reading.It would be very useful if you provide an opportunity to play video from
InputStream
for such kind of applications!The text was updated successfully, but these errors were encountered: