diff --git a/static/style.css b/static/style.css index 3a3885dd0ec3ecad5a5f5256191a0d27bd243c1d..5b9fa143fdef66ad290717e38b853a917f9410ef 100644 --- a/static/style.css +++ b/static/style.css @@ -1,3 +1,2 @@ .videopreview li:nth-child(even) { background: #f5f5f5; } .courses-list li:nth-child(even) { background: #fAfAfA; } -.mejs-container { height: 80% !important; width: 100% !important; position: fixed !important; } diff --git a/templates/macros.html b/templates/macros.html index 8604656a3f3a399f509d47cd4143899188ba303a..6ad4ccf0e04dd08661767d221394f1b80421990b 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -52,7 +52,7 @@ {% macro player(lecture, videos) %} <script src="static/mediaelementjs/mediaelement-and-player.min.js"></script> <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'] }}" /> </video> <script> @@ -104,6 +104,22 @@ </noscript> {% 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) %} <li class="list-group-item"> <div class="row"> diff --git a/templates/play.html b/templates/play.html index 3b74c9c2b2e62616511793b8f2aa2c940f50bb8c..76eef7746367b395e76edc1d165bba3d02f36e2d 100644 --- a/templates/play.html +++ b/templates/play.html @@ -1,14 +1,27 @@ {% from 'macros.html' import player %} +{% from 'macros.html' import video_download_btn %} +{% from 'macros.html' import video_embed_btn %} {% set page_border = 0 -%} {% extends "base.html" %} {% block content %} <div class="panel panel-default"> <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 class="row panel-body"> - {{ player(lecture, videos) }} + <div class="panel-body"> + <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>