Sha256: 95e0ec950419bb6a1c717480e71394e69a420fe537fc4a76e5a04bfffc318810

Contents?: true

Size: 695 Bytes

Versions: 11

Compression:

Stored size: 695 Bytes

Contents

pageflow.videoHelpers = {
  updateVideoTagForHighBandwidth: function(video) {
    if (pageflow.features.has('high bandwidth') && !pageflow.features.has('mobile platform')) {
      video.attr('poster', video.attr('data-large-poster'));

      if (pageflow.features.has('rewrite video sources support')) {
        video.find('source').each(function() {
          var source = $(this);
          source.attr('src', source.attr('data-high-src'));
        });
      }
    }
    else {
      video.attr('poster', video.attr('data-poster'));
    }
  },

  updateVideoPoster: function(pageElement, imageUrl) {
    pageElement.find('.vjs-poster').css('background-image', 'url(' + imageUrl + ')');
  }
};

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pageflow-0.5.0 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.4.0 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.3.0 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.2.1 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.2.0 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.1.0 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.0.5 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.0.4 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.0.3 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.0.2 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js
pageflow-0.0.1 app/assets/javascripts/pageflow/page_types/mixins/video_helpers.js