Skip to content

Instantly share code, notes, and snippets.

@tkiefhaber
Last active August 29, 2015 14:05
Show Gist options
  • Save tkiefhaber/ae4e22eda6e95a282a5f to your computer and use it in GitHub Desktop.
Save tkiefhaber/ae4e22eda6e95a282a5f to your computer and use it in GitHub Desktop.
<div class='row col-sm-12'>
<% version.comments.each do |comment| %>
<script>
Popcorn.player("baseplayer");
var popcorn = Popcorn( "#video-<%= version.id %>" );
popcorn.footnote({
start: <%= comment.start_time %>,
end: <%= comment.start_time + 5 %>,
target: "footer-<%= version.id %>",
text: "<h3><%= comment.text %></h3><h6><%= comment.user.username %></h6>"
});
</script>
<% end %>
<div class='row col-sm-12'>
<div class='col-sm-10'>
<%= video_tag(version.file.url, id: "video-#{version.id}", controls: true, autobuffer: true, width: '100%' ) if version.file.present? %>
</div>
<div class='col-sm-2' id="footer-<%= version.id %>"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment