Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Video: Overriding fullscreen

In HTML5, when I click the fullscreen button, is there an event fired I could listen to or a method I could override to change functionality?

I want my player to increase/decrease in size according to predefined values on clicking the button, instead of going fullscreen.

My project uses js, jquery and backbone

like image 987
Snowman Avatar asked Dec 06 '25 07:12

Snowman


1 Answers

In html5 there is no option to have resize or customize the video tag

Instead of this you can use JPlayer plugin which you can customize your screen to play your videos without any flaws

http://www.jplayer.org/latest/quick-start-guide/

$("#jquery_jplayer_1").jPlayer({

    ready: function(){
        $(this).jPlayer("setMedia", {
        m4v:"http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v"
    }).jPlayer("play");
    },
    ended: function(){
        $(this).jPlayer("play");
    },
    swfPath: "../../common/assets/jplayer/js",
        supplied: "m4v",
    size: {
        width: "400px",
        height: "30px"
     }

});

like image 51
Anand Avatar answered Dec 08 '25 20:12

Anand