title: Angular how can I use embed script in Component
body: <p>I'm trying to set up in Angular a way of only showing Twitch player if the stream is online, so in the <a href="https://dev.twitch.tv/docs/embed/video-and-clips/" rel="nofollow noreferrer">Documentation</a> there is this inline HTML:</p>
  
  <pre><code>&lt;script src= "https://player.twitch.tv/js/embed/v1.js"&gt;&lt;/script&gt;
  &lt;div id="&lt;player div ID&gt;"&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
    var options = {
      width: &lt;width&gt;,
      height: &lt;height&gt;,
      channel: "&lt;channel ID&gt;",
      video: "&lt;video ID&gt;",
      collection: "&lt;collection ID&gt;",
    };
    var player = new Twitch.Player("&lt;player div ID&gt;", options);
    player.setVolume(0.5);
  &lt;/script&gt;
  </code></pre>
  
  <p>Of course though in Angular Components we can't use &lt; script > tags and I don't think it's currently possible to use require or import to use this in my components TypeScript. </p>
  
  <p>So how would I go about adding this functionality? I understand what to do after I can actually reference that script tag.</p>