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

docker’s picture

Status: Active » Closed (works as designed)

I had an error in DOM.