play video while downloading on Android
Is it possible to stream video while downloading video on ‘Android’ using secure asp.net application?
I have a https secure asp.net web application. This application is exclusively made for mobile devices (e.g Iphone, BB, Android etc...) called as Mobi web in otherwords, I have an asp.net web site that user will browse on a mobile device. I have some video files loaded on this site. These videos can be played by clicking on corresponding hyperlink of respective video. When I click on these hyperlinks from Iphone or Ipad , these videos get streamed on screen and gets played properly. Till this point all works smooth and fine.
Now when I test the same functionality on ‘Android’ my video file gets downloaded on device but don’t get played of its own. Initially it was concluded that converting these files to indigenous device compatible video file types will help video files to get auto streamed. Hence I used a converter to convert all type of video files to ‘3gp’ for ‘Android’ and tested but found that in this case also, the video files gets downloaded and do not get played on their own. I tried various approaches to download video files like I used Response.Redirect, then I used binary 开发者_StackOverflowreader and then the 3gp handler. Nothing worked.
Does anybody know how to play video while downloading on Android? Thank you very much!
Android can play MP4 video progressively if the 'moov' atom is at the beginning of the video. The moov atom is a part of the file that holds index information for the whole file. After converting the video you can use qt-faststart from ffmpeg(http://www.ffmpeg.org) to move the 'moov atom' at the beginning. You can also try playing 3gp files after 'hinting' them by using MP4Box (http://www.videohelp.com/tools/mp4box). I tried this before for 3gp files for android and that worked for me.
The problem is not with the videos, but with the HTTPS protocol. If any HTTPS url is given to the media player (doesn't matter if it is through some native application or browser app), the android system would download the file completely before you can play it.
This behavior is actually well documented, But here is a link for your info
http://groups.google.com/group/android-developers/browse_thread/thread/7e7003b845c3fb98#
精彩评论