Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component } from '@angular/core';
- import Twitch from 'twitch-js';
- @Component({
- selector: 'CSGO',
- templateUrl: './CSGO.html',
- styleUrls: ['./CSGO.css']
- })
- export class CounterComponent implements OnInit {
- ngOnInit() {
- var options = {
- width: <width>,
- height: <height>,
- channel: "<channel ID>",
- video: "<video ID>",
- collection: "<collection ID>",
- };
- var player = new Twitch.Player("<player div ID>", options);
- player.setVolume(0.5);
- }
- }
- IN HTML
- <div id="<player div ID>"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement