original_string: public function setup($page) {
  
          // Load dynamic loader. It will scan page for videojs media and load necessary modules.
          // Loader will be loaded on absolutely every page, however the videojs will only be loaded
          // when video is present on the page or added later to it in AJAX.
          $path = new moodle_url('/media/player/videojs/videojs/video-js.swf');
          $contents = 'videojs.options.flash.swf = "' . $path . '";' . "\n";
          $contents .= $this->find_language(current_language());
          $page->requires->js_amd_inline(<<<EOT
  require(["media_videojs/loader"], function(loader) {
      loader.setUp(function(videojs) {
          $contents
      });
  });
  EOT
          );
      }
code: public function setup($page) {
  
          // Load dynamic loader. It will scan page for videojs media and load necessary modules.
          // Loader will be loaded on absolutely every page, however the videojs will only be loaded
          // when video is present on the page or added later to it in AJAX.
          $path = new moodle_url('/media/player/videojs/videojs/video-js.swf');
          $contents = 'videojs.options.flash.swf = "' . $path . '";' . "\n";
          $contents .= $this->find_language(current_language());
          $page->requires->js_amd_inline(<<<EOT
  require(["media_videojs/loader"], function(loader) {
      loader.setUp(function(videojs) {
          $contents
      });
  });
  EOT
          );
      }
code_tokens: public function setup ( $ page ) { // Load dynamic loader. It will scan page for videojs media and load necessary modules. // Loader will be loaded on absolutely every page, however the videojs will only be loaded // when video is present on the page or added later to it in AJAX. $ path = new moodle_url ( '/media/player/videojs/videojs/video-js.swf' ) ; $ contents = 'videojs.options.flash.swf = "' . $ path . '";' . "\n" ; $ contents .= $ this -> find_language ( current_language ( ) ) ; $ page -> requires -> js_amd_inline ( <<<EOT
  require(["media_videojs/loader"], function(loader) {
      loader.setUp(function(videojs) {
          $contents
      });
  });
  EOT ) ; }
docstring: Setup page requirements.
  
  @param moodle_page $page The page we are going to add requirements to.
docstring_tokens: Setup page requirements .