I am curently working on a HTML5 video Plugin and below is my code and trying to work with custom controls.
The problem is I am having a fullscreen button when I click it the video needs to change it to Fullscreen mode.I am able to get it worked in chrome but not in IE and Firefox.
function addvideo() {
var addvideo = $('<canvas id="canvas" height="468" width="560"></canvas><div class="videocontainer"><video id="video1"><source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv" type="video/ogg; codecs="theora, vorbis""><source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" type="video/mp4; codecs="avc1.42E01E, mp4a.40.2""><source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv" type="video/ogg; codecs="theora, vorbis""><source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm type="video/WebM; codecs="vp8, vorbis""></video></div>');
$(addvideo).appendTo('#video');
}
function addcontrols() {
var controls = $('<table><tr class="controls"><td id="playbtn" class="playbtn" title="Play/Pause"><td id="elapsedtimer" class="elapsedtimer">00:00</td><td id="videoslider" class="videoslider"></td><td id="totaltimer" class="totaltimer">00:00</td><td class="HD"></td><td class="fullscreen"></td><td><td id="volumeslider" class="volumeslider"></td><td class="volumeon" title="Mute/Unmute"></td></tr></table>');
$(controls).appendTo('#controlspane');
}
This is the function for Fullscreen Mode:
$('.fullscreen').on('click', function() {
$('#video1').get(0).webkitEnterFullscreen();
$('#video1').get(0).mozRequestFullScreen();
return false;
});
Can anyone suggest me how do I modify this in order to achieve my goal?