title: video.js and video-youtube.js throwing "Cannot read properties of undefined (reading 'videojs')" when loading page
body: <p>I'm trying to play a Youtube video using videojs and videojs-youtube.  I've installed the latest versions with npm (videojs 7.18.1, videoojs-youtube 2.6.1).  I'm loading in this order:</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot; src=&quot;/node_modules/video.js/dist/video.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;module&quot; src=&quot;/node_modules/videojs-youtube/dist/Youtube.js&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>When the page loads, I get the error: &quot;Cannot read properties of undefined (reading 'videojs')&quot; when it hits line 32:</p>
  <pre><code>root.Youtube = factory(root.videojs);
  </code></pre>
  <p>If I try to play the video, I get the following errors:</p>
  <pre><code>VIDEOJS: ERROR: The &quot;youtube&quot; tech is undefined. Skipped browser support check for that tech.
  VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media.
  </code></pre>
  <p>I'm creating the player in JavaScript with:</p>
  <pre><code>videojs(video.id).ready(function () {
  myPlayer = this;
  myPlayer.width = width;
  myPlayer.height = height;
  myPlayer.addClass(&quot;video-js&quot;);
  myPlayer.addClass(&quot;vjs-default-skin&quot;);
  myPlayer.autoplay(true);
  myPlayer.controls(true);
  myPlayer.options_.techOrder[1] = &quot;youtube&quot;;
  myPlayer.preload(&quot;auto&quot;);
  myPlayer.on(&quot;play&quot;, moviePlay);
  myPlayer.on('ended', movieEnded);
  myPlayer.on('failed', movieFailed);
  myPlayer.on('seeking', movieSeeking);
  });
  </code></pre>
  <p>I'm selecting from a number of videos, so I them with:</p>
  <pre><code>myPlayer.src( { type: &quot;video/youtube&quot;, src: &quot;https://www.youtube.com/watch?v=HlXexv4Uc1E?1651837154234&quot; } );
  </code></pre>
  <p>Youtube does show up in the techOrder.  I wasn't sure how to do that in JavaScript but it seems to be one of two in the array.  The page itself is in a frame of a frameset if that makes any difference.   I've changed the videojs-youtube JavaScript example into an .asp frameset and used the same type of include files and it works fine. Could I have variable or function names that conflict... something like that?</p>
  <p>What have I done wrong and how to I fix the original error which I assume causes the other two errors on play?</p>