Skip to content
Snippets Groups Projects
Commit a02a8f4f authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

add video and audio visualization in learning object show

parent eb0e2a73
No related branches found
No related tags found
No related merge requests found
......@@ -87,9 +87,24 @@ $background-grey: #e7e7e8;
}
.learning-object {
.thumbnail {
.view {
width: 530px;
height: 298px;
audio {
width: inherit;
position: relative;
top: 50%;
transform: translateY(-50%);
}
img {
width: inherit;
height: inherit;
border: 0;
}
video {
width: inherit;
height: inherit;
}
}
.stats {
text-align: right;
......
......@@ -25,7 +25,15 @@
<div class="row learning-object">
<div class="col-md-7">
<%= learning_object_thumbnail @learning_object, "large" %>
<div class="view">
<%=
case @learning_object.type
when 'Áudio' then audio_tag(@learning_object.get_retrievelink, controls: true)
when 'Vídeo' then video_tag(@learning_object.get_retrievelink, controls: true, autobuffer: true, poster: @learning_object.thumbnail)
else learning_object_thumbnail @learning_object, "large"
end
%>
</div>
<div class="pull-right" style="padding-right:122px">
<span class="glyphicon glyphicon-eye-open"><%= @learning_object.views %>&nbsp;</span>
<span class="glyphicon glyphicon-star"><%= @learning_object.likes %>&nbsp;</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment