Mediaelement.js - Video scaling options (for example, "fit" or "fill")

Does anyone know a way to scale the video inside the MEJS player so that the player processes any mailboxes or columns? Just like JWPlayer has the options "fit" and "fill".

Essentially, I have a player who lives in a shell, and I resize the wrapper to fit the user's screen resolution. For instance:

<div id="video_dims_wrapper" style="width: 1280px; height: 720px;">
    <video id="video_player" width="1280" height="720" controls="controls" preload="none" autoplay="autoplay" style="width: 100%; height: 100%;">           

        <source type="video/mp4" src="my_video.mp4" />
        <source type="video/webm" src="my_video.webm" />

        //Flash fallback removed for brevity

    </video>
</div>

And then I just resize #video_dims_wrapper and the MEJS element contained in the dimensions accordingly (because of the width: 100%, height: 100%, style declarations).

, ( 16: 9), , , , , .

, , 16: 9 , , - .

- ? ?

.

+5
1

Wordpress. , ik . , mediaelement.js, :

// JS CSS setDimensions: true;//( ).

, init false ( ). css. ! :). , script ! , - Google, , - .

, - ;). : Wordpress video letterbox embed flash flashback mediaelement.js wp-mediaelement.js

+1

All Articles