I am having a problem getting videos to run in Chrome the videos are MP4 - H.264, and they work fine on IE, Firefox and Safari
in Chrome all I get is a blank screen and an error report
Resource interpreted as Image but transferred with MIME type text/html: "http://127.0.0.1/video.php3". jwplayer/jwplayer.html5.js:1 ah.redraw jwplayer/jwplayer.html5.js:1 Resource interpreted as Image but transferred with MIME type text/html: "http://127.0.0.1/video.php3". awmlib2.js:10 aCo awmlib2.js:10 (anonymous function)
the code is <div id='intro'></div> <script type='text/javascript'> jwplayer('intro').setup({ file: 'jwplayer/iaf.mp4', image: "jwplayer/thumbs/intro.jpg", skin: "jwplayer/fs40/fs40.xml", width: '425', height: '300' }); </script>
my son's PC works fine with this page on Chrome so its obviously a problem with my setup. I have got it to work on both his and mine by using sources: [ { file: "jwplayer/rn_cruisers.ogv" }, { file: "jwplayer/rn_cruisers.mp4" } ],
and it now works on everything apart from Opera, which only delivers audio.
the last issue I have is why Chrome plus jwplayer is calling multiple instances of the PHP page. If I remove the jwplayer calls, then the problem goes away. And it doesnt happen on any other browser. It occurs on both my domestic PC (windows) and production server (Linux), from both my PC and my son's PC. The issue causes a problem for me as the site detects multiple page calls and treats it as bad usage.
do you have any idea what might be causing this ? thanks .. Mike
Regarding only playing one video at a time, it is possible to do this with our JavaScript API and the onComplete event, however, there is an issue that has to be fixed in the player first in a future version so this actually works correctly.
Do you have an example of it working with the older version? It also can be because in JW6 the default mode in HTML5 and the older version was Flash, so you can try to set the player’s primary variable to flash to work around this issue, but chances are the encoding is not right for HTML5 mode…
The chrome making multiple requests thing is something I noticed too. Isn't there some known issue with chrome and html5 video with the preload attribute? Is there a way to trigger the preload attribute on the video tag that jw player generates? I think it would be interesting to test...
Or it could just be a chrome bug with long videos... Found this, and I do see this broken behavior for long videos in chrome... To the point where I'm about to revert to flash first as it isn't similarly affected.
There was an issue, of which there were many, in using Chrome 23 which was corrected in version 24.
The reference article you provided, I suspect was written when/using Chrome23 hence the comments about HTML5 video in Chrome. I personally use primarily FF to develop my web site and use Chrome to verify functionality etc.
I am currently using Chrome 25.0.1364.97 and not experiencing any issues in using native HTML5video on my web site.
Although my web site showcases the feature of the JWPlayer version 5.10.2295 and 6.2.3115, I do have an example using native HTML5 for video which function very well in Gecko and Webkit rendering engines.
To see this in action, visit www.starbase-alpha.com and from the 'teleport menu' select "HTML5 Video" portal.
In viewing that example, the coding used may be viewed by clicking on the 'view code' icon. In a nutshell it uses a playlist that utilizes a multidimensional array, in fact three dimensional.
For example (playlist in part):
bc.. var videos = new Array();
videos[0] = [ "http://media.w3.org/2010/05/bunny/poster.png", "http://media.w3.org/2010/05/bunny/trailer.webm", "http://media.w3.org/2010/05/bunny/trailer.mp4" ]; videos[1] = [ "video/images/enigma.jpg", "video/Enigma - Principal of Lust.webm", "video/Enigma - Principal of Lust.mp4" ]; . . .
Here you can see that the variable 'videos' is a three dimensional array videos[n] = [n] [n] [n].
OK, now we have a populated a videos array that contains <ol> <li>a poster image</li> <li>video in webm formatr</li> <li>video in mp4 format> </ol>
Now two things are needed, to load the playlist and how to get them in the video element and with the help of the DOM this is easily accomplished.
<ol> <li> bc.. function init() { document._video = document.getElementById("HTML5video"); }
</li> <li> bc.. function switchVideo(n) { if (n >= videos.length) n = 0; var webm = document.getElementById("webm"); var mp4 = document.getElementById("mp4"); var parent = webm.parentNode; document._video.setAttribute("poster", videos[n][0]); webm.setAttribute("src", videos[n][1]); mp4.setAttribute("src", videos[n][2]);
document._video.load(); }
As you can see each array element has the same structure; poster, webm format, mp4 format
Now we need to use all of this information, as follows(as an example):
The video element(tag) is given an ID with its options; this is in fact array[0] to
bc.. <video id="HTML5video" autoplay controls preload='none' width="370" height="240" poster="video/images/sade.jpg" > <source id='webm' src="video/Sade - Cherish%20the%20day.webm"> <source id='mp4' src="video/Sade - Cherish%20the%20day.mp4"> <p>Your user agent does not support the HTML5 Video element.</p>
</video>
The videos array from the playlist is displayed and with a mouse click will select another video that may be played.
At the moment, I am in the process of porting this from native HTML5 to the JWP6 and will once completed place it online in order to have a comparison available between using native HTML5 video and that of using the JWPlayer. I am hoping that in the near future a new version, hopefully with VTT support,is released for the JWPlayer as currently I am using JWP6.2.3115 which does have some unrelated issues.
I am not sure if this is of any help for you but at the very least it does five you the fact that native HTML5 video works very well.
Unfortunately HTML5 video is still a moving target implementation-wise...
I notice this in Chrome because its my primary browser, but I see it in IE9 as well, which makes me suspect that it isn't really a Chrome issue in my case. Also, my test video for this (a 720p 11 minute MP4) only seems to cause an issue on my local virtual machine. It seems to work ok on the server.
The weirdest part is that it will play fine for two or three minutes and then randomly stop somewhere. Which kind of screams "dropped connection", but since I just reproduced it in IE9 on my local virtual machine, I'm kind of wondering if it isn't the VM now....