Skip to content
Snippets Groups Projects
Commit 29eab38e authored by Andreas Valder's avatar Andreas Valder
Browse files

made the player look better

parent 289fdcdb
No related branches found
No related tags found
No related merge requests found
.videopreview li:nth-child(even) { background: #f5f5f5; } .videopreview li:nth-child(even) { background: #f5f5f5; }
.courses-list li:nth-child(even) { background: #fAfAfA; } .courses-list li:nth-child(even) { background: #fAfAfA; }
.mejs-container { height: 80% !important; width: 100% !important; position: fixed !important; }
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
{% macro player(lecture, videos) %} {% macro player(lecture, videos) %}
<script src="static/mediaelementjs/mediaelement-and-player.min.js"></script> <script src="static/mediaelementjs/mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="static/mediaelementjs/mediaelementplayer.css" /> <link rel="stylesheet" href="static/mediaelementjs/mediaelementplayer.css" />
<video class="mejs-player" width="640" height="360" style="width: 100%; height: 80%;"> <video class="mejs-player" width="640" height="360" style="width: 100%; height: 100%;">
<source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ videos[0]['path'] }}" /> <source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ videos[0]['path'] }}" />
</video> </video>
<script> <script>
...@@ -104,6 +104,22 @@ ...@@ -104,6 +104,22 @@
</noscript> </noscript>
{% endmacro %} {% endmacro %}
{%macro video_embed_btn(lectureid) %}
<a class="btn btn-default" id="embedcodebtn" data-container="body" data-toggle="popover" data-placement="bottom">
<span>Einbetten</span>
</a>
<script>
{% set embedcode = '<iframe width="700" height="394" src="https://videoag.fsmpi.rwth-aachen.de/site/embed.php?lecture='+lectureid|string+'" frameborder="0" allowfullscreen="true"></iframe>' %}
$('#embedcodebtn').popover(
{
html:true,
title:'Einbettcode',
content:'<span><input type="text" onclick="this.select()" value="{{embedcode}}"></span>'
}
)
</script>
{% endmacro %}
{% macro lecture_list_item(lecture,videos) %} {% macro lecture_list_item(lecture,videos) %}
<li class="list-group-item"> <li class="list-group-item">
<div class="row"> <div class="row">
......
{% from 'macros.html' import player %} {% from 'macros.html' import player %}
{% from 'macros.html' import video_download_btn %}
{% from 'macros.html' import video_embed_btn %}
{% set page_border = 0 -%} {% set page_border = 0 -%}
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h1 class="panel-title">{{ course.title }}: {{ lecture.title}}</h1> <h1 class="panel-title"><strong>{{ course.title }}</strong>: {{ lecture.title}}</h1>
</div> </div>
<div class="row panel-body"> <div class="panel-body">
{{ player(lecture, videos) }} <p class="col-xs-12" style="padding: 0px;">
<span><a href="/course?courseid={{course.handle}}" class="btn btn-default" >Zur Veranstaltungsseite</a><span>
<span class="pull-right">
<span>{{ video_embed_btn(lecture.id) }}</span>
<span>{{video_download_btn(videos)}}</span>
</span>
</p>
<div class="row">
<div class="col-xs-12">
{{ player(lecture, videos) }}
</div>
</div>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment