-
Notifications
You must be signed in to change notification settings - Fork 3
/
videojs.html
91 lines (85 loc) · 3.37 KB
/
videojs.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0, user-scalable=yes">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> VideoJS </title>
<link href="css/video-js.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="http://vjs.zencdn.net/5-unsafe/video.js"></script>
<script src="js/videojs.watermark.js"></script>
</head>
<body>
<div class="col-xs-12" style="max-width:490px !important; padding-top: 20px; margin:0 auto;">
<div class="videocontent">
<video id="video_1" class="video-js vjs-fluid vjs-big-play-centered" poster='http://cdn.static.tuoitre.vn/i/s639/2016/10/pZePEXSf.jpg'>
<source src="http://cdn.static.tuoitre.vn/2016/10/BnUCSYon.mp4" type='video/mp4' />
</video>
</div>
</div>
<div class="col-xs-12" style="max-width:490px !important; padding-top: 20px; margin:0 auto;">
<div class="videocontent">
<video id="video_2" class="video-js vjs-fluid vjs-big-play-centered" poster='http://cdn.static.tuoitre.vn/i/s639/2016/12/oAf9aPZY.jpg'>
<source src="http://cdn.static.tuoitre.vn/2016/10/BnUCSYon.mp4" type='video/mp4' />
</video>
</div>
</div>
<script>
videojs("video_1", {
aspectRatio: "16:9",
controls: true,
autoplay: false,
preload: "auto",
fluid: true
}, function() {
this.on("pause", function() {
$("#video_1 .vjs-big-play-button").show();
});
this.on("play", function() {
$("#video_1 .vjs-big-play-button").hide();
});
}).watermark({
file: 'http://static.new.tuoitre.vn/tto/i/s626/2016/08/29/logo-100-1472460407.png',
xpos: 100,
ypos: 0,
url: 'http://tuoitre.vn/'
});
videojs("video_2", {
aspectRatio: "16:9",
controls: true,
autoplay: false,
preload: "auto",
fluid: true
}, function() {
this.on("pause", function() {
$("#video_2 .vjs-big-play-button").show();
});
this.on("play", function() {
$("#video_2 .vjs-big-play-button").hide();
});
}).watermark({
file: 'http://static.new.tuoitre.vn/tto/i/s626/2016/08/29/logo-100-1472460407.png',
xpos: 100,
ypos: 0,
url: 'http://tuoitre.vn/'
});
$("#video_1").bind("contextmenu", function(event) {
if ($(".videojs-rightclick").length) $("div.videojs-rightclick").remove();
event.preventDefault();
$('<div class="videojs-rightclick"><a href="http://tuoitre.vn">© Copyright 2016 vietdien2005</a></div>').appendTo("body").css({
top: event.pageY + "px",
left: event.pageX + "px"
});
}).bind("click", function(event) {
$("div.videojs-rightclick").remove();
});
$(document).on("click", function(event) {
$("div.videojs-rightclick").remove();
});
</script>
</body>
</html>