Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | videojs-2007342-D6.patch | 1.2 KB | roball |
video-js-3.2.3.zip | 85.77 KB | roball |
Comments
Comment #0.0
roball CreditAttribution: roball commentedtypo fixed
Comment #1
roball CreditAttribution: roball commentedIt 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.
Comment #2
roball CreditAttribution: roball commentedThe 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.
Comment #3
Jorrit CreditAttribution: Jorrit commentedI'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.
Comment #4
roball CreditAttribution: roball commentedThank 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:
and NOT
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
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.
Comment #5
Jorrit CreditAttribution: Jorrit commentedI 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.
Comment #6
roball CreditAttribution: roball commentedYou 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.
Comment #7
Jorrit CreditAttribution: Jorrit commentedI have fixed the problem in 7.x-2.x and 6.x-2.x.
Comment #8
roball CreditAttribution: roball commentedThanks for correcting it - now it looks and works perfectly.
Comment #9
roball CreditAttribution: roball commentedComment #10.0
(not verified) CreditAttribution: commenteds/fixes/changes/