I am making an HTML5 video player with custom controls. You can see it in THIS jsFiddle.
The HTML is "classic":
<div class="video-container">
<video poster="http://code-love.me/video/posters/flamenco.jpg">
<source src="http://code-love.me/video/videos/flamenco.mp4" type="video/mp4" />
<source src="http://code-love.me/video/videos/flamenco.ogg" type="video/ogg" />
</video>
<div class="controls-wrapper">
<div class="progress-bar">
<div class="progress"></div>
</div>
<ul class="video-controls">
<li><input type="button" name="play-pause" value="Play" class="play"></li>
<li class="fullscreen-container"><input type="button" name="toggle-fullscreen" value="Fullscreen" class="fullscreen"></li>
</ul>
</div>
</div>
I have a full screen function that I call upon 2 events: clicking the full screen button and pressing Esc key.
Clicking the full screen button toggles full-screen mode ok, but I can't see why using the key does not. After all , it's the same function....
Any hints? Ty!