I am using HTML5 to embed a video on my site. It works in all browsers except Edge.
Here is my code:
<video id="sampleMovie" width="509" height="280" preload autoplay>
<source src="breaking_news.mov" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="breaking_news.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="breaking_news.ogv" type='video/ogg; codecs="theora, vorbis"' />
<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="640" height="360">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashvars" value='config={"clip":{"url":"breaking_news.flv","autoPlay":false,"autoBuffering":true}}' />
</object>
</video>
I removed the full URL for the purpose of posting here.
Any idea on why it will not play in Edge?
Based on the Edge browser video developer guide for mp4, this is what is supported:
Media File : Video MP4.
Extension setting : .mp4.
Mime type setting : video/mp4.
Based on the code you provided, the MP4 file you are providing has an extension type/container type of .mov which is not supported.
Thus, I recommend re-encoding your source video file so that it has the .mp4 extension type, more than likely this is the issue. I would also look at the specific codec type you are specifying.
Lastly, I recommend looking at their full dev guide found here: https://learn.microsoft.com/en-us/microsoft-edge/dev-guide/html5/video
Hope this helps.
Related
Im building a site where video will be stream from mp4/m4v files on the server.
I am having trouble making this work in Chrome 47, evidently due to lack of NPAPI support.
Here are some variations of code I have tried and the results:
<video controls>
<param name="video" value="true" />
<source src="app/files/s1e1.m4v" type="video/mp4">
<source src="app/files/s1e1.m4v" type="video/ogg">
Your browser does not support the video tag.
</video>
Result: I get a javascript error frame with an message reading "This plugin is not supported"
<object width="100%" height="360">
<param name="movie" value="app/files/s1e1.m4v"/
<param name="allowFullScreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<embed width="100%" height="360" src="app/files/s1e1.m4v" class="youtube-player" type="text/html" allowscriptaccess="always" allowfullscreen="true"/>
</object>
Result: The player renders and seems to load the file evidenced by the correct video length being displayed in the player, but video does not play when I hit the play button.
Either method works perfectly in Safari.
Which method is best for cross-browser support?
I am uploading .mp4, .webm, .ogv, .swf files to our servers for video playback. We are using the code below for cross-browser/fallbacks.
<video width="570" height="338" tabindex="0" loop="loop" controls="controls" autoplay="autoplay">
<source type="video/mp4" src="/Resources/videos/product.mp4"></source>
<source type="video/webm" src="/Resources/videos/product.webmsd.webm"></source>
<source type="video/ogg" src="/Resources/videos/product.oggtheora.ogv"></source>
<object width="570" height="338" type="application/x-shockwave-flash" data="/Resources/videos/product.swf">
<param wmode="opaque" value="/Resources/videos/product.swf" name="movie">
<param value="false" name="allowFullScreen">
<param value="transparent" name="wmode">
<param value="config={'playlist':['http%3A%2F%2Fbeta.com',{'url':'http%3A%2F%2Fbeta.com%2FResources%2Fvideos%2Fproduct.mp4','autoPlay':false}]}" name="flashVars">
</object>
</video>
The videos work flawless in IE, Chrome, Firefox, and Safari (windows). However the video lags and is pixelated in Safari on Mac. See image below:
I am wondering if anyone has come across this issue before and could steer me in the right direction to fix it. Thank you all in advance.
If I set my video tag up to be something like
<video src="myvid.mp4"></video>
IE9 plays the video in its entirety, if however I have it as
<video>
<source src="myvid.webm" type="video/webm" />
<source src="myvid.ogv" type="video/ogg" />
<source src="myvid.mp4" type="video/mp4" />
</video>
The video plays for about 3 seconds and then stops.
Unfortunately if I use the first method then browsers like Firefox don't look at the <source> attributes and refuse to play.
Lots of research has ruled out MIME types and video encoding as potential issues.
The full code for what I currently have is:
<video controls="controls" poster="<?=$template_path;?>/images/home-video.png">
<source src="<?=$template_path;?>/videos/intro_blue.webm" type="video/webm" />
<source src="<?=$template_path;?>/videos/intro_blue.ogv" type="video/ogg" />
<source src="<?=$template_path;?>/videos/intro_blue.mp4" type="video/mp4" />
<object type="application/x-shockwave-flash" data="http://player.longtailvideo.com/player.swf" width="600" height="600">
<param name="movie" value="http://player.longtailvideo.com/player.swf" />
<param name="flashVars" value="controlbar=over&image=<?=$template_path; ?>/images/home-video.png&file=<?=$template_path; ?>/videos/intro_blue.mp4" />
<param name="wmode" value="transparent" />
<img alt="Intro" src="<?=$template_path; ?>/images/home-video.png" width="600" height="600" title="No video playback capabilities, please download the video below">
</object>
</video>
I think the issue may be in server settings. You don't need the MIME type for video content. And IE is strict with it. See here for example.
In my case it seemed to be IE9 behind certain firewalls was not allowing the video to download completely (other browsers allowed it).
I wasn't happy with this so as a precaution I forced IE9 to use flash.
I'm trying to get my site using html5 instead of those ancient horrible horrible embed/object stuff. I exported the html to a test page.
It doesn't work for me in Firefox or Chrome (on a Mac). Here are the goodies on this page:
<video width="500" height="350" controls="controls">
<source src="/temp/output.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" standby="video loading" scale="aspect" HEIGHT="350" WIDTH="500" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM NAME="src" VALUE="/content/preview/350/aerial-tour-of-thebes-ramusseum.mov" >
<PARAM NAME="autoplay" VALUE="true" >
<param name="controller" value="true"><param name="loop" value="true">
<param name="scale" value="aspect"/>
<EMBED scale="aspect" HEIGHT="350" WIDTH="500" TYPE="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download/" SRC="/content/preview/350/aerial-tour-of-thebes-ramusseum.mov" controller="true" loop="true" AUTOPLAY="true"/>
</OBJECT>
</video>
Two questions :
what's wrong with this code? I know mp4 is a valid format for html5, right? What's the deal? and
Isn't the point of all of this to degrade nicely in browsers that don't have support? I just see a gray box with an x in it. Shouldn't it execute the object/embed stuff and show the video the way it used to?
Some browsers doesn't support MPEG4 for licensing reasons. This format is patented, so developers of these browsers would have to buy patent license for every user of their browser.
Firefox currently supports Ogg Theora and WebM.
Here you have format support matrix across various browsers/operating systems:
http://en.wikipedia.org/wiki/HTML5_video#Table
I have an audio element in a webpage for a client and i have coded it as well as i can but i still can't get it to work on All browsers. I know cross browser and browser editions (i.e. internet explorer 6,7,8,9 ) with audio is tricky but there has to be an answer here. Can this be done and without needing browser plugins? Here is my current code.
<audio preload="auto" autobuffer autoplay="autoplay">
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.mp3"/>
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.ogg" />
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wav" />
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.au" />
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wma" />
<!-- browser compatibility fallbacks -->
<object>
<param name="autostart" value="true">
<param name="src" value="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wav">
<param name="autoplay" value="true">
<param name="controller" value="false">
<embed src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wav" controller="false" HIDDEN="TRUE" autoplay="true" autostart="True" type="audio/wav" />
<embed src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.mp3" controller="false" HIDDEN="TRUE" autoplay="true" autostart="True" type="audio/mpeg" />
</object>
<!-- End browser compatibility fallbacks -->
</audio>
I would look here for some answers. I personally have made a page that uses the native <audio> element but provides a WMP fall back for the less tech savvy users that insist on using old deprecated software.