Sha256: 7051822910a74e9fc5029687e3f1ff0ecd8944a1c30e55dfaa6419a019a13a2a

Contents?: true

Size: 1.25 KB

Versions: 47

Compression:

Stored size: 1.25 KB

Contents

//= require social_stream.timeline

SocialStream.Video = (function(SS, $, undefined){
  var initJplayer = function(){
    $(".jp-video .jp-jplayer").each(function() {
      $(this).jPlayer({
        ready: function () {
          $(this).jPlayer("setMedia", {
            webmv: $(this).closest(".video").find(".video-webm").attr("href"), // Defines the webm url
            flv: $(this).closest(".video").find(".video-flv").attr("href"), // Defines the flv url
            mp4: $(this).closest(".video").find(".video-mp4").attr("href") // Defines the mp4 url
          });
        },
      solution:"flash, html",
      preload: "none",
      supplied: "webmv, flv, mp4",
      swfPath: "<%= asset_path "" %>",
      cssSelectorAncestor: "#" + $(this).closest(".video-full").attr("id")
      })
    });

    $(".video-format-links").hide();
    $(".video-full").hide();

    $(".video_thumbnail_play_over").click(function(){
      var video = $(this).closest(".video")
      video.find(".video-thumb").hide();
      video.find(".video-details").hide();
      video.find(".jp-video-play").hide();
      video.find(".video-full").show();
    video.find(".jp-jplayer").jPlayer("play", 0);
    });

  }

  SocialStream.Timeline.addInitCallback(initJplayer);


})(SocialStream, jQuery);

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
social_stream-1.1.12 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-documents-1.1.4 app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.11 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-documents-1.1.3 app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.10 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-documents-1.1.2 app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.9 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.8 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.7 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.6 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.5 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.4 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-documents-1.1.1 app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.3 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.2 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.1 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-1.1.0 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-documents-1.1.0 app/assets/javascripts/social_stream.video.js.erb
social_stream-1.0.1 documents/app/assets/javascripts/social_stream.video.js.erb
social_stream-documents-1.0.0 app/assets/javascripts/social_stream.video.js.erb