<commit_before>/// <reference path="../../typings/globals/youtube/index.d.ts" />
import {Component, OnInit} from '@angular/core';
import { window } from '@angular/platform-browser/src/facade/browser';

@Component({
    selector: 'youtube-player',
    template: `
        <h1> the youtube player ! </h1>   
        <div id="player"></div>
    `
})

export class YouTubePlayerComponent implements OnInit {
    private player: YT.Player;

    ngOnInit() {
        this.setupPlayer();
    }

    setupPlayer() {
        window['onYouTubeIframeAPIReady'] = () => {
            this.createPlayer();
        }
        if (window.YT && window.YT.Player) {
            this.createPlayer();
        }
    }

    createPlayer() {
        console.log("Create player !");
        this.player = new window.YT.Player("player", {
            height: '390',
            width: '640',
            videoId: 'M7lc1UVf-VE'
        });
    }
}
<commit_msg>Disable event on youtube video<commit_after>/// <reference path="../../typings/globals/youtube/index.d.ts" />
import {Component, OnInit} from '@angular/core';
import { window } from '@angular/platform-browser/src/facade/browser';

@Component({
    selector: 'youtube-player',
    template: `
        <h1> the youtube player ! </h1>   
        <div id="player" style="pointer-events: none"></div>
    `
})

export class YouTubePlayerComponent implements OnInit {
    private player: YT.Player;

    ngOnInit() {
        this.setupPlayer();
    }

    setupPlayer() {
        window['onYouTubeIframeAPIReady'] = () => {
            this.createPlayer();
        }
        if (window.YT && window.YT.Player) {
            this.createPlayer();
        }
    }

    createPlayer() {
        console.log("Create player !");
        this.player = new window.YT.Player("player", {
            height: '390',
            width: '640',
            videoId: ''
        });
    }
}

{'fraction_non_alphanumeric': 0.1586967945349448, 'fraction_numerical': 0.009458749343142408, 'mean_word_length': 2.1060358890701467, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6020635', 'n_tokens_mistral': 588, 'n_tokens_neox': 571, 'n_words': 109}