In the example above, the player's container is centered, 70% of the parent's width.Upon clicking the theater button, the player triggers a mode event with a "large" value. This indicates to expand the player's container to 100% of its parent's width. When the theater button is clicked again, it triggers an event with the "normal" value, and the player's container width is back to its original size (70%).
Code snippet
<script>const player = videojs('my_player', {license: "key"});player.nuevo({theaterButton: true})});player.on('mode',function(event,mode) {if(mode==='large') {document.querySelector(".media-theater").style.width='100%';} elseif(mode==='normal') {document.querySelector("media-theater").style.width='70%';}});</script>