-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
36 lines (22 loc) · 711 Bytes
/
main.js
File metadata and controls
36 lines (22 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
window.onload = function() {
var video = document.querySelector('video');
var video2 = $('.vjs-tech').get(0);
document.body.addEventListener('touchend', function(event){
if(event.target.className == 'vjs-tech'){
if(video2.paused){
video2.play();
} else if(!video2.paused){
video2.pause();
};
};
});
video2.addEventListener('pause', function(){
$('.vjs-big-play-button').show();
});
video2.addEventListener('play', function(){
$('.vjs-big-play-button').hide();
});
video2.addEventListener('ended', function(){
$('.vjs-big-play-button').show();
});
};