Hello,

I'm loading content with video using Drupal 7 AJAX Framework.
In the FF and Chrome all working as expected.
But in the IE all added video.js elements come unstyled.
It appears, that something wrong with injected style definition in the head tag:
the first item in the head is empty DIV
and then

@import url( http://localhost/chilibrand/sites/all/libraries/video-js/video-js.min.css?m23y2m );

Thank you!

CommentFileSizeAuthor
#4 playbutton.jpg14.38 KBnicolant
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

Could you give me steps to reproduce this? How are you invoking Video.js using AJAX? Can I see this behavior on an internet site?

nicolant’s picture

Sorry for delay.

You can see it in action: http://nciolant.co.cc

Video.js seems to invoke automatically. I load content via custom module:

function test_menu() {
  $items['ajaxvideos']=array();
  $items['ajaxvideos']['access callback']=TRUE;
  $items['ajaxvideos']['page callback']='test_quickview';
  $items['ajaxvideos']['type']=MENU_CALLBACK;
  $items['ajaxvideos']['page arguments']=array();
  return $items;
}


function test_quickview($mode=NULL) {
  $output = views_page('videos','videos');
  
  $commands = array();
  $commands[] = ajax_command_html('div#content', $output);

  ajax_deliver(array('#type'=>'ajax','#commands'=>$commands));
}

function test_init() {
  drupal_add_library('system', 'drupal.ajax');
}
Jorrit’s picture

This seems to be a Drupal Ajax / IE issue (#1071818: Lazy-loading CSS fails in IE, #1031600: AJAX requests cause duplicate, invalid CSS includes and multi-nested response data output).

My recommendation is to add videojs_add(); to the page that contains the link. It is less optimal than including the js and css only when the view is opened, but it should work around this issue.

nicolant’s picture

FileSize
14.38 KB

Thank you. After I've added videojs_add():

function test_init() {
  drupal_add_library('system', 'drupal.ajax');
  videojs_add();
}

, it looks almost goot in IE9, except slightly weird layering of images:
screenshot.

But in IE7 and IE8 (IETester), only big play button is visible, and it isn't respond to mouse clicks...

Jorrit’s picture

These seem to be Video.js issues. Perhaps you can post them at http://videojs.com/. I think that you will get a more accurate response there. I think Video.js hasn't been tested with this Ajax scenario yet. When I look into the IE console log (F12), there are some errors related to Flash not having a source parameter.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
Jorrit’s picture

Issue summary: View changes

Just for being more polite :-)