How to make a video fullscreen when it is placed inside an iframe?

后端 未结 4 1994
無奈伤痛
無奈伤痛 2021-01-04 01:27

I\'m using the default settings for my mediaelement.js player, and my initialization is very basic: $(\'video\').mediaelementplayer();

My question is: I

4条回答
  •  被撕碎了的回忆
    2021-01-04 01:53

    Here is a "hack" solution that will even make your page load faster.

    1) Create an image (usually a screenshot of the video) in place of the iFrame.

    2) Bind a click event handler to the image so that it creates an iFrame to the dimensions you require. (You can base those dimensions on the client's window size).

提交回复
热议问题