The Video.js module version 6.x-2.x supports the Video.js library versions 3.x. The online release notes of the module version 6.x-2.2 recommends using the library version 3.2.0, however the latest current release of the 3.x branch is 3.2.3.

Here is the official changelog for 3.2.3 which shows that 3 changes have been made over 3.2.0:

---- 3.2.0 / 2012-03-20 / baxter -----------------------------------------------
* Updated docs with more options.
* Overhauled HTML5 Track support.
* Fixed Flash always autoplaying when setting source.
* Fixed localStorage context
* Updated 'fullscreenchange' event to be called even if the user presses escape to exit fullscreen.
* Automatically converting URsource URL to absolute for Flash fallback.
* Created new 'loadedalldata' event for when  the source is completely downloaded
* Improved player.destroy(). Now removes elements and references.
* Refactored API to be more immediately available.

---- 3.2.1 / 2012-04-06 / options-width-fix ------------------------------------
* Fixed setting width/height with javascript options

---- 3.2.2 / 2012-05-02 / multiple-control-fades-fix ---------------------------
* Fixed error with multiple controls fading listeners

---- 3.2.3 / 2012-11-12 / fix-chrome-seeking-spinner ---------------------------
* Fixed chrome spinner continuing on seek

I have built the 3.2.3 distribution package from the corresponding GIT source package listed at GitHub's Tags list and attached it here because it is not available on the official Project website, so grab it from here for your convenience.

CommentFileSizeAuthor
#2 videojs-2007342-D6.patch1.2 KBroball
video-js-3.2.3.zip85.77 KBroball
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roball’s picture

Issue summary: View changes

typo fixed

roball’s picture

Title: Using the latest official supported release version of the Video.js library (3.2.3) with the Video.js module 6.x-2.x » Make the Video.js module 6.x-2.x compatible with the latest release of the Video.js library (3.2.3)
Version: 6.x-2.x-dev » 6.x-2.3
Component: Documentation » Code
Category: task » feature

It turned out that the latest 6.x-2.x release of the Video.js module - version 6.x-2.3 - is only compatible with version 3.2.0 of the Video.js library, due to this change in 3.2.1.

roball’s picture

Assigned: Unassigned » roball
Status: Active » Needs review
FileSize
1.2 KB

The attached patch fixes the issue. It makes the module version 6.x-2.x compatible with all current 3.2.x versions of the Video.js library, so you can use either 3.2.0 or the latest 3.2.3.

Jorrit’s picture

Status: Needs review » Fixed

I've committed your patch to 7.x-2.x and 6.x-2.x, thanks!

I really don't understand why the developers of Video.js made the change that you referred to. The video tag already contains width/height. Why they need to be specified in the data-setup attribute is beyond me. That change, and the lack of developments in Video.js made me lose interest in the player. It seems to be in active development once again, and even better, version 4 reads the width and height from the attributes again.

roball’s picture

Category: feature » bug
Status: Fixed » Needs work

Thank you for committing changes based on my patch. However, the way you have committed it won't work.

The "data-setup" attribute can contain any options the Video.js library understands and must be in JSON format. JSON only accepts double-quotes as quotes (no single quotes!). Thus we must use the following notation:

data-setup='{
"width": <?php echo $width ?>,
"height": <?php echo $height ?>,
}'

and NOT

data-setup="{
'width': <?php echo $width ?>,
'height': <?php echo $height ?>,
}"

as you committed it. I also don't understand why you changed my easy-to-read-and-expand multi-line format as shown above to the hard-to-read-and-expand inline format

data-setup="{'width': <?php echo $width ?>, 'height': <?php echo $height ?>}"

all within the single same line of the "video" element. "width" and "height" are not the only possible options, so keeping the multi-line format with one Video.js option per line would allow users to easily add other options.

Regarding your bad feeling about the change in Video.js 3.2.1 to accept "width" and "height" as options, I think this is an improvement, but I agree with you they should have left the alternative possibility to read them directly from the HTML attributes. Now we have both ways implemented in the module (after you correct the commit), so we are just future proof and obey both pure HTML 5 and the way Video.js now prefers it.

Video.js development is currently also very active - for example, they just released 4.0.4 yesterday.

Jorrit’s picture

I know it is in active development now, but it wasn't until they release 4.0.0. In my comment I acknowledged the fact that it is active again, so I do not get the relevance of your last sentence.

I tested my version of the change and it seemed to work with single quotes. I personally prefer the way I've made it, but I see that officially, a double quote is the only allowed character. I'll change it.

roball’s picture

You can trust me 100% that the code you have committed does not work. Strings within the "data-setup" attribute must be in JSON (JavaScript Object Notation) format, as I already explained. JSON requires a string to be wrapped in double quotes. You have used single quotes which simply violates the specification and thus the whole string inside won't be recognized. There is no choice of preferred single/double quotes coding style - we are bound to always use double quotes for the options, and as a consequence, single quotes for the entire attribute value, so until you change it the commit will have zero effect.

Jorrit’s picture

Status: Needs work » Fixed

I have fixed the problem in 7.x-2.x and 6.x-2.x.

roball’s picture

Thanks for correcting it - now it looks and works perfectly.

roball’s picture

Title: Make the Video.js module 6.x-2.x compatible with the latest release of the Video.js library (3.2.3) » Make the Video.js module 6.x-2.x compatible with the latest 3.2.x release of the Video.js library (3.2.3)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

s/fixes/changes/