1
votes

I'm using Video.js - HTML5 Video Player for WordPress with WordPress 3.5 . My MP4 video is playing normally in Chrome, Firefox and Safari, but not Internet Explorer 8. It shows a JavaScript error:

Invalid Argument
video.js     Line: 21
Code: 0   Char: 29906
URI: http://vjs.zencdn.net/c/video.js

As I saw from this post in video.js support forum, many users report the same error but seems no solution is provided. Is there anybody who can provide some lights to me?

UPDATE : Here is the shortcode I use:

[video mp4="http://video/path/here.mp4" width="95%"]

Nothing else in the post content. WordPress version: 3.5

Currently activated plugins installed:

  • Fancybox for WordPress v3.0.2
  • Bulk Watermark v1.5.1
  • AP Extended Mime Types v1.1 ( some people in the Internet suggests installing this will fix the issue , but it doesn't fix at all )
  • Video.js - HTML5 Video Player for WordPress v3.2.2
1
Thanks for asking question I also suffer same problem.Amol
Can you show us the related code, or perhaps link to a blog entry that raises this error?Sampson
@JonathanSampson added more information. thanks for the reminder. The site content is still under NDA, thus can't post it out yet.Raptor
@ShivanRaptor Can you please link to a page that contains this error?Sampson
I will try to a dummy WordPress site, but as said before, it's in Non-Disclosure Agreement (NDA), contents will be replaced.Raptor

1 Answers

1
votes

The issue is the following code:

el.style.width=initWidth+"px"

This code can be found in the video.js file. You'll need to host the file locally to make the edit below.

You're probably using 100% width on your video. Therefore videojs is attempting to set the width of the parent div to "100%px". This of course won't work.

Change the line above to:

el.style.width=initWidth.indexOf('%') !== -1 ? initWidth : initWidth+"px";