0

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

Ron B
  • 1
  • 1
  • 3
  • I'm getting `videojs is undefined` when I try to access your site, so it doesn't look like you're actually using Video.js. The good news is, the captions work fine for me in the vanilla `video` element in Chrome :) – Matt McClure Mar 19 '14 at 23:55
  • I copied the code straight from videojs.com so I'm not sure what the "videojs is undefined" deal is. The video and the captions are working in Chrome, both on my desktop and Android phone, so I've got that going for me, which is something... – Ron B Mar 20 '14 at 01:32
  • You have the type attributes wrong on the style and script elements: ` – misterben Mar 20 '14 at 08:37
  • The ` – Ron B Mar 20 '14 at 15:45
  • The type attributes were screwed up, that was the problem. The one line of code was from the previous version of videojs that I did not remove and the other was probably left over from running flash videos. Working `` code:` ` . Stoked. Thanks for your assistance, especially **misterben**. – Ron B Mar 20 '14 at 17:58

1 Answers1

0

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.

MacG
  • 1