UNPKG

videojs-landscape-fullscreen

Version:

Automatically Switch to Landscape on Fullscreen, and Fullscreen on Landscape

36 lines (31 loc) 1.03 kB
<!doctype html> <html> <head> <meta charset="utf-8"> <title>videojs-landscape-fullscreen Demo</title> <link href="https://vjs.zencdn.net/7.0.3/video-js.css" rel="stylesheet"> </head> <body> <video id="videojs-landscape-fullscreen-player" class="video-js vjs-default-skin" controls> <source src="//vjs.zencdn.net/v/oceans.mp4" type='video/mp4'> <source src="//vjs.zencdn.net/v/oceans.webm" type='video/webm'> </video> <ul> <li><a href="test/">Run unit tests in browser.</a></li> </ul> <script src="https://vjs.zencdn.net/7.0.3/video.js"></script> <script src="dist/videojs-landscape-fullscreen.js"></script> <script> (function(window, videojs) { var player = window.player = videojs('videojs-landscape-fullscreen-player'); player.landscapeFullscreen({ fullscreen: { enterOnRotate: true, alwaysInLandscapeMode: true, iOS: true } }); }(window, window.videojs)); </script> </body> </html>