title: Angular 6 videojs-record results in runtime error
body: <p>I am using Angular 6 along with videojs-record plugin. I configured following dependencies in my project.</p>
  
  <pre><code>npm install --save video.js
  npm install --save videojs-record
  </code></pre>
  
  <p>Later I referenced the videojs plugin using the following import statement.</p>
  
  <pre><code>import videojs from 'video.js';
  import 'webrtc-adapter';
  import RecordRTC from 'recordrtc';
  import Record from 'videojs-record/dist/videojs.record.js';
  </code></pre>
  
  <p>While there is no error reported at the time of compilation, when I hit the browser I get following error in console.</p>
  
  <pre><code>Uncaught ReferenceError: global is not defined
      at Object../node_modules/webrtc-adapter/src/js/adapter_core.js (adapter_core.js:13)
      at __webpack_require__ (bootstrap:78)
      at Module../src/app/app.component.ts (main.js:93)
      at __webpack_require__ (bootstrap:78)
      at Module../src/app/app.module.ts (app.component.ts:13)
      at __webpack_require__ (bootstrap:78)
      at Module../src/main.ts (main.ts:1)
      at __webpack_require__ (bootstrap:78)
      at Object.0 (main.ts:12)
      at __webpack_require__ (bootstrap:78)
  </code></pre>
  
  <p>Please let me know, what I am missing here?</p>
  
  <p><strong>Version Information:</strong> </p>
  
  <pre><code>"video.js": "^7.2.3",
  "videojs-record": "^2.4.1",
  "@angular/compiler": "^6.0.3",
  "@angular/core": "^6.0.3",
  </code></pre>
  
  <p><strong>UPDATE-1:</strong>
  If I change webrtc-adapter import from</p>
  
  <pre><code>import 'webrtc-adapter'
  </code></pre>
  
  <p>to</p>
  
  <pre><code>import 'webrtc-adapter/out/adapter_no_global.js';
  </code></pre>
  
  <p>videojs fails with the following error.</p>
  
  <pre><code>ERROR Error: plugin "record" does not exist
      at Player.&lt;anonymous&gt; (video.es.js:19615)
      at Array.forEach (&lt;anonymous&gt;)
      at new Player (video.es.js:19611)
      at videojs$1 (video.es.js:24059)
      at AppComponent.push../src/app/app.component.ts.AppComponent.startRecording (app.component.ts:43)
      at Object.eval [as handleEvent] (AppComponent.html:5)
      at handleEvent (core.js:10251)
      at callWithDebugContext (core.js:11344)
      at Object.debugHandleEvent [as handleEvent] (core.js:11047)
      at dispatchEvent (core.js:7710)
  </code></pre>
  
  <p><strong>UPDATE-2:</strong></p>
  
  <p>I tried using angular cli customizer (<a href="https://github.com/nfriend/angular-cli-customizer" rel="nofollow noreferrer">https://github.com/nfriend/angular-cli-customizer</a>) and followed instructions specified in <a href="https://github.com/collab-project/videojs-record/wiki/Angular" rel="nofollow noreferrer">https://github.com/collab-project/videojs-record/wiki/Angular</a> </p>
  
  <p>Unfortunately that too didn't work :(</p>