HTML5 Issues Chrome/Safari - Stops loading/Doesn't Load - google-chrome

site: http://www.ignitionpointventures.com
Hello All,
I am having html5 video loading issues on chrome/safari. The basic idea is that there is a video container with video thumbnails on the right side. I have created a separate html file containing each video's html5 video info to be placed in the video container. On page load the first video automatically should load using jquery document ready, subsequently each thumb loading the appropriate html5/video.
Issue:
On Chrome and Safari.
On Chrome the video on load does not appear. On clicking the thumbs the first image of the video appears in the main video div, but appears to stop loading and will not play.
On Safari the video does not load at all. When trying to play the file directly it has an error and the quicktime symbol shows up with a ? mark.
Here is an example of the html5 video
<video width="721px" height"406px" preload="auto" controls="controls">
<embed src="http://www.ignitionpointventures.com/includes/video/v1/v1.mp4" width="721" height="406" allowscriptaccess="always" allowfullscreen="true"></embed>
<source src="http://www.ignitionpointventures.com/includes/video/v1/v1.mp4" type="video/mp4" />
<source src="http://www.ignitionpointventures.com/includes/video/v1/v1.ogv" type="video/ogg" codecs="theora, vorbis" />
<source src="http://www.ignitionpointventures.com/includes/video/v1/v1.webm" type="video/webm" />
<p>Your browser does not support HTML5 video.</p>
</video>
Here is the javascript
<script type="text/javascript">
$(document).ready(function(){
$('#leftVideo').load('http://www.ignitionpointventures.com/includes/video/v1/v1.html');
});
$(function() {
$(".v1").click(function(){
$('#leftVideo').load('http://www.ignitionpointventures.com/includes/video/v1/v1.html');
});
$(".v2").click(function(){
$('#leftVideo').load('http://www.ignitionpointventures.com/includes/video/v2/v2.html');
});
$(".v3").click(function(){
$('#leftVideo').load('http://www.ignitionpointventures.com/includes/video/v3/v3.html');
});
$(".v4").click(function(){
$('#leftVideo').load('http://www.ignitionpointventures.com/includes/video/v4/v4.html');
});
});
</script>
I checked the .htaccess file also
I know the videos are a bit large and could be an issue, but doubt this is the real problem. yes the javascript could be more advanced.
Thanks!

Related

MP4 doesn't play after initial load in Safari

I have embedded a mp4 file in my webpage, that gets loaded fine and is playable by every browser and on mobile too.
<video controls src="/mymovie.mp4">
<track kind="captions"></track>
</video>
However, when I open the webpage with Safari (macOS), the only thing I can see is a black box with the size of the video and a striked through (disabled) play button in front of it. The thing is, when I refresh the page again (even without clearing the cache) the video works fine.
When I write my markup to use the source element, the problem appears, but in a different way. Now I see no longer a black box, but a transparent one and I can press the play button, but the video won't start. I already tried to place a "not supported" text under the source list, but the text doesn't appear.
<video controls>
<track kind="captions"></track>
<source src="/mymovie.mp4" type="video/mp4"></source>
not supported
</video>
Notice that I already tried reordering the source element above the track element.
Is there any known problem of this kind and a way to solve it?
Here are some more informations about my setup:
HTTPS only (valid certificate)
video size is around 3,5MB
NGINX is configured to send this headers:
accept-ranges: bytes
Content-Range: bytes 262144-3411398/3411399
content-type: video/mp4
Something I notice in difference to Chrome is, that inside my devtools network tab the video source is loaded between 2 and 4 times, but just one time of it with the correct size. The other two entries are just some bytes. However, this happens in the same way, if I face the black box.
<video controls autoplay>
<source src="/mymovie.mp4" type="video/mp4">
<track kind="captions"></track>
</video>
Did you try using source tag instead? Autoplay attribute can also help, but some browsers do not allow videos to be autoplayed, or autoplay all videos as muted, if user didn't interract with document first. My best guess is that Safari doesn't allow to play a video without the prior interaction, and you refreshing the page do interact with the page. You can cheat it playing video after clicking on privacy policy accept button.
// jQuery
$('#button-id').click(function(){ $('#video-id').play(); });
// Javascript
var button = document.getElementById('button-id');
var video = document.getElementById('video-id');
button.addEventListener('click', function(){ video.play(); });
If your video is in the same folder you should use:
<video controls autoplay>
<source src="mymovie.mp4" type="video/mp4">
<track kind="captions"></track>
your browser doesn't support HTML5 video
</video>
or
<video controls autoplay>
<source src="./mymovie.mp4" type="video/mp4">
<track kind="captions"></track>
your browser doesn't support HTML5 video
</video>
You could also include your whole url:
<video controls autoplay>
<source src="http://url.to/mymovie.mp4" type="video/mp4">
<track kind="captions"></track>
your browser doesn't support HTML5 video
</video>

Video not work in mobile

