How i can resize video player during video playng , resize screen for 10 second and then return to inizial dimension . For example initial dimention 640 x 480 evry 30 second player resize automatic to 440 x 280 for 10 second and then return to 640 x 480 . Is possible with video.js ?

1 Answers

1
Pippin On

As per video.js documentation here :

The Video.js embed code is simply an HTML5 video tag, so for many of the options you can use the standard tag attributes to set the options.

Because video.js uses the standard HTML tag you can create an addEventListener based on clicking play as per the HTML5 element's standards here.

So with this understanding we can move forward to build the event listener. Tt would look something like this:

document.getElementById("video").addEventListener('play', stretch, false);

function stretch() {
        this.removeEventListener('play', stretch, false);
        document.getElementById("stretchMe").style.width="800px";

}