PageSourceSearch

https://www.tce.se.gov.br/SiteAssets/template-nova/js/custom_plugins.js

js tce.se.gov.br collected 2026-10-02 11:33:27 UTC 3,202 bytes, 62 lines download raw bytes

1        const apiKey = 'AIzaSyDXmASTvfaHclbLBQzYt6Y4Foy7TVGfIEY';
2        const channelId = 'UCV7OwLJBmO7nLYpUcVLEUbQ';
3        const apiUrl = `https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=${channelId}&key=${apiKey}`;
4        
5	        function getFeaturedVideo() {
6            fetch(apiUrl)
7                .then(response => response.json())
8                .then(data => {
9                    const uploadsPlaylistIdSessaoPleno = 'PL6OpnFRTE7vLb8zEopHlKRj70yHmd2dyY'
10                  
11                    const playlistUrl = `https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=1&playlistId=${uploadsPlaylistIdSessaoPleno}&key=${apiKey}`;
12
13                    fetch(playlistUrl)
14                        .then(response => response.json())
15                        .then(data => {
16                            const videoId = data.items[0].snippet.resourceId.videoId;
17                            const videoUrl = `https://www.youtube.com/watch?v=${videoId}`;
18                            const iframe = document.getElementById("videoFrame");
19
20                            // Atualizar o iframe com o vídeo em destaque
21                            iframe.src = `https://www.youtube.com/embed/${videoId}`;                        })
22                        .catch(error => {
23                            console.error('Erro ao buscar o vídeo em destaque:', error);
24                        });
25                })
26                .catch(error => {
27                    console.error('Erro ao buscar informações do canal:', error);
28                });               
29                
30        }
31        
32        function getFeaturedVideo2() {
33            fetch(apiUrl)
34                .then(response => response.json())
35                .then(data => {
36                    const uploadsPlaylistIdTvTce = 'PL6OpnFRTE7vJ4lv_9wxuxDACypYHm4Jpc'
37                    
38                    const playlistUrl = `https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=1&playlistId=${uploadsPlaylistIdTvTce}&key=${apiKey}`;
39
40                    fetch(playlistUrl)
41                        .then(response => response.json())
42                        .then(data => {
43                            const videoId = data.items[0].snippet.resourceId.videoId;
44                            const videoUrl = `https://www.youtube.com/watch?v=${videoId}`;
45                            const iframe = document.getElementById("videoFrame2");
46
47                            // Atualizar o iframe com o vídeo em destaque
48                            iframe.src = `https://www.youtube.com/embed/${videoId}`;                        })
49                        .catch(error => {
50                            console.error('Erro ao buscar o vídeo em destaque:', error);
51                        });
52                })
53                .catch(error => {
54                    console.error('Erro ao buscar informações do canal:', error);
55                });               
56                
57        }
58
59
60        // Chame a função para obter o vídeo em destaque
61        getFeaturedVideo();
62        getFeaturedVideo2();

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.