-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideoB.js
44 lines (38 loc) · 1.26 KB
/
videoB.js
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
videojs("my-video",{
plugins:{
addMenu:{
video_id:'my-video',
action1:'action1()',
action2:'action2()',
action3:'action3()',
nameOfButton1:"Action1",
nameOfButton2:"Action2",
nameOfButton3:"Action3"
}
},playbackRates:[.5,.75,1,2,3,4]
});
//Show Custom alert
var alrt=document.createElement("div");
alrt.id="alertBox";
document.getElementsByTagName("body")[0].appendChild(alrt);
function alertShow(title,description){
setTimeout(function(){document.getElementById("alertBox").innerHTML
=`` }, 2000);
document.getElementById("alertBox").innerHTML
=`
<div id="alrt"class="alert alert-success alert-dismissible fade show" role="alert">
<strong>${title}</strong> ${description}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>`
}
function action1(){
alertShow("Action-1","Has been Performed")
}
function action2(){
alertShow("Action-2","Has been Performed")
}
function action3(){
alertShow("Action-3","Has been Performed")
}