javascript - Firefox 3.6 video full screen control -


firefox supports full screen mode on video html5 tag. ( right click on movie .. )

is there way create control ( html tag ) play/pause example ( using js ) ?

<script> function play(){ var video = document.getelementbyid('movie'); var play =  document.getelementbyid('play');  play.addeventlistener('click',playcontrol,false); function playcontrol() {     if (video.paused == false) {         video.pause();     this.firstchild.nodevalue = 'play';     pausecount(); } else {     video.play();     this.firstchild.nodevalue = 'pause';     startcount(); } } } 

basically need creating function (triggered fullscreen button) in assign position: absolute, , higher z-index video wrapper

the assign both video , video wrapper width , height : 100% (or fixed size if prefer)

probably best way achieve behaviour defining class (e.g. fullscreen) , assign container, like

.fullscreen {    position : absolute;    z-index  : 1000;    width    : 100%;    height   : 100%;    top      : 0;    left     : 0; }  .fullscreen video {    width    : 100%;    height   : 100%; } 

so function call (fullscreen/normal view) switch .fullscreen class.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -