5

I am trying to design a video website compatible with Android. A good example of what I'm trying to achieve is vimeo.com. They show a thumbnail of a video. When you tap it, the native Android player comes up in full screen:

enter image description here

Currently, I have an anchor to an FLV containing an h.264 encoded video:

<a href="video.flv">click here to watch</a>

When you tap the anchor on Android, it downloads the video rather than plays it. That's not what I want. How do I get it to play full screen in the native player like Vimeo? But unlike Vimeo, I would like the video to expand so that there's not so much black empty space around the actual video.

JoJo
  • 19,587
  • 34
  • 106
  • 162
  • This question may be a duplicate. Have you looked at similar questions posted to SO? http://stackoverflow.com/questions/1711078/html5-video-element-on-android – Nathan Fig Jul 14 '11 at 17:53
  • 1
    @Nathan Fig : That thread didn't show how to invoke a full screen Android player. – JoJo Jul 15 '11 at 17:32
  • on youtube, if you click a video it opens in full screen. I also wish to know how it is done. – Zibri Mar 24 '14 at 00:07

3 Answers3

3

Ahh I see what you mean, clicking a Vimeo video opens the Android dialog of selecting which app should respond to that request (in my case just the browser (which downloads the file) or video player (which opens and plays it as you wanted)). This is normal Android behavior- if you have not defined which app should respond to a given request, it will ask you to select from among the supporting applications.

Have you even tried embedding a video in the way suggested through the link I gave you? You may find that it will have the exact effect the Vimeo video does. HTML5 <video> element on Android

EDIT: Actually I think your real problem is probably just that the file format you're using (.flv) is not among the core media formats supported by Android. http://developer.android.com/guide/appendix/media-formats.html

Community
  • 1
  • 1
Nathan Fig
  • 14,970
  • 9
  • 43
  • 57
  • 2
    "I think your real problem is probably just that the file format you're using (.flv) is not among the core media formats supported by Android" This. If you want fullscreen FLV on Android, you'll have to embed the video in a flash player with fullscreen abilities and then hope that the user has flash installed on their device. I do not recommend doing this. – QRohlf Jul 15 '11 at 19:36
  • I don't get a prompt when I tap the button. It automatically opens the native Android player for me. It would actually be bad if the user is prompted and decides to download the video because my videos are live streams. The video would endlessly download. Is there any way to disable download? – JoJo Jul 15 '11 at 20:43
  • The Vimeo prompt is going to vary from device to device- some will have a default already set, others will get a prompt depending on settings and applications installed. That is irrelevant however- QRohlf's comment spells out what you need. I'm sorry, but you almost certainly will need to take a non-flash route to do your video streaming... – Nathan Fig Jul 15 '11 at 22:35
  • But if you check out the list of supported formats I posted, you will see that .m4p and a couple other formats with your codec are supported! – Nathan Fig Jul 15 '11 at 22:39
0

if you have the correct codec installed to play the video and doesn't work, check and make sure you have the correct mime types configured and that something in the registry or a file isn't overwriting.

use the old standard of defining mp4 and falling back to flash.

0

In mobile Safari and Android webkit there are javascript methods and events defined on the Video object that can help with this. There is another StackOverflow question dealing with this topic (for iPad, but I have used this on Android phones as well).

Web App - iPad webkitEnterFullscreen - Programatically going full-screen video

Mobile Safari documentation: http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html

Community
  • 1
  • 1
bbogovich
  • 341
  • 1
  • 7