SHARE
TWEET

Untitled

a guest Feb 26th, 2020 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component } from '@angular/core';
  2. import Twitch from 'twitch-js';
  3.  
  4. @Component({
  5.   selector: 'CSGO',
  6.   templateUrl: './CSGO.html',
  7.   styleUrls: ['./CSGO.css']
  8. })
  9. export class CounterComponent implements OnInit {
  10.     ngOnInit() {
  11.         var options = {
  12.         width: <width>,
  13.         height: <height>,
  14.         channel: "<channel ID>",
  15.         video: "<video ID>",
  16.         collection: "<collection ID>",
  17.       };
  18.       var player = new Twitch.Player("<player div ID>", options);
  19.       player.setVolume(0.5);
  20.     }
  21. }
  22.  
  23.  
  24.  
  25. IN HTML
  26. <div id="<player div ID>"></div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top