General developer forum

VideoJS version? Need enterFullWindow() function

Picture of Tristan Roscoe
VideoJS version? Need enterFullWindow() function
Attempting to use the enterFullWindow() function instead of requestFullScreen as it can be carried between activities.

It's in the documention here:

I'm guessing Moodle does not have the latest version of VideoJS compiled but am surprised as there were some video updates added in 3.5.

If anyone is curious I'm autoplaying .mp4, listening for the end and automatically moving to the next video. Traditional full screen exits when the page reloads between activities but full window would work and allow the user to continue watching the videos in "full screen (window)".

Here's what I currently have at the end of my theme's columns2.mustache

require(['theme_boost/drawer'], function(mod) {
var videos = document.getElementsByTagName("video");
if (document.body.contains(videos[0])) {
    var player = videos[0];
    player.onended = function() {
        var l = document.getElementById('next-activity-link');;
    window.onload = function() {
      var promise =;

      if (promise !== undefined) {
        promise.then(function() {
          // Autoplay started!
        }).catch(function(error) {
          // Autoplay was prevented.
          player.muted = true;
Average of ratings: -