PageSourceSearch

https://ibce.org.bo/js/reproductor_flotante.js?v=2

js ibce.org.bo collected 2026-09-24 20:51:46 UTC 4,517 bytes, 148 lines download raw bytes

1
2// 2. This code loads the IFrame Player API code asynchronously.
3var tag = document.createElement('script');
4
5tag.src = "https://www.youtube.com/iframe_api";
6var firstScriptTag = document.getElementsByTagName('script')[0];
7firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
8
9// 3. This function creates an <iframe> (and YouTube player)
10//    after the API code downloads.
11var player;
12function onYouTubeIframeAPIReady() {
13    player = new YT.Player('player', {
14        height: '220',
15        width: '400',
16        //height: '360',
17        //width: '640',
18        videoId: 'EQuBJm4X1n0',
19        playerVars: {
20            'autoplay': 1,//poner valor en 1 para reproduccion automatica
21            'controls': 1,
22            'loop': 1,
23            'color': 'red'
24        },
25        events: {
26            'onReady': onPlayerReady,
27            'onStateChange': onPlayerStateChange
28        }
29    });
30}
31
32// 4. The API will call this function when the video player is ready.
33function onPlayerReady(event) {
34    event.target.mute();
35    event.target.setVolume(100);
36    event.target.playVideo(); //descomentar para reproduccion automatica
37}
38
39// 5. The API calls this function when the player's state changes.
40//    The function indicates that when playing a video (state=1),
41//    the player should play for six seconds and then stop.
42var done = false;
43function onPlayerStateChange(event) {
44    /* if (event.data == YT.PlayerState.PLAYING && !done) {
45     setTimeout(stopVideo, 6000);
46     done = true;
47     }*/
48}
49function stopVideo() {
50    player.stopVideo();
51}
52
53$(document).ready(function(){
54    $(document).on('click', '.cerrar_publi_flotante', function(){
55        $(".publi_flotante").css("display", "none");
56        player.stopVideo();
57        // var v1 = $(this).attr('id-categoria');
58
59    });
60
61    $(".publi_flotante").mouseover(function() {
62        $(".cerrar_publi_flotante").css("display", "block");
63    });
64
65    $(".cerrar_publi_flotante").mouseover(function() {
66        $(".cerrar_publi_flotante").css("display", "block");
67    });
68
69    $(".publi_flotante").mouseout(function() {
70        $(".cerrar_publi_flotante").css("display", "none");
71    });
72
73    /*  JAVASCRIPT PARA EL SEGUNDO POPUP  */
74    $(document).on('click', '.cerrar_publi_flotante_izquierdo', function(){
75        $(".publi_flotante_izquierdo").css("display", "none");
76        player.stopVideo();
77        // var v1 = $(this).attr('id-categoria');
78
79    });
80
81    $(".publi_flotante_izquierdo").mouseover(function() {
82        $(".cerrar_publi_flotante_izquierdo").css("display", "block");
83    });
84    $(".cerrar_publi_flotante_izquierdo").mouseover(function() {
85        $(".cerrar_publi_flotante_izquierdo").css("display", "block");
86    });
87
88    $(".publi_flotante_izquierdo").mouseout(function() {
89        $(".cerrar_publi_flotante_izquierdo").css("display", "none");
90    });
91});
92
93
94
95
96//******************* REPRODUCTOR 2 ******************************
97/*
98// 2. This code loads the IFrame Player API code asynchronously.
99var tag2 = document.createElement('script');
100
101tag2.src = "https://www.youtube.com/iframe_api";
102var firstScriptTag2 = document.getElementsByTagName('script')[0];
103firstScriptTag2.parentNode.insertBefore(tag2, firstScriptTag2);
104
105// 3. This function creates an <iframe> (and YouTube player)
106//    after the API code downloads.
107var player2;
108function onYouTubeIframeAPIReady() {
109    player2 = new YT.Player('player2', {
110        //height: '225',
111        //width: '400',
112        height: '360',
113        width: '640',
114        videoId: 'kFN4BIjTq9s',
115        playerVars: {
116            'autoplay': 0,//poner valor en 1 para reproduccion automatica
117            'controls': 1,
118            'loop': 1,
119            'color': 'red'
120        },
121        events: {
122            'onReady': onPlayerReady2,
123            'onStateChange': onPlayerStateChange2
124        }
125    });
126}
127
128// 4. The API will call this function when the video player is ready.
129function onPlayerReady2(event) {
130    event.target.mute();
131    event.target.setVolume(100);
132    //event.target.playVideo(); //descomentar para reproduccion automatica
133}
134
135// 5. The API calls this function when the player's state changes.
136//    The function indicates that when playing a video (state=1),
137//    the player should play for six seconds and then stop.
138var done2 = false;
139function onPlayerStateChange2(event) {
140    /!* if (event.data == YT.PlayerState.PLAYING && !done2) {
141     setTimeout(stopVideo, 6000);
142     done2 = true;
143     }*!/
144}
145function stopVideo2() {
146    player2.stopVideo();
147}*/
148  

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.