The requirement is to list a Videos thumbnails and on clicking it should play related video into Application. i am able to play url where video is located using Video View. But now i want to implement this thing in a better ways like Watsapp and instagram. If anybody have a good experience in this reference please share with me. I want to play around caching video and playing videos from cache without buffering (Video view is showing buffering bar and very slow in performance user have to wait a lot for starting a Video). Any kind of help will be appreciated. thanks.
I did it own my own. It's very simple to implement What i do is to download the video with async task along with a progressing seek bar. Once it's downloaded i'll save it in a Folder in my sdcard. We should create a Folder named as Application name so easy to identify and also always available videos with out opening application as well and next time however when i want to watch video again in my application it just check weather it is available in sdcard if yes then play immediately if not then download it. I am happy.
Related
I am developing an application which contains a video on the home screen. The video will be different for different region. Because the size of a single video is 10 Mb and I have almost 10 videos for different country. So I don't want to store those locally. So my questions are :
Should google play developer console provide the way where I can store those video separately from My apk file and at time of download, corresponding region video downloaded from there and I can link that video to my application.
What will be the better way to achieve that functionality? I want to reduce loading time which require to download the video from web server.
Thanks in advance.
I am developing an application where downloaded video can not be accessed by user outside the app. I want to know how to make it possible that user can not accessed video outside the app and only play it in the app. thanks.
Yes it's possible to do so infact popular apps like youtube do it when you download a video for offline loading. you have to encrypt the video and delete the original. After doing that decode it back when you want to play
I want to prefetch/predownload some data of video which is stored on my server.
Right now I streaming the video from the server, It requires some time to buffer then it will start playing video. So I want to prefetch some data of video so that when user clicks on it video get play without taking too much time.
How to achieve this can I store it in database some data or download file while set list of videos in listview.
Please help with this problem.I didn't understand what to do?
I have used Exoplayer which as this feature and many more. Demo repositorie also available.
I have video uploaded on server. which is trailer of movie. I can play this video direct to my videoView with the help of live url. My question: is there any method in android which help me out to get a video frame from url without download the video to local storage. I know one method name "createvideothumbnail" but it will not work in my case. because i need to get the video thumbnail without download the whole video. as you have seen the mechanism is implemented in imdb official app (Trailer section).
Please help, thanks in advance
Getting thumbnails without download the complete video is not possible until now (API Level 22) i´m pretty sure that the application that you describe load thumbnails that were created previously.
the current option would be using the class:
import android.provider.MediaStore.Video.Thumbnails;
or create the thumbnails in a separated process.
I have problem with my app, it's very slow because of using Video and images. When I play video or show images it takes time to download, the app would close during this time or it will take for ever. How can I avoid this problem? Once we have seen the image or video it should not download from server again, please give me the solution for this(Like Facebook).
First you should download the video or image in an asynctask inner class, this is why the app freezes while downloading.
You are downloading on the UI thread and this freezes your app, AsyncTask is the way to go.
Second when download is complete you could save the video, image to sdcard so you won't have to download them again next time. When you want to view the video the second time you will only have to know the file name so you could grab it from sd card. You could make a method that determines if a video on sd card is considered outdated and delete that file if true.
Also as other comments say, AQuery ( Android Query) is a library (facilitates chaining like jQuery does for javascript) that offers a lot of convenience methods for file downloading and other cool stuff. A short Google query for AQuery term should reveal tutorials and download sources.
You can use AndroidVideoCache for caching video while streaming. It allow to use cached video after single viewing.