I am giving you a code which I found it to be very useful for you. So do have a look at the code that I have suggested here and I am sure it would be of great help for you. So do work on it and I am sure that it will give you the desired solution that you were looking for. Do try it.
Code:
<html>
<head>
<script src="VLCobject.js" type="text/javascript"></script>
<script type="text/javascript">
videoEventKey = { VOLUME_UP: 42, VOLUME_DOWN: 45 };
vlcPlayer = {
my_vlc1: null,
vlc_device1: null,
container1: null,
loadDefaultVideo:function() {
this.my_vlc1 = new VLCObject("mymovie", "640", "480", "0.8.6");
this.my_vlc1.addParam("MRL","/usr/local/media/circuit_high_120.wmv");
this.my_vlc1.write("vlccontent");
this.vlc_device1 = document.getElementById(this.my_vlc1.getAttribute('id'));
this.container1 = document.getElementById("container");
this.container1.focus();
},
// most important thing to note here
maximize_Video1:function() {
if (this.my_vlc1 != null) {
this.vlc_device1.style.width = "1288px";
this.vlc_device1.style.height = "780px";
this.container1.focus();
}
},
minimize_Video1:function() {
if (this.my_vlc1 != null) {
this.vlc_device1.style.width = "640px";
this.vlc_device1.style.height = "480px";
this.container1.focus();
}
},
eventHandler:function(ev) {
switch (ev.type) {
case 'key1down':
switch (ev.keyCode) {
case videoEventKey1.VOLUME_UP:
this.maximise_Video1();
break;
case videoEventKey1.VOLUME_DOWN:
this.minimise_Video1();
break;
}
break;
}
ev.cancelBubble = true;
}
}
</script>
<style>
.vlccontent {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
.container {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: #000;
}
</style>
</head>
<body onload="vlcPlayer.loadDefaultVideo()" onKeyDown="vlcPlayer.eventHandler(event)">
<div id="container" class="container">
<div id="vlccontent">This text is replaced by the VLC player.</div>
</div>
</body>
</html>
In case if it does not work then do let me know I will make some changes to the code and lets see whether that helps or not.
Bookmarks