Exoplayer live seekbar and timeshift - android

I use Exoplayer 2.8 to show HLS videos in my app.
For fix time contents seekbar works perfectly, but its useless for live content.
I want to show seekbar for past 12 hours and use it for timeshift, how can I do that?

Update: seems like there is already existing solutions:
https://github.com/google/ExoPlayer/issues/87
https://github.com/jglanfield/ExoPlayer/tree/jdg-hls-rewind
You should take a look at TimeLine object and use it depending on you seekbar update logic.
Simple approach would be to store start time on your own in the code and then update it as frequent as you want with increasing playback and buffer.
More helpful answer would be if you would post some code that you already have, so anyone can guide you towards solution that will work for you.

Related

Is there a solution to implement an "low-speed" scrubbing on Exoplayer2?

I'm working on an application who needs some precision when scrubbing on the videoplayer, in order to get an image from the video.
The problem is, the timebar is too imprecise.
I'm looking to implement a solution like the native iOS player, when you scrub and you swipe down your finger to slow down.
-> https://lifehacker.com/how-to-control-the-audio-and-video-scrubbing-speed-on-y-5811660
If you have a solution, it would be really cool.
Thanks in advance !
Exoplayer cannot do this for streaming. A similar discussion has been seen regarding AVPlayer - to allow the described behaviour for streaming, and some have suggested making snapshots which would also not be close to your want of getting the same behaviour as on the example you have provided.
If you are looking for this kind of experience I would recommend heading over to movi.ai to get your hands on our cross platform solution with this ready out of the box.

Playing game sounds

I need to play sound effects in my game such as jump, failed, shot etc.
So for this purpose I have selected SoundPool class. But there were some times when it lagged.
So I wonder what is correct way to use this class. I have tried to use play method in new thread, it seems work better but I don't know if I am correct.
Please advice how to use object of this class correctly for better performance.
Best way to implement Sound / Music into your game is by using Service component. Read this answer here for an example.

drawing Media Player UI for Android

I am realizing my own media player am using ffmpeg for decoding and libjnigraphics(Bitmap,SurfaceView,...) for rendering.
I got it working now i want to get an attractive UI i want to display play/pause/stop/next buttons in the bottom of my screen with circular buttons etc like in the actual video players available in the market and in the following picture
How a similar UI is realized in android ?
I searched a lot over the net but i didn't find anything interesting
I would be thankfull if someone gives me tips about making similar UI
If I understand what you're trying to do you should take a look at this answer here:
Android: How to create video player?
by Commonsware and also to his sample application Vidtry.
Hope this helps. :)

Is this possible to do? Playlists + Youtube Player API

Im wondering if is possible to do this. Anywhere on my view I want to see a list of videos (from my youtube channel or just a playlist created by me), this way the user can click in any of them and using the youtube player API would be visualizated in the bottom of the screen for example.
Is this possible to do and if so, how complicated could be? (im really a beginner in android, not in programming). Ive read about Youtube DATA APi but it seems is used with the youtube app so its not what I want to do.
Thanks a lot.
Editing 21/05/2014
Adding information just in case someone in the future is interested in doing this (after one year, but better later than never). I uploaded an exemplary app that shows how to do this. It can be found in the following GitHub repository: https://github.com/Rafagf/HealthTube
Have you taken a look at the examples in the documentation? That's the best place to get started. I don't think anyone is going to be able to provide you with more complete code than what's available there.

Frame by frame animation with Audio using Services in Android

I need some help in the concept of Services in Android? Actually i want to Play some sounds with animation in Android. I'm done with frame by frame animation successfully but want to play some audio with animation. I got some ideas about Services from google but I'm unable to get their point, so that i am posting it over here. If anyone has any idea about how can i do this please give me some suggestion to do this. It would be very helpful to me.
Have a nice day ahead...
Thank you!!
You'd need to take a look at,
MediaPlayer
I think the documentation given is self-explanatory. Also you need not make use of a separate Service for playing the sounds, unless of course you have a special need.

Categories

Resources