Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

JW Player 5.3 Flash Fallback


I'm noticing some really strange behavior with the JW Player. I have my player set to use HTML5 first and then to fallback to Flash.

bc.. jwplayer("player").setup({
file: "http://www.robbswebserver.com/videos/VideoGadget/Toy_Story_3.flv",
controlbar: "bottom",
volume: 0,
repeat: "always",
players: [
{ type: "html5" },
{ type: "flash", src: "http://risegadgets.googlecode.com/svn/trunk/Video/mediaplayer-5.3/player.swf" }
],
events: {
onReady: function(event) { onPlayerReady(event); },
onMeta: function(event) { onMetadataFound(event); },
onComplete: function(event) { doneEvent(); },
onError: function(error) { onPlayerError(error); }
}
});



The FLV file will NOT play. However, if I change it so that it tries to use the Flash player first with an HTML5 fallback, the FLV file plays without issue. But now the problem is that any videos that would normally be played by HTML5 (ogv for example), will not play.

It seems that the fallback mechanism does not work at all. Only videos that are playable by the FIRST player in the list will work.

Am I doing something wrong? Do I have the syntax correct or is this a bug in the player?

Thx.

12 Community Answers

Ethan Feldman

JW Player Support Agent  
1 rated :

@Donna – The FLV file will not play in HTML5 mode because HTML5 does not support FLV. FLV stands for Flash Video, and it works in Flash only.

More information – http://www.longtailvideo.com/support/blog/15095/jw-player-53-html5-and-you

JW Player

User  
1 rated :

I understand that. But isn't the Flash player supposed to kick in if the HTML5 player can't play it? I thought that's what fallback meant? Or have I misunderstood the documentation?

Ethan Feldman

JW Player Support Agent  
1 rated :

The fallback is the Flash player (player.swf) falling back to the HTML5 player (jwplayer.js). Not FLV to something else.

FLV is a format that HTML5 simply doesn’t understand. It’s a proprietary format that only works in Flash. You are going to need to use an MP4 file (Encoded in H.264).

JW Player

User  
1 rated :

OK, I'm getting more confused. Let me try to clarify my situation.

What I ultimately want to do is use HTML5 first, then go to Flash if HTML5 determines it can't play the video. What I'm finding with this configuration is that the Flash player is never utilized. So for example, I will be able to play .ogv and .mp4 in Chrome without issue, but I cannot play .flv, .mov, .3gp etc. What I would expect in this situation when trying to play an .flv or .mov file, is that the HTML5 player will try to play the video, realize it can't, so then the Flash player takes over and plays the file.

Where is the flaw in my description of the situation?

Ethan Feldman

JW Player Support Agent  
-1 rated :

We don’t have this kind of fail-over mechanism yet.

I would recommend using MP4 for all of your videos (encoded in H.264), and then it should play in most browsers in HTML5 mode, except Firefox, and IE.

Examples – http://developer.longtailvideo.com/player/trunk/js/test/fallback.html

JW Player

User  
1 rated :

We are even keeping .ogv out the equation for now and just using one mp4 file using the fallback method an it works (only in our case firefox/IE will use flash and safari/chrome will use html5).
See this example and see if it kind of what you want: http://www.smith.edu/video/videoglowskin.php

JW Player

User  
1 rated :

OK. So it's not possible to do what I was hoping to do. Too bad. Do you have plans to add this functionality?

Can I ask then what the fall back in your documentation refers to? To me, this implies the functionality that I described in my earlier post.
"You get to choose between Flash or HTML5 as the primary playback mode and the player will automatically fall back to the other mode when needed."

Ethan Feldman

JW Player Support Agent  
1 rated :

We are going to work on adding a mechanism to support this, yes. The example is just one (or multiple) source files, but the files have to be files that HTML5 supports (MP4/OGG)

JW Player

User  
1 rated :

Since my users specify a URL to the video file, what I want to do is check the extension of the file at the URL and then choose the appropriate player. For my purposes, I can assume that the browser is Chrome. So I have a Javascript function that checks if the extension is a HTML5 video type that Chrome can play. If it can, I want to choose the HTML5 player. If it can't, I want to use the Flash player. How can I configure this?

Thanks!

Ethan Feldman

JW Player Support Agent  
1 rated :

Sorry, we actually do have a working Failback case for FLV.

Here is an example – http://developer.longtailvideo.com/player/trunk/html5/test/examples/failover.html

JW Player

User  
1 rated :

In an earlier post, Jeff said that "We are even keeping .ogv out the equation for now..." Does that mean that the JW Player does not support ogv's or does it mean something else?

Ethan Feldman

JW Player Support Agent  
1 rated :

He meant that he is personally not using it. Of course our player supports it :)

This question has received the maximum number of answers.