Captions Not Working with Video.js - video.js

I've been using Video.js to embed mp4 videos, it's a great player, thanks to everyone who develops and works on it. For the most part, it's working great, but I have a few small issues I need to figure out.
Here's one of the video pages; Columbia River Bass Fishing. It's mostly XHTML Transitional, I think mixing the HTML 5 in is causing some issues, especially with attribute values, but as long as it works, I'll figure out the details later. Here's the video.js code:
<video id="WAW_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="360" poster="ColumbiaRiverSmallmouthBassFishing.jpg" data-setup='{"WAW_option":true}' >
<source src="ColumbiaRiverSmallmouthBassFishing.mp4" type='video/mp4' />
<track kind="captions" src="captions.vtt" srclang="en" label="English" default />
Your browser does not support this video. Maybe you should update your internet browser
</video>
The video stuff works great in Firefox, Chrome and IE11, but no captions. The "captions.vtt" file is correct and IE10 will display the captions locally on my computer, but on the remote server there are no captions. I tried using the full URL location for the VTT file but that didn't work either.
A quick look at the coding on this page should tell you that I'm no expert, but I'd like to try and produce code that works and is compliant, so forgive the stupid questions.
Thanks in advance
Ron B

Change .vtt to .txt rule out if it's a MIME type issue with your web server config.
If you need to add web.config to your root, it needs to list .vtt as an acceptable MIME type.

Related

Not able to play aac audio files on IE11

I have a page with this html :
<audio controls="controls">
<source src="http://techslides.com/demos/samples/sample.aac" type="audio/aac" />
</audio>
It works on Firefox and Edge but it doesn't on IE11. My windows version is up to date and I saw it should be supported. I tried to change my settings to be sure ActiveX is enabled and it is.
I also tried with :
<audio controls="controls" src="http://techslides.com/demos/samples/sample.aac">
It doesn't works too.
What can I do?
I tested the sample code with IE 11 browser and I am able to produce the issue.
I try to check the documentation and found this information.
Beginning with Windows Internet Explorer 9, any audio or video content
needs the correct mime type set on the server, or the files won't
play. Internet Explorer 9 supports MP3 audio, and MP4 audio and video.
WebM audio and video files can be supported by installing the WebM
components from The WebM project. The following table shows the
required settings for your web server to host these files correctly.
Microsoft Edge updates introduced WAV support.
Reference:
audio element | audio object
you can see that .AAC format is not in the list but sites like MDN and CANIUSE shows that it is supported.
I also tried with audio type mp4 which also did not worked.
<audio controls="controls">
<source src="http://techslides.com/demos/samples/sample.aac" type="audio/mp4" />
</audio>
It also can be possible that it is some kind of bug with IE browser or issue is related with H.264 format.
As a work around, I suggest you to use mp3 file format which is working fine with IE 11.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<audio controls="controls">
<source src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3" type="audio/mpeg3" />
</audio>
</body>
</html>

HTML5 video will only play correct on Safari

I must start by saying I'm a newbie to html. I start from scratch and I try to do it the right way.
I've got a lot of help from stack overflow and most of my problems were solved by other's requests for help. But I don't seem to get an answer to a simple problem I got.
I've checked several answers to this problem, but none of it works for me.
MY PROBLEM: my videos only plays on Safari and at no other browser.
The most relevant post was the following: HTML5 video won't play in Chrome only
I tried the correct order and re-converting my files to mp4, ogg and webm using Miro converter but both didn't work. I added the codecs in to my code but this doesn't change anything. I added plays-inline as well from another relevant post but nothing...
My code is the following:
<!-- LANDING PAGE VIDEO - INTRO VIDEO -->
<video class="videoIntro" id="SiteIntro" autoplay="no-repeat" poster="VMF_MENU.png" plays-inline>
<source src="videos/Site_Intro.mp4" type="video/mp4">
<source src="videos/Site_Intro.webm" type="video/webm" codecs="vp8, vorbis">
<source src="videos/Site_Intro.m4v" type="video/mp4" codecs="avc1.42E01E, mp4a.40.2">
<source src="videos/Site_Intro.ogv" type="video/ogg" codecs="theora, vorbis">
</video>
I got no error messages (expected).
What do you suggest I try to correct this?
Thank you in advance!

