-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
49 lines (46 loc) · 1.71 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Set hyperlink on video overlays using video.js | Demo</title>
<!-- CSS for video.js and other handles styling and positioning of the overlays. -->
<link href="css/video-js.css" rel="stylesheet">
<link href="css/videojs-overlay-hyperlink.css" rel="stylesheet">
</head>
<body>
<!-- Here you can choose to customize the video player's skin and provide the source for your video playback. -->
<video id="videojs-overlay-player" class="video-js vjs-default-skin" controls>
<source src="video/oceans.mp4" type='video/mp4'>
</video>
<!-- video.js for achieveing core functionality and other js file to handle overlay behaviour -->
<script src="js/video.js"></script>
<script src="js/videojs-overlay-hyperlink.js"></script>
<!-- TARGET hyperlink -->
<script type='text/javascript'>
var yourLink = "https://www.google.com/search?q=documentaries+on+oceans";
</script>
<!-- js for serving the title and positioning of the hyperlink, you can also leverage 'align' option to set it the desired position, see the style sheets for more options -->
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-overlay-player');
player.overlay({
content: '<a href=# onclick="location.href=yourLink;return false;">Checkout More Documentaries on Oceans</a>',
debug: true,
overlays: [{
start: 0,
end: 15,
align: 'bottom-left'
}, {
start: 15,
end: 30,
align: 'bottom'
}, {
start: 30,
end: 45,
align: 'bottom-right'
}]
});
}(window, window.videojs));
</script>
</body>
</html>