-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (99 loc) · 3.33 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Video Player</title>
<!-- Import Video.js CSS -->
<link href="https://vjs.zencdn.net/8.0.4/video-js.css" rel="stylesheet" />
<style>
/* Reset margin and padding on all elements */
* {
margin: 0;
padding: 0;
}
/* Set the video player to full width and height */
.video-container {
position: relative;
width: 100vw;
height: 100vh;
}
/* Set the video element to fill the container */
#my-video {
width: 100%;
height: 100%;
}
/* Position the links container at the top of the video */
.links-container {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
padding: 1rem;
margin-top:1rem;
background: rgba(0, 0, 0, 0.7);
border-radius: 1rem;
}
/* Remove bullets from the links list */
.links-list {
list-style-type: none;
margin: 0;
padding: 0;
}
/* Display links horizontally */
.links-list li {
display: inline-block;
margin-right: 1rem;
}
/* Style the links */
.link-style {
font-size: 2.5rem;
text-decoration: none;
color: white;
font-weight: bold;
}
</style>
</head>
<body>
<div class="video-container">
<!-- Video element -->
<video id="my-video" class="video-js" controls preload="auto"
data-setup='{}'>
<source src="https://addy.gooick.com/bd/main/output.m3u8" type="application/x-mpegURL">
</video>
<!-- Links container -->
<div class="links-container">
<ul class="links-list">
<li><a href="#" data-feed-link="https://addy.gooick.com/sd/main/output.m3u8" class="link-style">
<img src="assets/images/Flag-saudi-arabia.png" width="50" alt="Saudi "> Departure</a></li>
<li><a href="#" data-feed-link="https://addy.gooick.com/sa/main/output.m3u8" class="link-style">
<img src="assets/images/Flag-saudi-arabia.png" width="50" alt="Saudi "> Arrival</a></li>
<br />
<br />
<li><a href="#" data-feed-link="https://addy.gooick.com/bd/main/output.m3u8" class="link-style">
<img src="assets/images/Flag-Bahrain.png" width="50" alt="Bahrain "> Departure</a></li>
<li><a href="#" data-feed-link="https://addy.gooick.com/ba/main/output.m3u8" class="link-style">
<img src="assets/images/Flag-Bahrain.png" width="50" alt="Bahrain "> Arrival</a></li>
</ul>
</div>
</div>
<!-- Import Video.js JS -->
<script src="https://vjs.zencdn.net/8.0.4/video.min.js"></script>
<script>
// Set autoplay and muted options for the player
var options = {
autoplay: true,
muted: true
};
// Initialize the video player
var player = videojs('my-video', options);
// Add click event listener to links
var links = document.querySelectorAll('.link-style');
links.forEach(function(link) {
link.addEventListener('click', function(event) {
event.preventDefault();
var feedLink = this.dataset.feedLink;
player.src(feedLink);
});
});
</script>
</body>