Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Karwacik
website
Commits
d72f7f4b
Commit
d72f7f4b
authored
Dec 11, 2019
by
Roman Sebastian Karwacik
Browse files
Double tap to seek +-15s
parent
19ecc210
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
static/hammer.min.js
0 → 100644
View file @
d72f7f4b
This diff is collapsed.
Click to expand it.
templates/base.html
View file @
d72f7f4b
...
...
@@ -37,6 +37,7 @@
<script
src=
"{{url_for('static', filename='videojs/videojs-resolution-switcher.js')}}"
></script>
<script
src=
"{{url_for('static', filename='videojs/videojs.hotkeys.js')}}"
></script>
<script
src=
"{{url_for('static', filename='videojs/videojs-markers.js')}}"
></script>
<script
src=
"{{url_for('static', filename='hammer.min.js')}}"
></script>
{% endblock %}
</head>
<body>
...
...
templates/macros.html
View file @
d72f7f4b
...
...
@@ -64,6 +64,24 @@
$
(
function
()
{
$
(
'
#videoplayer
'
).
addClass
(
"
vjs-fluid
"
);
$
(
'
#videoplayer
'
).
css
(
"
width
"
);
var
videoobj
=
document
.
getElementById
(
"
videoplayer
"
);
var
player
=
videojs
(
"
videoplayer
"
);
var
manager
=
new
Hammer
.
Manager
(
videoobj
);
var
DoubleTap
=
new
Hammer
.
Tap
({
event
:
'
doubletap
'
,
taps
:
2
});
manager
.
add
(
DoubleTap
);
manager
.
on
(
'
doubletap
'
,
function
(
e
)
{
if
(
e
.
center
.
x
<
(
e
.
target
.
clientWidth
/
2
))
{
player
.
currentTime
(
player
.
currentTime
()
-
15
);
}
else
{
player
.
currentTime
(
player
.
currentTime
()
+
15
);
}
});
videojs
(
"
videoplayer
"
).
ready
(
function
()
{
//resume
var
progress_key
=
"
progress_{{ lecture.id }}
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment