Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Video AG Infrastruktur
website
Commits
d0c6f1a5
Commit
d0c6f1a5
authored
8 years ago
by
Julian Rother
Browse files
Options
Downloads
Patches
Plain Diff
Parametrized play page
parent
cecc586f
Branches
Branches containing commit
No related tags found
Loading
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
server.py
+8
-2
8 additions, 2 deletions
server.py
templates/macros.html
+2
-2
2 additions, 2 deletions
templates/macros.html
templates/play.html
+1
-1
1 addition, 1 deletion
templates/play.html
with
11 additions
and
5 deletions
server.py
+
8
−
2
View file @
d0c6f1a5
#!/bin/python
#!/bin/python
from
flask
import
Flask
,
render_template
,
g
from
flask
import
Flask
,
render_template
,
g
,
request
,
url_for
,
redirect
import
mysql.connector
import
mysql.connector
import
sqlite3
import
sqlite3
import
os
import
os
...
@@ -77,7 +77,13 @@ def faq():
...
@@ -77,7 +77,13 @@ def faq():
@app.route
(
'
/play
'
)
@app.route
(
'
/play
'
)
def
play
():
def
play
():
return
render_template
(
'
play.html
'
,
active_page
=
'
play
'
)
if
'
lectureid
'
in
request
.
args
:
id
=
request
.
args
[
'
lectureid
'
]
return
render_template
(
'
play.html
'
,
lecture
=
query
(
'
SELECT * FROM lectures WHERE id = ?
'
,
id
)[
0
],
videos
=
query
(
'
SELECT * FROM videos WHERE lecture_id = ?
'
,
id
))
else
:
return
redirect
(
url_for
(
index
))
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
app
.
run
()
app
.
run
()
This diff is collapsed.
Click to expand it.
templates/macros.html
+
2
−
2
View file @
d0c6f1a5
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
{% endmacro %}
{% endmacro %}
{% macro player() %}
{% 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: 80%;"
>
<source
type=
"video/mp4"
src=
"https://videoag.fsmpi.rwth-aachen.de/
pub/16ss-dsal/16ss-dsal-160715-720p_1.mp4
"
/>
<source
type=
"video/mp4"
src=
"https://videoag.fsmpi.rwth-aachen.de/
{{ videos[0]['path'] }}
"
/>
</video>
</video>
{% endmacro %}
{% endmacro %}
This diff is collapsed.
Click to expand it.
templates/play.html
+
1
−
1
View file @
d0c6f1a5
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
{% extends "base.html" %}
{% extends "base.html" %}
{% block content %}
{% block content %}
<div>
<div>
{{ player() }}
{{ player(
lecture, videos
) }}
</div>
</div>
{% endblock %}
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment