hkasera
hkasera

Reputation: 2148

RTMP flash fallback for HTML5

I am trying to have a flash fallback for html5 video in case the browser doesn't support it. I am able to get it on chrome but chrome shows that "no video with supported format".

I am creating a swf object and appending using Modernizr test for video. I have mp4 and webm formats of video.Since firefox requires a ogv format it should render the flash fallback but it is not doing so.

<div id="flash" width="230px" height="230px" style="display:inline-block">
  <video width="230px" height="230px" id="player2" controls="controls">
    <source src="'+path_webm+'" type="video/webm">
    <source src="'+path_mp4+'" type="video/mp4">
    <track kind="subtitles" src="../media/mediaelement.srt" srclang="en" />
      <p>Your browser leaves much to be desired.</p>
  </video>
</div>

var $vobj = $(mediaVideo);
$vobj.appendTo("#tab1");
if(!Modernizr.video.ogg) {
   so.write("flash");
}
});

so is a swf object here.

Thanks in advance!

Upvotes: 0

Views: 1707

Answers (3)

Furqan Shakoor
Furqan Shakoor

Reputation: 163

Here is a simple code to allow HTML 5 video to fallback to flash

<video id="movie" width="320" height="240" preload controls>
  <source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"' />
  <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"' />
  <source src="pr6.mp4" />
  <object width="320" height="240" type="application/x-shockwave-flash"
    data="flowplayer-3.2.1.swf"> 
    <param name="movie" value="flowplayer-3.2.1.swf" /> 
    <param name="allowfullscreen" value="true" /> 
    <param name="flashvars" value='config={"clip": {"url": "http://wearehugh.com/dih5/pr6.mp4", "autoPlay":false, "autoBuffering":true}}' /> 
  </object>
</video>

Just add the flash video embed code at the end of all the source tags.

Upvotes: 3

BHall
BHall

Reputation: 1

The company said in a post on The Chromium Blog that it was removing support for the HTML5 H.264 video codec in favour of the WebM (VP8) and Theora video codecs.

Read more: http://www.itproportal.com/2011/01/12/google-chrome-drops-h264-video-codec-support/#ixzz217vGB8dP

Upvotes: 0

LONGI
LONGI

Reputation: 11443

please format code next time yourself!

you can use the html5 fallback. i just answered to a similar question few days ago. check here: HTML5 Video tag with fallback

Upvotes: 0

Related Questions