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 playback working fine in Firefox and Chrome.
When I'm trying to use the videojs() function in my theme I get the Uncaught TypeError: The element or ID supplied is not valid. (videojs) javascript error but only in Chrome.
The following code works flawlessly in Firefox nut not in Chrome:
(function ($) {
Drupal.behaviors.tmop = {
attach: function (context, settings) {
var video = videojs("videojs-12-field-video-video_html5_api").ready(function(){
var player = this;
console.log(player);
});
}
};
})(jQuery);
Comments
Comment #1
docker CreditAttribution: docker commentedI had an error in DOM.