Reputation: 139
I have coded and installed the sample video html file as described on the jplayer.org web site. Using the sample videos provided by jplayer, the video plays as it should with IE, Chrome, & Pale Moon, though I am not certain which version (m4v or ogv) plays. -- www.bbhq.com/first2.htm
However, when I change the video coding to my mp4 (rather than m4v) and ogv files as shown below, the player plays, but defaults to the ogv version in IE, Chrome, & Pale Moon. On my Kindle Fire HDX, it displays the message indicating that I need to install the flash plugin, which, of course, is not available for the Kindle Fire HDX, and thus, does not play at all:
www.bbhq.com/first3.htm
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
title: "my title",
mp4: "http://www.bbhq.com/vfiles/mine.mp4",
ogv: "http://www.bbhq.com/vfiles/mine.ogv",
poster: "http://www.bbhq.com/vfiles/mine.png"
});
},
swfPath: "/jp",
supplied: "mp4, ogv"
});
My preference is to play the mp4 version whenever possible, and skip having to use the ogv file, if possible.
I have encoded my mp4 file as I have done for other players (H.264) using Handbrake.
Either my mp4 encoding is not correct, or my coding for the html page are not correct. Can you help me with this?
Thank you.
Upvotes: 3
Views: 3879
Reputation: 468
There is no mp4 key in jpayer to pass mp4 files instad you can use m4v key and change the supplies values to "m4v". So if you want to play mp4 video change your code as below
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
title: "my title",
m4v: "http://www.bbhq.com/vfiles/mine.mp4", //mp4 key changed
ogv: "http://www.bbhq.com/vfiles/mine.ogv",
poster: "http://www.bbhq.com/vfiles/mine.png"
});
},
swfPath: "/jp",
supplied: "m4v, ogv" // instead of mp4 pass m4v
});
Media Support
HTML5: mp3, mp4 (AAC/H.264), ogg (Vorbis/Theora), webm (Vorbis/VP8), wav Flash: mp3, mp4 (AAC/H.264), rtmp, flv For cross-browser support, a format must be supplied that works in both HTML5 and Flash. Optional additional formats may be supplied to increase cross-browser HTML5 support.
Upvotes: 6