Video.js - Theater Mode

DOCUMENTATION

Theater mode switch for Video js player

Nuevo plugin v.3 features new Theater Mode button to show in controlbar optionally. Button action is synchronized with videojs mode event fired on click. Mode event has 2 parameters: 'small' and 'large'. Depending on parameter you can order to maximize videojs parent element to desired size and back.
Check player code setup how to enable Mode button and what javascript code can be on mode event fired.


<script>
var player = videojs('example_video_1',{},function(){ 
	this.nuevoPlugin({
		logo: '//domain.com/path/to/logo.png',
		logoposition: 'RT',
		logourl: '//domain.com',
		theaterButton: true
	});
	player.on('mode',function(event,mode) {
	   var width = "70%";
	   if(mode=='large') width="100%"; 
	   document.querySelector("#theater").style.width=width;
	});
});
</script>