PageSourceSearch

https://www.scvvalve.com/assets/c0fd157a/javascripts/_youtube.js

js scvvalve.com collected 2026-09-27 03:02:53 UTC 1,424 bytes, 57 lines download raw bytes

1/**
2 * Function for youtube player
3 * Created by dmitry on 26/02/16.
4 */
5
6var yplayer;
7var yplayerOnReadyVideo = '';
8
9function initYoutube() {
10    // initializing
11    var tag = document.createElement('script');
12
13    tag.src = 'https://www.youtube.com/iframe_api';
14    var firstScriptTag = document.getElementsByTagName('script')[0];
15    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
16}
17
18function onPlayerReady(event) {
19    // if have video for start on ready
20    if (yplayerOnReadyVideo) {
21        //yplayer.loadVideoById(yplayerOnReadyVideo, 0, 'large');
22        yplayer.cueVideoById(yplayerOnReadyVideo, 0, 'large');
23        //yplayer.playVideo();
24        console.log('OnReadyVideo = ' + yplayerOnReadyVideo);
25        yplayerOnReadyVideo = '';
26    }
27}
28
29var done = false;
30
31function onPlayerStateChange(event) {
32    if (event.data == YT.PlayerState.PLAYING && !done) {
33        //setTimeout(stopVideo, 6000);
34        done = true;
35    }
36}
37
38function stopVideo() {
39    if (yplayer) {
40        yplayer.stopVideo();
41    }
42}
43
44function onYouTubeIframeAPIReady() {
45    yplayer = new YT.Player('youtube_player', {
46        height: playerHeight,
47        width: playerWidth,
48        videoId: '',
49        playerVars: {rel: 0},
50        events: {
51            'onReady': onPlayerReady,
52            'onStateChange': onPlayerStateChange
53        }
54    });
55}
56
57initYoutube();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.