I'm working on this site using canvas video with MediaElement.js library. It works fine in desktop browsers but not displaying anything in mobile (android chrome 56).
The weird thing is that when I remove mp4 and ogg source, only use 'webm', at first it still not displaying anything but when I turn my device upside down it works?(maybe need to resize the screen to trigger it?) the videos displaying. So I want to ask:
1/ Incase I have to use 'webm', is there anyway I can tell my web that only use 'webm' type when in tablet & mobile without removing mp4 & ogg source?
2/ do you have any idea how to fix it?
I have tried add muted attr and use absolute urls but still not working.
<video id="myVideo" loop="loop" controls="controls" width="300" height="150" muted>
<source src="/wp-content/uploads/videos/video.mp4" type="video/mp4" />
<source src="/wp-content/uploads/videos/video.webm" type="video/webm" />
<source src="/wp-content/uploads/videos/video.ogv" type="video/ogg" />
</video>
$(video).bind("loadedmetadata", function () {
video.play();
});
$(video).mediaelementplayer({
success: function (mediaElement, originalNode) {
}
});
Thank you very much.

HTML5 Simple Video Player. What did I miss?

First I made a screen recording as a video I would like to display.
Than I uploaded the video to VLC to convert the video.
I made one MP4 and a fallback for OGG.
I then moved the videos to my dropbox account so I can host them there.I right clicked and got the link to each video from dropbox. I am trying to use the links as the src in the video tags.
<video width="400" controls>
<source src="https://www.dropbox.com/s/m7emkfs994sgm5g/Untitled.m4v?dl=0" type="video/mp4">
<source src="https://www.dropbox.com/s/9owwdbm8p0nz1f0/oggguntitled.ogg?dl=0" type="video/ogg">
</video>
Even though I told VLC to convert it to MPV, the file extension is m4v.. Is that the same thing?
The video just shows blank. Not getting any errors either.Not sure what I missed.
The following Fixed it for me.
I made two changes:
change dl=0 at the end of your dropbox link to dl=1. I believe this makes it a download link instead of a page to view a download link.
Due to a bug in chrome on OSX certain mp4 files will fail to play correctly (some kind of graphics acceleration issue), but it won't fall back to the ogv. For this reason, i have placed the ogv as first since it will work on OSX-chrome, and platforms that don't support it should fall back to the mp4.
<video width="400" controls>
<source src="https://www.dropbox.com/s/9owwdbm8p0nz1f0/oggguntitled.ogg?dl=1" type="video/ogg">
<source src="https://www.dropbox.com/s/m7emkfs994sgm5g/Untitled.m4v?dl=1" type="video/mp4">
</video>

VideoJS isn't displaying anything in IE8

I'm trying to get a video to work with videoJS and with the help of the videoJS guide I got it working on Chrome and Firefox, but not IE8.
I've added the CDN tags to my head and created a videotag.
I'm using the following:
<video id="my_vid" class="video-js vjs-default-skin"
controls preload="auto" width="244px" height="196px"
poster="img/poster.jpg">
<source src="files/mymov.mp4" type='video/mp4' />
<source src="files/mymov.webm" type='video/webm' />
<source src="files/mymov.ogv" type='video/ogg' />
</video>
It seems like the Flash fallback isn't working in IE8, since it doesn't create a flash object when I look in my inspector (which it does at the homepage of videojs.com). The video tag just remains, and IE8 can't cope with that. The video on the homepage of videojs.com is shown properly in IE8.
What am I doing wrong?
Solved: It seems like I had to add data-setup="{}" as an attribute in the video tag. The only problem now is that the video won't play in Chrome.
You can force videJS to display flash. You can use rtmp streaming to use flash
vjs.options.techOrder = ["flash", "html5", "links"];
$(document).ready(function() {
setTimeout(function() {
vjs("videoPlayer").ready(function() {
var swfVideo = $("#videoPlayer_flash_api")[0];
swfVideo.vjs_setProperty("RTMPConnection", "path");
swfVideo.vjs_setProperty("RTMPStream", "videoName");
});
}, 1000);
});

How can I link to an .mp4 video in my site?

I have a web site and I want to link a button to a video. So whenever someone clicks the "video" buttons let's say, I want to open the video.mp4 in a new browser. What I do is:
<div>...</div>
The video is quite big (190MB) so the code above is not working. I start listening to the sound but cannot see the image.
Does anyone know how to do it? Or any simple way to just open this video as a link?
You could use HTML5 tag don't forget that MP4 is only supported by IE 9+, Chrome 5+ and Safari 3+. You should at least convert your file to WebM or Ogg to make it compatible with all recent browsers.
To do so you would need a new page (where the link goes) and in this page have this code:
<video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
<source src="movie.webm" type="video/webm" />
Your browser does not support the video tag.
/* instead of the last line you could also add the flash player*/
</video>
The browser will automatically select the first known format and play it. (source: w3Schools.com)
Hope this helps!