-
Notifications
You must be signed in to change notification settings - Fork 26
/
example.html
40 lines (36 loc) · 1.33 KB
/
example.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
<!doctype html>
<html>
<head>
<title>Video.js logobrand example</title>
<link rel="stylesheet" href="libs/video-js/video-js.css">
<link rel="stylesheet" href="src/videojs.logobrand.css">
<script src="libs/video-js/video.js"></script>
</head>
<body>
<video src="http://vjs.zencdn.net/v/oceans.mp4" class="video-js vjs-default-skin" data-setup="{}" controls width="580" height="320"></video>
<button id="example">
Click Here
</button>
<script src="src/videojs.logobrand.js"></script>
<script>
// save a reference to the video element
video = document.querySelector('video'),
// save a reference to the video.js player for that element
player = videojs(video);
// initialize the plugin with some custom options:
player.logobrand({
//height: "32px",
//width: "32px",
image: "http://www.videojs.com/img/logo.png",
destination: "http://www.videojs.com/"
});
//player.logobrand().loadImage("http://instasynch.com/images/youtube.png");
//player.logobrand().setDestination("http://instasynch.com/images/youtube.png");
document.getElementById("example").onclick = function(){
player.logobrand().loadImage("http://instasynch.com/images/logoNoBG.png");
player.logobrand().setDestination("http://instasynch.com");
this.innerHTML = "Image+destination changed!";
};
</script>
</body>
</html>