embed AWS S3 video using video.js in html site

I am in new territory for me here. I am trying to embed AWS S3 hosted video into a html website authored with Netobjects Fusion.
I tried putting in the code from the getting started page and successfully got my website to play the video.js promo video, however, when I try to alter that to play my videos I get an invalid file path error. Below is the altered code. Can anyone direct me as to what I am missing or messing up? Do I need to define the video id somewhere else? Also, I am not sure what to do with the data-setup='{"example_option":true}'> line. Thanks.
<link href="//vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="//vjs.zencdn.net/4.12/video.js"></script>
<video id="6915MLD" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="480"
poster="https://s3-us-west-2.amazonaws.com/premiervideotours/PVTx320.jpg"
data-setup='{"example_option":true}'>
<source src="https://s3-us-west-2.amazonaws.com/premiervideotours/PVT-6915MLD2015b2b.mpg" type='video/mp4' />
<source src="https://https://s3-us-west-2.amazonaws.com/premiervideotours/PVT-6915MLD2015b2b.webm" type='video/webm' />
</video>
Even after correcting your URLs to the below, I get access denied when visiting them in a browser.
https://s3-us-west-2.amazonaws.com/premiervideotours/PVT-6915MLD2015b2b.mp4 (mpg to mp4)
https://s3-us-west-2.amazonaws.com/premiervideotours/PVT-6915MLD2015b2b.webm (removed duplicate https://)
S3 will respond with access denied not only when the permissions of the file don't allow access, but also when the file is not found. So check both whether the files are in the location the URLs point to, and whether they are 'public'.
Re data-setup='{"example_option":true} - there are a couple of options to set up video.js after including the script and css. One is to include a data-setup attribute. The value of the attribute is a json string which can include setup options or be empty, e.g. data-setup='{}. The "example_option" is just that, an example of how it would look if you need to pass setup options.

HTML5 Video not Playing in Safari

I've been working on an HTML5 video implementation, but I'm having some issues. I've been following the guide at http://diveintohtml5.info/video.html. I have encoded .m4v, .ogv, and .webm versions of all of the video. Chrome and Firefox have no troubles playing the video. When I attempt to play it in Safari, it loads the video container, but not the video. You see a white space where the video should be, the controls, and the "loading" text. In Web Inspector's network tab, the video's status is "pending" and the mime-type is "undefined". Interestingly, I only experience this problem on the staging site, while it works fine on my local dev.
When I visit the video directly in the browser on local dev, I get the following output in the console:
Resource interpreted as Document but transferred with MIME type video/x-m4v.
GET http://site.dev/content/videos/movie.m4v Plug-in handled load
Note that GET has a little red x to the left of it in the inspector.
My html code looks like:
<video class="html5-video" width="700" controls>
<source src="content/videos/movie.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="content/videos/movie.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="content/videos/movie.ogv" type='video/ogg; codecs="theora, vorbis"' />
Your browser does not support this video.
</video>
Additionally, the video is ~20mb.
Any thoughts? Thanks!
Well...it turns out that the issue occurred because I was using .htaccess to password protect the directory. Interestingly, all browsers except for Safari would allow access to the video files. Thanks to those who helped!
Try encoding to mp4 and replace this file instead m4v format, update your code and run.
Work's fine.

simple HTML5 Video not playing in Safari

I have a simple html 5 video on a page that works in Chrome and Firefox but not in Safari.
<div class='show_page_video'>
<video controls='' height='320' id='movie' poster='http://cloud-coach-dev.s3.amazonaws.com/58e68874774da1c4d18b37dc9dee3c9c_1.jpg' preload='none' width='400'>
<source src='http://cloud-coach-dev.s3.amazonaws.com/58e68874774da1c4d18b37dc9dee3c9c.ogv' type='video/ogg'></source>
</video>
</div>
The video poster loads but the video isn't grabbed and when I click play nothing happens, also in the network tab I don't see any attempt at grabbing the video data.
Anyone run into this issue before?
It appears I was flawed in my thinking Safari supports OGG so I just had to rework some things to have multiple encodings for videos and added an mp4 fallback source