-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheasy.html
181 lines (152 loc) · 6.23 KB
/
easy.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!doctype html>
<html>
<head>
<title>Custom Jwplayer</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style type="text/css">
#easy
{
margin-top: 10px;
}
.row
{
margin-top: 50px;
}
.btn-outline-primary
{
width: 140px;
}
.btn-outline-default
{
width: 180px;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-6" >
<div id="easy">
Loading the player...
</div>
</div>
</div>
<script type="text/javascript" src="jwplayer.js"></script>
<script type="text/javascript">
jwplayer.key = "iZaBV7cW7mBl61yIWCTK3IUeA1jqZjIUo28r0w==";
var playerInstance = jwplayer("easy");
playerInstance.setup({
"hlshtml": true,
"seek" : 20,
"image" : "src/image/preview.png",
"volume" : 100,
"width" : 700,
"height" : 400,
"mute" : true,
"aspectratio": '16:9',
"sharing" : {
"sites": [
{ icon : 'src/image/face.png', src: function() { window.open('https://www.facebook.com')}},
{ icon : 'src/image/linkedin1.png', src: function() { window.open('https://www.linkedin.com')}},
{ icon : 'src/image/twitter.png', src: function() { window.open('https://twitter.com')}}
]
},
// "logo":
// {
// "file": 'src/image/logo.png',
// "margin": 15,
// "position": 'bottom-left',
// },
"sources":
[
{
"file": "https://s3.ap-south-1.amazonaws.com/teampondy/jwplayer/1.mp4",
"label": "720p"
},
{
"file": "https://s3.ap-south-1.amazonaws.com/teampondy/jwplayer/2.mp4",
"label": "360p"
},
{
"file": "https://s3.ap-south-1.amazonaws.com/teampondy/jwplayer/2.mp4",
"label": "240p"
}
]
});
// adding slow motion button
var videoTag;
var currentRate = 1;
jwplayer().onReady(function() {
if (jwplayer().getRenderingMode() == "html5"){
videoTag = document.querySelector('video');
if(videoTag.playbackRate) {
jwplayer().addButton("src/image/time.ico","Toggle Slow Motion",
toggleSlomo,"slomo");
}
}
});
function toggleSlomo() {
currentRate == 1 ? currentRate = 0.2: currentRate = 1;
videoTag.playbackRate = currentRate;
videoTag.defaultPlaybackRate = currentRate;
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){
jwplayer().seek(jwplayer().getPosition());
}
};
// adding download button
jwplayer().addButton(
"src/image/download.ico","Download Video",
function() {
window.location.href =jwplayer().getPlaylistItem()['file'];
},
"download"
);
</script>
<script type="text/javascript" src="player.js"></script>
<div class="row">
<div class="col-lg-2">
<button type="button" class="btn btn-outline-primary" id="get-quality">Quality</button><br><br>
<button type="button" class="btn btn-outline-primary" id="set-quality">Set Quality</button><br><br>
<button type="button" class="btn btn-outline-primary" id="get-current-volume">Volume</button><br><br>
<button type="button" class="btn btn-outline-primary" id="set-volume">Set Volume</button><br><br>
<button type="button" class="btn btn-outline-primary" id="get-duration">Current Duration</button><br><br>
<button type="button" class="btn btn-outline-primary" id="get-current-status">Status</button><br><br>
</div>
<!-- <div class="row"> -->
<div class="col-lg-2">
<button type="button" class="btn btn-outline-default" id="quality">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="quality1">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="vol">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="vol1">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="dur">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="sta" >------</button><br><br>
</div>
<!-- <div class="row"> -->
<div class="col-lg-2">
<button type="button" class="btn btn-outline-default" id="mute">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="mute1">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="mute2">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="pa">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="pl">------</button><br><br>
<button type="button" class="btn btn-outline-default" id="st">------</button><br><br>
</div>
<!-- <div class="row"> -->
<div class="col-lg-2">
<button type="button" class="btn btn-outline-primary" id="get-mute-status">Mute Status</button><br><br>
<button type="button" class="btn btn-outline-primary" id="mute-on">Mute ON</button><br><br>
<button type="button" class="btn btn-outline-primary" id="mute-off">Mute OFF</button><br><br>
<button type="button" class="btn btn-outline-primary" id="pause">pause</button><br><br>
<button type="button" class="btn btn-outline-primary" id="play">Play</button><br><br>
<button type="button" class="btn btn-outline-primary" id="stop">Stop</button><br><
</div>
</div>
</div>
</div>
</body>
</html>