Sha256: aab9f286bf7709be4a43170be9df1b13b83cbf7d8ff9bf3df5c080c7cf759608

Contents?: true

Size: 1.33 KB

Versions: 54

Compression:

Stored size: 1.33 KB

Contents

/**
 * Video and audio wrapper.
 *
 * @author Htmlstream
 * @version 1.0
 * @requires
 *
 */
;(function ($) {
  'use strict';

  $.HSCore.components.HSVideoAudio = {
    /**
     *
     *
     * @var Object _baseConfig
     */
    _baseConfig: {},

    /**
     *
     *
     * @var jQuery pageCollection
     */
    pageCollection: $(),

    /**
     * Initialization of Video and audio wrapper.
     *
     * @param String selector (optional)
     * @param Object config (optional)
     *
     * @return jQuery pageCollection - collection of initialized items.
     */

    init: function (selector, config) {

      this.collection = selector && $(selector).length ? $(selector) : $();
      if (!$(selector).length) return;

      this.config = config && $.isPlainObject(config) ?
          $.extend({}, this._baseConfig, config) : this._baseConfig;

      this.config.itemSelector = selector;

      this.initVideoAudio();

      return this.pageCollection;

    },

    initVideoAudio: function () {
      //Variables
      var $self = this,
          collection = $self.pageCollection;

      //Actions
      this.collection.each(function (i, el) {
        //Variables
        var $videoAudio = el;

        plyr.setup($videoAudio);

        //Add object to collection
        collection = collection.add($videoAudio);
      });
    }
  }

})(jQuery);

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
jekyll-theme-glueckkanja-1.0.2 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-1.0.1 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-1.0 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.9 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.8 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.7 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.6 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.5 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.4 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.3 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.2 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.1 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.9.0 assets/js/components/hs.video-audio.js
jekyll-theme-glueckkanja-0.8.5 assets/js/components/hs.video-audio.js