I embed a mp4 video i开发者_运维知识库nto a webpage, using the embed src script. I can view it when I browse from iphone, but not android.
I did some research and found out that I need to use html 5, which uses the tag.
However, how do I find out what version of the video I have? I tried
<video width="560" height="340" controls>
<source src="<?php echo $video; ?>" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>
But it's not working either. Any ideas? Thank you in advance
<video id="video" autobuffer height="240" width="360" controls onclick="this.play();">
<source src="<?php echo $video; ?>">
</video>
video must be encoded properly for the device
Here's a slight variation on a theme: If you're only serving up an MP4 for mobile devices, you can roll the source tag right into the video tag, like so:
<video src="<?php echo $video; ?>" id="video" width="360" height="240" type="video/mp4" controls autobuffer onclick="this.play();"></video>
Support for the video tag also greatly depends on what version of Android you're running. You definitely need version 2.0 or higher and some older phones like the Nexus One stutter on playback of some higher bitrate videos.
I know some devices choke when you specify codecs...some actually are really anal about following that rule. Something to consider is the JW Player. The latest release just dealt with android.
I have been trying to get .mp4 to work on an android phone, kindle fire and iphone all day. after looking at many websites such as this I found the answer by pure luck and the relentless try try again.
upload your video files to you network first.
go back into the html editor and put the full web address as the source, not just the location from the html current position.
Example:
video controls="controls" autohide="autohide" autoplay="autoplay" loop="loop" poster="wait.jpg" width="900" height="400"
source src="http://www.website.com/cust/flash/bf1/sc2/sc2.mp4" type="video/mp4"
/video
in older device browsers some features like loop and auto play don't work but the video will appear and play. This worked for me.
hope this is helpfull
精彩评论